*/
#include "ao.h"
+#include "ao_beep.h"
#if BEEPER_TIMER == 2
#define stm_beeper stm_tim2
{
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) |
}
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);
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);
}