48 static uint8_t buzzer_on;
49 LPM_MODULE(buzzer_module, NULL, NULL, NULL, LPM_DOMAIN_PERIPH);
69 ti_lib_prcm_peripheral_run_enable(PRCM_PERIPH_TIMER0);
70 ti_lib_prcm_peripheral_sleep_enable(PRCM_PERIPH_TIMER0);
71 ti_lib_prcm_peripheral_deep_sleep_enable(PRCM_PERIPH_TIMER0);
72 ti_lib_prcm_load_set();
73 while(!ti_lib_prcm_load_get());
80 HWREG(GPT0_BASE + GPT_O_TAMR) = (TIMER_CFG_A_PWM & 0xFF) | GPT_TAMR_TAPWMIE;
92 ti_lib_timer_disable(GPT0_BASE, TIMER_A);
95 load = (GET_MCU_CLOCK / freq);
97 ti_lib_timer_load_set(GPT0_BASE, TIMER_A, load);
98 ti_lib_timer_match_set(GPT0_BASE, TIMER_A, load / 2);
101 ti_lib_timer_enable(GPT0_BASE, TIMER_A);
118 ti_lib_timer_disable(GPT0_BASE, TIMER_A);
132 ti_lib_prcm_peripheral_run_disable(PRCM_PERIPH_TIMER0);
133 ti_lib_prcm_peripheral_sleep_disable(PRCM_PERIPH_TIMER0);
134 ti_lib_prcm_peripheral_deep_sleep_disable(PRCM_PERIPH_TIMER0);
135 ti_lib_prcm_load_set();
136 while(!ti_lib_prcm_load_get());
Header file with macros which rename TI CC26xxware functions.
void buzzer_stop()
Stop the buzzer.
Header file for the Sensortag Buzzer.
uint8_t buzzer_state()
Retrieve the buzzer state.
bool buzzer_init()
Initialise the buzzer.
#define BOARD_IOID_BUZZER
Buzzer Pin.
bool buzzer_start(uint32_t freq)
Start the buzzer.
#define LPM_MODULE(n, m, s, w, l)
Declare a variable to be used in order to get notifications from LPM.
void lpm_unregister_module(lpm_registered_module_t *module)
Unregister a module from LPM notifications.
void lpm_register_module(lpm_registered_module_t *module)
Register a module for LPM notifications.