|
powermux2 2.2.0
|
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. | |
API for configuring and manipulating Power MUX 2 Click driver.
| void powermux2_cfg_setup | ( | powermux2_cfg_t * | cfg | ) |
Power MUX 2 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See powermux2_cfg_t object definition for detailed explanation. |
| 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.
| [in] | ctx | : Click context object. See powermux2_t object definition for detailed explanation. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error.| 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.
| [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. |
0 - Success, -1 - Error.| 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â„¢.
| [in] | ctx | : Click context object. See powermux2_t object definition for detailed explanation. |
| [in] | resistance | : Resistance [ kOhm ] from 18 kOhm to 100 kOhm. |
0 - Success, -1 - Error.