diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-12-04 20:34:20 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-12-04 20:34:20 -0700 |
commit | 83deae717de8b940b0cb04d1d1989b0a4c250e35 (patch) | |
tree | 87887464200b091cb8737ce9123ad84d296bc0ca /include/kern/systick/systick_manager.h | |
parent | 9e349913f728e47e09852a20a7e16c405d30cd7b (diff) | |
download | stm32l4-83deae717de8b940b0cb04d1d1989b0a4c250e35.tar.gz stm32l4-83deae717de8b940b0cb04d1d1989b0a4c250e35.tar.bz2 stm32l4-83deae717de8b940b0cb04d1d1989b0a4c250e35.zip |
Add systick/...
Diffstat (limited to 'include/kern/systick/systick_manager.h')
-rw-r--r-- | include/kern/systick/systick_manager.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/kern/systick/systick_manager.h b/include/kern/systick/systick_manager.h new file mode 100644 index 0000000..e46fffb --- /dev/null +++ b/include/kern/systick/systick_manager.h @@ -0,0 +1,25 @@ +#ifndef KERN_SYSTICK_SYSTICK_MANAGER_H_ +#define KERN_SYSTICK_SYSTICK_MANAGER_H_ + +#include "kern/common.h" + +/* + * Enable the systick timer. + * + * The systick counter counts down from the counter. When the counter + * hits 0, an interrupt is and the callbacks are fired. + */ +void enable_systick(uint32_t systick_counter); + +/* + * Disables the systick timer. + */ +void disable_systick(); + +/* + * Add a callback to the systick system. These callbacks will + * be callled when the interrupt is raised. + */ +void systick_add_callback(void(*callback)(void*), void* arg); + +#endif /* KERN_SYSTICK_SYSTICK_MANAGER_H_ */ |