X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_beep_stm.c;h=4db03a5b4a41b95de41c573ec5aafa1584c97522;hb=7b40813fdafce4ebd635aceb4c32355339a4d98d;hp=2bcd684909af1fccfe843fd9655dee4e586d53e0;hpb=873f511173c637016b5e173813bd03c1725797bb;p=fw%2Faltos diff --git a/src/stm/ao_beep_stm.c b/src/stm/ao_beep_stm.c index 2bcd6849..4db03a5b 100644 --- a/src/stm/ao_beep_stm.c +++ b/src/stm/ao_beep_stm.c @@ -40,9 +40,9 @@ ao_beep(uint8_t beep) { if (beep == 0) { stm_beeper.cr1 = 0; - stm_rcc.apb1enr &= ~(1 << RCC_BEEPER); + stm_rcc.apb1enr &= ~(1UL << RCC_BEEPER); } else { - stm_rcc.apb1enr |= (1 << RCC_BEEPER); + stm_rcc.apb1enr |= (1UL << RCC_BEEPER); stm_beeper.cr2 = ((0 << STM_TIM234_CR2_TI1S) | (STM_TIM234_CR2_MMS_RESET << STM_TIM234_CR2_MMS) | @@ -148,7 +148,7 @@ ao_beep(uint8_t beep) } void -ao_beep_for(uint8_t beep, uint16_t ticks) +ao_beep_for(uint8_t beep, AO_TICK_TYPE ticks) { ao_beep(beep); ao_delay(ticks); @@ -162,5 +162,5 @@ ao_beep_init(void) stm_afr_set(BEEPER_PORT, BEEPER_PIN, BEEPER_AFR); /* Leave the timer off until requested */ - stm_rcc.apb1enr &= ~(1 << RCC_BEEPER); + stm_rcc.apb1enr &= ~(1UL << RCC_BEEPER); }