diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-12-07 13:58:46 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-12-07 13:58:46 -0700 |
commit | 546a5ccdba66dd8d8c19ce6d8486f46c84637cf2 (patch) | |
tree | 95b52da91414c1bfbad745c6b55617011012813e /include/systick.h | |
parent | 9182b65ae2045c5087257751d30409deecf9520a (diff) | |
download | ch573-546a5ccdba66dd8d8c19ce6d8486f46c84637cf2.tar.gz ch573-546a5ccdba66dd8d8c19ce6d8486f46c84637cf2.tar.bz2 ch573-546a5ccdba66dd8d8c19ce6d8486f46c84637cf2.zip |
Add way to toggle the default pattern and a way to switch the pattern.
Diffstat (limited to 'include/systick.h')
-rw-r--r-- | include/systick.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/systick.h b/include/systick.h index 285b9b8..09c69ec 100644 --- a/include/systick.h +++ b/include/systick.h @@ -10,9 +10,16 @@ uint64_t get_systick(); int systick_interrupt(); + +#define PASTER(x, y) x##y +#define CONCAT(x, y) PASTER(x, y) + #define On_SysTick() \ static void __local_on_systick__(void); \ __attribute__(( \ __section__(".systick_callbacks"))) static volatile systick_cb_t \ - __FILE__##__LINE__ = __local_on_systick__; \ + __systick__position = __local_on_systick__; \ static void __local_on_systick__() + +#undef PASTER +#undef CONCAT |