Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
27c3c260
Commit
27c3c260
authored
7 years ago
by
Mark Schulte
Committed by
Gregory Nutt
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add argument to capture irq callback
parent
5987db47
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/arm/src/stm32/stm32_capture.c
+3
-3
3 additions, 3 deletions
arch/arm/src/stm32/stm32_capture.c
arch/arm/src/stm32/stm32_capture.h
+2
-2
2 additions, 2 deletions
arch/arm/src/stm32/stm32_capture.h
with
5 additions
and
5 deletions
arch/arm/src/stm32/stm32_capture.c
+
3
−
3
View file @
27c3c260
...
...
@@ -702,7 +702,7 @@ static int stm32_cap_setclock(FAR struct stm32_cap_dev_s *dev, stm32_cap_clk_t c
return
prescaler
;
}
static
int
stm32_cap_setisr
(
FAR
struct
stm32_cap_dev_s
*
dev
,
xcpt_t
handler
)
static
int
stm32_cap_setisr
(
FAR
struct
stm32_cap_dev_s
*
dev
,
xcpt_t
handler
,
void
*
arg
)
{
const
struct
stm32_cap_priv_s
*
priv
=
(
const
struct
stm32_cap_priv_s
*
)
dev
;
int
irq
;
...
...
@@ -736,13 +736,13 @@ static int stm32_cap_setisr(FAR struct stm32_cap_dev_s *dev, xcpt_t handler)
/* Otherwise set callback and enable interrupt */
irq_attach
(
irq
,
handler
,
NULL
);
irq_attach
(
irq
,
handler
,
arg
);
up_enable_irq
(
irq
);
#ifdef USE_ADVENCED_TIM
if
(
priv
->
irq_of
)
{
irq_attach
(
priv
->
irq_of
,
handler
,
NULL
);
irq_attach
(
priv
->
irq_of
,
handler
,
arg
);
up_enable_irq
(
priv
->
irq_of
);
}
#endif
...
...
This diff is collapsed.
Click to expand it.
arch/arm/src/stm32/stm32_capture.h
+
2
−
2
View file @
27c3c260
...
...
@@ -54,7 +54,7 @@
#define STM32_CAP_SETCLOCK(d,clk_src,psc,max) ((d)->ops->setclock(d,clk_src,psc,max))
#define STM32_CAP_SETCHANNEL(d,ch,cfg) ((d)->ops->setchannel(d,ch,cfg))
#define STM32_CAP_GETCAPTURE(d,ch) ((d)->ops->getcapture(d,ch))
#define STM32_CAP_SETISR(d,hnd
)
((d)->ops->setisr(d,hnd))
#define STM32_CAP_SETISR(d,hnd
,arg)
((d)->ops->setisr(d,hnd
,arg
))
#define STM32_CAP_ENABLEINT(d,s,on) ((d)->ops->enableint(d,s,on))
#define STM32_CAP_ACKFLAGS(d,f) ((d)->ops->ackflags(d,f))
#define STM32_CAP_GETFLAGS(d) ((d)->ops->getflags(d))
...
...
@@ -178,7 +178,7 @@ struct stm32_cap_ops_s
int
(
*
setclock
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
stm32_cap_clk_t
clk
,
uint32_t
prescaler
,
uint32_t
max
);
int
(
*
setchannel
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
uint8_t
channel
,
stm32_cap_ch_cfg_t
cfg
);
uint32_t
(
*
getcapture
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
uint8_t
channel
);
int
(
*
setisr
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
xcpt_t
handler
);
int
(
*
setisr
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
xcpt_t
handler
,
void
*
arg
);
void
(
*
enableint
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
stm32_cap_flags_t
src
,
bool
on
);
void
(
*
ackflags
)(
FAR
struct
stm32_cap_dev_s
*
dev
,
int
flags
);
stm32_cap_flags_t
(
*
getflags
)(
FAR
struct
stm32_cap_dev_s
*
dev
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment