Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
b31c9361
Unverified
Commit
b31c9361
authored
Feb 10, 2023
by
davidk88
Committed by
GitHub
Feb 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add function timerAttachInterruptFlag (#7809)
parent
e881d11b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
cores/esp32/esp32-hal-timer.c
cores/esp32/esp32-hal-timer.c
+6
-2
cores/esp32/esp32-hal-timer.h
cores/esp32/esp32-hal-timer.h
+1
-0
No files found.
cores/esp32/esp32-hal-timer.c
View file @
b31c9361
...
...
@@ -221,11 +221,15 @@ bool IRAM_ATTR timerFnWrapper(void *arg){
return
false
;
}
void
timerAttachInterrupt
(
hw_timer_t
*
timer
,
void
(
*
fn
)(
void
),
bool
edge
){
void
timerAttachInterrupt
Flag
(
hw_timer_t
*
timer
,
void
(
*
fn
)(
void
),
bool
edge
,
int
intr_alloc_flags
){
if
(
edge
){
log_w
(
"EDGE timer interrupt is not supported! Setting to LEVEL..."
);
}
timer_isr_callback_add
(
timer
->
group
,
timer
->
num
,
timerFnWrapper
,
fn
,
0
);
timer_isr_callback_add
(
timer
->
group
,
timer
->
num
,
timerFnWrapper
,
fn
,
intr_alloc_flags
);
}
void
timerAttachInterrupt
(
hw_timer_t
*
timer
,
void
(
*
fn
)(
void
),
bool
edge
){
timerAttachInterruptFlag
(
timer
,
fn
,
edge
,
0
);
}
void
timerDetachInterrupt
(
hw_timer_t
*
timer
){
...
...
cores/esp32/esp32-hal-timer.h
View file @
b31c9361
...
...
@@ -36,6 +36,7 @@ void timerEnd(hw_timer_t *timer);
void
timerSetConfig
(
hw_timer_t
*
timer
,
uint32_t
config
);
uint32_t
timerGetConfig
(
hw_timer_t
*
timer
);
void
timerAttachInterruptFlag
(
hw_timer_t
*
timer
,
void
(
*
fn
)(
void
),
bool
edge
,
int
intr_alloc_flags
);
void
timerAttachInterrupt
(
hw_timer_t
*
timer
,
void
(
*
fn
)(
void
),
bool
edge
);
void
timerDetachInterrupt
(
hw_timer_t
*
timer
);
...
...
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