buzz
2.0.0.0
|
Functions | |
void | buzz_cfg_setup (buzz_cfg_t *cfg) |
Config Object Initialization function. More... | |
BUZZ_RETVAL | buzz_init (buzz_t *ctx, buzz_cfg_t *cfg) |
Initialization function. More... | |
void | buzz_play_sound (buzz_t *ctx, uint16_t freq, uint16_t level, uint16_t duration) |
Play sound function. More... | |
void | buzz_set_duty_cycle (buzz_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. More... | |
void | buzz_pwm_stop (buzz_t *ctx) |
Stop PWM module. More... | |
void | buzz_pwm_start (buzz_t *ctx) |
Start PWM module. More... | |
void buzz_cfg_setup | ( | buzz_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
BUZZ_RETVAL buzz_init | ( | buzz_t * | ctx, |
buzz_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void buzz_play_sound | ( | buzz_t * | ctx, |
uint16_t | freq, | ||
uint16_t | level, | ||
uint16_t | duration | ||
) |
Play sound function.
ctx | Click object. |
freq | Buzz sound frequency. |
level | Buzz sound level. ( min = 1, max = 1000 ) |
duration | Buzz sound duration in miliseconds. |
@description This function plays sound on buzzer.
void buzz_pwm_start | ( | buzz_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void buzz_pwm_stop | ( | buzz_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
void buzz_set_duty_cycle | ( | buzz_t * | ctx, |
float | duty_cycle | ||
) |
Generic sets PWM duty cycle.
ctx | Click object. |
duty_cycle | Duty cycle. |
@description This function sets the PWM duty cycle.