diff options
author | jaseg <git@jaseg.de> | 2021-03-18 10:11:41 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-03-18 10:12:15 +0100 |
commit | c67f7d626b76238e561304b53f31afdad7e2f671 (patch) | |
tree | c43e14871a10e055c5345810763ef6e254e8cb53 /prototype/fw/include/global.h | |
parent | df51e1c508b8226faaef233759ed1599fcf6b913 (diff) | |
download | ihsm-c67f7d626b76238e561304b53f31afdad7e2f671.tar.gz ihsm-c67f7d626b76238e561304b53f31afdad7e2f671.tar.bz2 ihsm-c67f7d626b76238e561304b53f31afdad7e2f671.zip |
fw: dump accelerometer measurements over uart
Diffstat (limited to 'prototype/fw/include/global.h')
-rw-r--r-- | prototype/fw/include/global.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/prototype/fw/include/global.h b/prototype/fw/include/global.h index d0c56d7..0af7e49 100644 --- a/prototype/fw/include/global.h +++ b/prototype/fw/include/global.h @@ -12,6 +12,8 @@ #include <generated/stm32_device.h> +#define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) + #define APB1_PRESC (1<<(APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1_Msk) >> RCC_CFGR_PPRE1_Pos])) #define APB2_PRESC (1<<(APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2_Msk) >> RCC_CFGR_PPRE2_Pos])) #define AHB_PRESC (1<<(AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE_Msk) >> RCC_CFGR_HPRE_Pos])) |