buttonplay
2.0.0.0
|
API for configuring and manipulating Button Play Click driver. More...
Modules | |
Button Play PWM Settings | |
Settings for configuration of Button Play Click driver. | |
Button Play MikroBUS Map | |
MikroBUS pin mapping of Button Play Click driver. | |
Buttonplay_cfg | |
Functions | |
void | buttonplay_cfg_setup (buttonplay_cfg_t *cfg) |
Button Play configuration object setup function. More... | |
err_t | buttonplay_init (buttonplay_t *ctx, buttonplay_cfg_t *cfg) |
Button Play initialization function. More... | |
err_t | buttonplay_set_duty_cycle (buttonplay_t *ctx, float duty_cycle) |
Button Play sets PWM duty cycle. More... | |
err_t | buttonplay_pwm_stop (buttonplay_t *ctx) |
Button Play stop PWM module. More... | |
err_t | buttonplay_pwm_start (buttonplay_t *ctx) |
Button Play start PWM module. More... | |
uint8_t | buttonplay_get_button_state (buttonplay_t *ctx) |
Button Play get button state function. More... | |
API for configuring and manipulating Button Play Click driver.
void buttonplay_cfg_setup | ( | buttonplay_cfg_t * | cfg | ) |
Button Play configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See buttonplay_cfg_t object definition for detailed explanation. |
uint8_t buttonplay_get_button_state | ( | buttonplay_t * | ctx | ) |
Button Play get button state function.
This function reads the digital signal from the INT pin which tells us whether the button has been pressed or not.
[out] | ctx | : Click context object. See buttonplay_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t buttonplay_init | ( | buttonplay_t * | ctx, |
buttonplay_cfg_t * | cfg | ||
) |
Button Play initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See buttonplay_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See buttonplay_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t buttonplay_pwm_start | ( | buttonplay_t * | ctx | ) |
Button Play start PWM module.
This function starts the PWM moudle output.
[out] | ctx | : Click context object. See buttonplay_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t buttonplay_pwm_stop | ( | buttonplay_t * | ctx | ) |
Button Play stop PWM module.
This function stops the PWM moudle output.
[out] | ctx | : Click context object. See buttonplay_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t buttonplay_set_duty_cycle | ( | buttonplay_t * | ctx, |
float | duty_cycle | ||
) |
Button Play sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[out] | ctx | : Click context object. See buttonplay_t object definition for detailed explanation. |
[in] | duty_ratio | : PWM duty_ratio. |
0
- Success, -1
- Error.