X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_profile.h;h=fcbba45dd79910289db12503a710a8394a369866;hb=HEAD;hp=3bf8c0b036cbe182abc344ad8dab02ee31d3e332;hpb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;p=fw%2Faltos diff --git a/src/stm/ao_profile.h b/src/stm/ao_profile.h index 3bf8c0b0..fcbba45d 100644 --- a/src/stm/ao_profile.h +++ b/src/stm/ao_profile.h @@ -19,15 +19,15 @@ #ifndef _AO_PROFILE_H_ #define _AO_PROFILE_H_ -void ao_profile_init(); +void ao_profile_init(void); static inline uint32_t ao_profile_tick(void) { uint16_t hi, lo, second_hi; do { - hi = stm_tim2.cnt; - lo = stm_tim4.cnt; - second_hi = stm_tim2.cnt; + hi = (uint16_t) stm_tim2.cnt; + lo = (uint16_t) stm_tim4.cnt; + second_hi = (uint16_t) stm_tim2.cnt; } while (hi != second_hi); return ((uint32_t) hi << 16) | lo; }