powermux2 2.0.0.0
Power MUX 2 Click Driver

API for configuring and manipulating Power MUX 2 Click driver. More...

Functions

void powermux2_cfg_setup (powermux2_cfg_t *cfg)
 Power MUX 2 configuration object setup function.
 
err_t powermux2_init (powermux2_t *ctx, powermux2_cfg_t *cfg)
 Power MUX 2 initialization function.
 
err_t powermux2_generic_write (powermux2_t *ctx, uint8_t data_in)
 Power MUX 2 data writing function.
 
err_t powermux2_set_resistance (powermux2_t *ctx, float resistance)
 Power MUX 2 set resistance function.
 

Detailed Description

API for configuring and manipulating Power MUX 2 Click driver.

Function Documentation

◆ powermux2_cfg_setup()

void powermux2_cfg_setup ( powermux2_cfg_t * cfg)

Power MUX 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ powermux2_generic_write()

err_t powermux2_generic_write ( powermux2_t * ctx,
uint8_t data_in )

Power MUX 2 data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See powermux2_t object definition for detailed explanation.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ powermux2_init()

err_t powermux2_init ( powermux2_t * ctx,
powermux2_cfg_t * cfg )

Power MUX 2 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See powermux2_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See powermux2_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ powermux2_set_resistance()

err_t powermux2_set_resistance ( powermux2_t * ctx,
float resistance )

Power MUX 2 set resistance function.

This function set resistance for the desired current limit of the TPS212x 2.8-V to 22-V Priority Power MUX with Seamless Switchover on the the Power MUX 2 click boardâ„¢.

Parameters
[in]ctx: Click context object. See powermux2_t object definition for detailed explanation.
[in]resistance: Resistance [ kOhm ] from 18 kOhm to 100 kOhm.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.