currentlimit9 2.1.0.0
|
API for configuring and manipulating Current Limit 9 Click driver. More...
Topics | |
Current Limit 9 Registers List | |
List of registers of Current Limit 9 Click driver. | |
Current Limit 9 Registers Settings | |
Settings for registers of Current Limit 9 Click driver. | |
Current Limit 9 MikroBUS Map | |
MikroBUS pin mapping of Current Limit 9 Click driver. | |
Functions | |
void | currentlimit9_cfg_setup (currentlimit9_cfg_t *cfg) |
Current Limit 9 configuration object setup function. | |
err_t | currentlimit9_init (currentlimit9_t *ctx, currentlimit9_cfg_t *cfg) |
Current Limit 9 initialization function. | |
err_t | currentlimit9_default_cfg (currentlimit9_t *ctx) |
Current Limit 9 default configuration function. | |
void | currentlimit9_enable (currentlimit9_t *ctx) |
Current Limit 9 enable the device function. | |
void | currentlimit9_disable (currentlimit9_t *ctx) |
Current Limit 9 disable the device function. | |
err_t | currentlimit9_write_data (currentlimit9_t *ctx, uint8_t cmd, uint8_t data_in) |
Current Limit 9 I2C writing function. | |
err_t | currentlimit9_set_wiper_pos (currentlimit9_t *ctx, uint8_t wiper_pos) |
Current Limit 9 sets the wiper position function. | |
err_t | currentlimit9_set_resistance (currentlimit9_t *ctx, float res_kohm) |
Current Limit 9 sets the resistance function. | |
err_t | currentlimit9_set_limit (currentlimit9_t *ctx, currentlimit9_limit_t current_limit) |
Current Limit 9 sets the current limit function. | |
uint8_t | currentlimit9_get_fault (currentlimit9_t *ctx) |
Current Limit 9 get the fault flag function. | |
API for configuring and manipulating Current Limit 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void currentlimit9_cfg_setup | ( | currentlimit9_cfg_t * | cfg | ) |
Current Limit 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See currentlimit9_cfg_t object definition for detailed explanation. |
err_t currentlimit9_default_cfg | ( | currentlimit9_t * | ctx | ) |
Current Limit 9 default configuration function.
This function executes a default configuration of Current Limit 9 click board.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void currentlimit9_disable | ( | currentlimit9_t * | ctx | ) |
Current Limit 9 disable the device function.
This function turns off power switch and disable the NPS4053, 5.5 V, 55 mOhm load switch with precision adjustable current limit on the Current Limit 9 Click board.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
void currentlimit9_enable | ( | currentlimit9_t * | ctx | ) |
Current Limit 9 enable the device function.
This function turns on the power switch and enables the current limit of the NPS4053, 5.5 V, 55 mOhm load switch with precision adjustable current limit on the Current Limit 9 Click board.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
uint8_t currentlimit9_get_fault | ( | currentlimit9_t * | ctx | ) |
Current Limit 9 get the fault flag function.
This function gets the state of the fault flag to indicate overcurrent, overtemperature, or reverse-voltage conditions of the NPS4053, 5.5 V, 55 mOhm load switch with precision adjustable current limit on the Current Limit 9 Click board.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
[in] | res_kohm | : Resistance [0-200kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit9_init | ( | currentlimit9_t * | ctx, |
currentlimit9_cfg_t * | cfg ) |
Current Limit 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See currentlimit9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit9_set_limit | ( | currentlimit9_t * | ctx, |
currentlimit9_limit_t | current_limit ) |
Current Limit 9 sets the current limit function.
This function sets the desired current limit threshold using the I2C serial interface.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
[in] | current_limit | : Current limit. See currentlimit9_limit_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit9_set_resistance | ( | currentlimit9_t * | ctx, |
float | res_kohm ) |
Current Limit 9 sets the resistance function.
This function sets the resistance of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the Current Limit 9 Click board.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
[in] | res_kohm | : Resistance [0-200kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit9_set_wiper_pos | ( | currentlimit9_t * | ctx, |
uint8_t | wiper_pos ) |
Current Limit 9 sets the wiper position function.
This function sets the wiper position of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the Current Limit 9 Click board.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
[in] | wiper_pos | : Wiper position [0-255]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit9_write_data | ( | currentlimit9_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | data_in ) |
Current Limit 9 I2C writing function.
This function writes the desired byte of data using the selected command using the I2C serial interface.
[in] | ctx | : Click context object. See currentlimit9_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.