button2
2.1.0.0
|
API for configuring and manipulating Button 2 Click driver. More...
Modules | |
Button 2 Settings | |
Settings of Button 2 Click driver. | |
Button 2 MikroBUS Map | |
MikroBUS pin mapping of Button 2 Click driver. | |
Functions | |
void | button2_cfg_setup (button2_cfg_t *cfg) |
Button 2 configuration object setup function. More... | |
err_t | button2_init (button2_t *ctx, button2_cfg_t *cfg) |
Button 2 initialization function. More... | |
void | button2_enable_led (button2_t *ctx) |
Button 2 enable led function. More... | |
void | button2_disable_led (button2_t *ctx) |
Button 2 disable led function. More... | |
void | button2_toggle_led (button2_t *ctx) |
Button 2 toggle led function. More... | |
uint8_t | button2_get_int_pin (button2_t *ctx) |
Button 2 get int pin function. More... | |
API for configuring and manipulating Button 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void button2_cfg_setup | ( | button2_cfg_t * | cfg | ) |
Button 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See button2_cfg_t object definition for detailed explanation. |
void button2_disable_led | ( | button2_t * | ctx | ) |
Button 2 disable led function.
This function disables button LED by setting the LED pin to the low logic state.
[in] | ctx | : Click context object. See button2_t object definition for detailed explanation. |
void button2_enable_led | ( | button2_t * | ctx | ) |
Button 2 enable led function.
This function enables button LED by setting the LED pin to the high logic state.
[in] | ctx | : Click context object. See button2_t object definition for detailed explanation. |
uint8_t button2_get_int_pin | ( | button2_t * | ctx | ) |
Button 2 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See button2_t object definition for detailed explanation. |
0
- Button pressed, 1
- Button released. err_t button2_init | ( | button2_t * | ctx, |
button2_cfg_t * | cfg | ||
) |
Button 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See button2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See button2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.