powermux 2.0.0.0
Power MUX Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ powermux_cfg_setup()

void powermux_cfg_setup ( powermux_cfg_t * cfg)

Power MUX configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See powermux_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ powermux_default_cfg()

void powermux_default_cfg ( powermux_t * ctx)

Power MUX default configuration function.

This function executes a default configuration of Power MUX click board.

Parameters
[in]ctx: Click context object. See powermux_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ powermux_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ powermux_int_pin_read()

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.

Parameters
[in]ctx: Click context object. See powermux_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.

◆ powermux_set_mode()

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.

Parameters
[in]ctx: Click context object. See powermux_t object definition for detailed explanation.
[in]mode: Operating mode.
Returns
Nothing.