Using CMSIS NVIC functions to set custom timer interrupt handler.
Revision 6:be045fed855f, committed 2019-08-02
- Comitter:
- Ladon
- Date:
- Fri Aug 02 05:59:09 2019 +0000
- Parent:
- 5:3ee6e0113b41
- Child:
- 7:d93dcab712f1
- Commit message:
- Minor code change.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Aug 02 05:19:08 2019 +0000
+++ b/main.cpp Fri Aug 02 05:59:09 2019 +0000
@@ -109,8 +109,8 @@
inline void interrupt_enable ()
{
// NVIC_SetPriority(TIM2_IRQn, 250);
+ NVIC_SetVector(TIM2_IRQn, (uint32_t) interrupt_handler);
NVIC_EnableIRQ(TIM2_IRQn);
- NVIC_SetVector(TIM2_IRQn, (uint32_t) interrupt_handler);
// ^Definition of NVIC_SetVector() : https://arm-software.github.io/CMSIS_5/Core/html/group__NVIC__gr.html#gab43c1c59d5c081f1bc725237f4b1f916.
// -
}
Spyros Papanastasiou