powermux 2.0.0.0
|
API for configuring and manipulating Power MUX Click driver. More...
Topics | |
Power MUX Registers Settings | |
Settings for registers of Power MUX Click driver. | |
Power MUX MikroBUS Map | |
MikroBUS pin mapping of Power MUX Click driver. | |
Functions | |
void | powermux_cfg_setup (powermux_cfg_t *cfg) |
Power MUX configuration object setup function. | |
err_t | powermux_init (powermux_t *ctx, powermux_cfg_t *cfg) |
Power MUX initialization function. | |
void | powermux_default_cfg (powermux_t *ctx) |
Power MUX default configuration function. | |
uint8_t | powermux_int_pin_read (powermux_t *ctx) |
Power MUX pin reading function. | |
void | powermux_set_mode (powermux_t *ctx, uint8_t mode) |
Power MUX mode set function. | |
API for configuring and manipulating Power MUX Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void powermux_cfg_setup | ( | powermux_cfg_t * | cfg | ) |
Power MUX configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See powermux_cfg_t object definition for detailed explanation. |
void powermux_default_cfg | ( | powermux_t * | ctx | ) |
Power MUX default configuration function.
This function executes a default configuration of Power MUX click board.
[in] | ctx | : Click context object. See powermux_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t powermux_init | ( | powermux_t * | ctx, |
powermux_cfg_t * | cfg ) |
Power MUX initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See powermux_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See powermux_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t powermux_int_pin_read | ( | powermux_t * | ctx | ) |
Power MUX pin reading function.
This function reads the state of the INT pin of Power MUX click board.
[in] | ctx | : Click context object. See powermux_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. void powermux_set_mode | ( | powermux_t * | ctx, |
uint8_t | mode ) |
Power MUX mode set function.
This function sets operating mode of Power MUX click board.
[in] | ctx | : Click context object. See powermux_t object definition for detailed explanation. |
[in] | mode | : Operating mode. |