X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstm%2Fao_profile.h;fp=src%2Fstm%2Fao_profile.h;h=fcbba45dd79910289db12503a710a8394a369866;hp=68aac0019c3c5f052eddd946ea35a3fac7e17198;hb=c49bd3cb0c31a51fae79ddc92237cc309be9a242;hpb=d225adc3af9e5726d436cbbdbf8dcc5837e50804 diff --git a/src/stm/ao_profile.h b/src/stm/ao_profile.h index 68aac001..fcbba45d 100644 --- a/src/stm/ao_profile.h +++ b/src/stm/ao_profile.h @@ -25,9 +25,9 @@ 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; }