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
52511df5
Commit
52511df5
authored
Nov 19, 2020
by
Jorge Machado
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create global_user_arguments to allow exit procedure to disable the pulse train generation
parent
30d1ac9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
irq-demo.c
sw/irq-demo/irq-demo.c
+4
-1
No files found.
sw/irq-demo/irq-demo.c
View file @
52511df5
...
...
@@ -29,6 +29,8 @@
/* Static data for signal handlers */
static
fmc_dio_device
global_fmc_dev
=
NULL
;
/* Global user arguments */
static
user_args
global_user_arguments
=
NULL
;
/* Global verbose control */
static
int
verbose_mode
=
0
;
...
...
@@ -82,6 +84,7 @@ int main(int argc, char *argv[])
ret
=
1
;
goto
out_log
;
}
global_user_arguments
=
user_arguments
;
/* Set verbose mode from user command line */
verbose_mode
=
user_arguments
->
verbose
;
...
...
@@ -298,7 +301,7 @@ static void set_stdin_as_nonblocking(void)
static
void
exit_abruptly
(
int
sig
)
{
setup_fmc_dio_device_irq
(
global_fmc_dev
,
1000000
,
0
);
setup_fmc_dio_device_irq
(
global_fmc_dev
,
global_user_arguments
->
irq_period
,
0
);
sleep
(
1
);
disable_fmc_dio_device_all_irq
(
global_fmc_dev
);
exit
(
0
);
...
...
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