Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DIO 5ch TTL a
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
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 DIO 5ch TTL a
Commits
a506aa57
Commit
a506aa57
authored
Nov 18, 2020
by
Miguel Jimenez Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
irq-demo: Flush channel before starting the new interrupts
parent
f88a74d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
fmc-dio-device.c
sw/irq-demo/dep/fmc-dio-device.c
+12
-0
fmc-dio-device.h
sw/irq-demo/dep/fmc-dio-device.h
+1
-0
irq-demo.c
sw/irq-demo/irq-demo.c
+4
-2
No files found.
sw/irq-demo/dep/fmc-dio-device.c
View file @
a506aa57
...
...
@@ -292,6 +292,18 @@ static int get_hw_ts_from_fmc_dio_device(fmc_dio_device dev, int ch,
return
0
;
}
void
flush_fmc_dio_device_channel
(
fmc_dio_device
dev
,
int
ch
)
{
int
ret
;
struct
usr_timestamp
*
ts
;
unsigned
int
nts
;
ret
=
get_hw_ts_from_fmc_dio_device
(
dev
,
ch
,
&
ts
,
&
nts
);
if
(
ret
==
0
)
{
free
(
ts
);
}
}
static
int
get_kernel_leaps_info
(
fmc_dio_device
dev
)
{
struct
timex
tx
=
{
0
};
...
...
sw/irq-demo/dep/fmc-dio-device.h
View file @
a506aa57
...
...
@@ -39,6 +39,7 @@ int get_tai_ts_from_fmc_dio_device(fmc_dio_device dev, int ch,
struct
usr_timestamp
**
ts
,
unsigned
int
*
nts
);
int
get_utc_ts_from_fmc_dio_device
(
fmc_dio_device
dev
,
int
ch
,
struct
usr_timestamp
**
ts
,
unsigned
int
*
nts
);
void
flush_fmc_dio_device_channel
(
fmc_dio_device
dev
,
int
ch
);
unsigned
int
get_total_n_timestamps
(
fmc_dio_device
dev
);
unsigned
int
get_partial_n_timestamps
(
fmc_dio_device
dev
);
...
...
sw/irq-demo/irq-demo.c
View file @
a506aa57
...
...
@@ -118,10 +118,12 @@ int main(int argc, char *argv[])
/* Before starting IRQ demo, Interrupts should be properly configured:
* 1) Disable all interrupts
* 2) Enable the TEST_FMC_DIO_CH interrupt line
* 3) Setup specific information for interrupt line (period from user arguments or default one)
* 2) Flush TEST_FMC_DIO_CH channel
* 3) Enable the TEST_FMC_DIO_CH interrupt line
* 4) Setup specific information for interrupt line (period from user arguments or default one)
*/
disable_fmc_dio_device_all_irq
(
dev
);
flush_fmc_dio_device_channel
(
dev
,
TEST_FMC_DIO_CH
);
enable_fmc_dio_device_irq
(
dev
,
TEST_FMC_DIO_CH
);
setup_fmc_dio_device_irq
(
dev
,
user_arguments
->
irq_period
,
TEST_FMC_DIO_COUNT
);
...
...
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