Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha - Software
Commits
2427a5fe
Commit
2427a5fe
authored
Aug 12, 2012
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: add and use fsm command enumeration
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
b75b3054
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
fa-zio-trg.c
fa-zio-trg.c
+4
-2
fmc-adc.h
fmc-adc.h
+9
-1
No files found.
fa-zio-trg.c
View file @
2427a5fe
...
...
@@ -180,7 +180,7 @@ irqreturn_t zfadc_irq(int irq, void *ptr)
&
zfad_regs
[
ZFAT_CFG_HW_EN
],
0
);
/* Start state machine */
zfa_common_conf_set
(
&
zfat
->
ti
.
cset
->
head
.
dev
,
&
zfad_regs
[
ZFA_CTL_FMS_CMD
],
2
);
&
zfad_regs
[
ZFA_CTL_FMS_CMD
],
ZFA_START
);
}
if
(
irq_status
&
ZFAT_TRG_FIRE
)
{
/* Trigger fire */
...
...
@@ -201,9 +201,11 @@ irqreturn_t zfadc_irq(int irq, void *ptr)
zfa_common_info_get
(
&
zfat
->
ti
.
cset
->
head
.
dev
,
&
zfad_regs
[
ZFA_STA_FSM
],
&
val
);
if
(
val
==
ZFA_STATE_IDLE
)
{
dev_dbg
(
&
zfat
->
ti
.
head
.
dev
,
"Start DMA from device
\n
"
);
/* Stop state machine */
zfa_common_conf_set
(
&
zfat
->
ti
.
cset
->
head
.
dev
,
&
zfad_regs
[
ZFA_CTL_FMS_CMD
],
2
);
&
zfad_regs
[
ZFA_CTL_FMS_CMD
],
ZFA_STOP
);
/* Disable all triggers */
zfa_common_conf_set
(
&
zfat
->
ti
.
cset
->
head
.
dev
,
&
zfad_regs
[
ZFAT_CFG_HW_EN
],
0
);
...
...
fmc-adc.h
View file @
2427a5fe
...
...
@@ -157,9 +157,17 @@ enum zfadc_dregs_enum {
ZFA_UTC_ACQ_END_COARSE
,
ZFA_UTC_ACQ_END_FINE
,
};
/* Device registers */
extern
const
struct
zio_reg_desc
zfad_regs
[];
enum
zfa_fsm_cmd
{
ZFA_NONE
=
0x0
,
ZFA_START
=
0x1
,
ZFA_STOP
=
0x2
,
};
/* All possible state of the state machine, other values are invalid*/
enum
zfa_fsm_state
{
ZFA_STATE_IDLE
=
0x1
,
ZFA_STATE_IDLE
=
0x1
,
ZFA_STATE_PRE
,
ZFA_STATE_POST
,
ZFA_STATE_WAIT
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment