currentlimit10 2.1.0.0
|
API for configuring and manipulating Current Limit 10 Click driver. More...
Topics | |
Current Limit 10 Registers List | |
List of registers of Current Limit 10 Click driver. | |
Current Limit 10 Registers Settings | |
Settings for registers of Current Limit 10 Click driver. | |
Current Limit 10 MikroBUS Map | |
MikroBUS pin mapping of Current Limit 10 Click driver. | |
Functions | |
void | currentlimit10_cfg_setup (currentlimit10_cfg_t *cfg) |
Current Limit 10 configuration object setup function. | |
err_t | currentlimit10_init (currentlimit10_t *ctx, currentlimit10_cfg_t *cfg) |
Current Limit 10 initialization function. | |
err_t | currentlimit10_default_cfg (currentlimit10_t *ctx) |
Current Limit 10 default configuration function. | |
void | currentlimit10_enable (currentlimit10_t *ctx) |
Current Limit 10 enable the device function. | |
void | currentlimit10_disable (currentlimit10_t *ctx) |
Current Limit 10 disable the device function. | |
err_t | currentlimit10_write_data (currentlimit10_t *ctx, uint8_t cmd, uint8_t data_in) |
Current Limit 10 I2C writing function. | |
err_t | currentlimit10_set_wiper_pos (currentlimit10_t *ctx, uint8_t wiper_pos) |
Current Limit 10 sets the wiper position function. | |
err_t | currentlimit10_set_resistance (currentlimit10_t *ctx, float res_kohm) |
Current Limit 10 sets the resistance function. | |
err_t | currentlimit10_set_limit (currentlimit10_t *ctx, float current_limit) |
Current Limit 10 sets the current limit function. | |
uint8_t | currentlimit10_get_fault (currentlimit10_t *ctx) |
Current Limit 10 get the fault flag function. | |
API for configuring and manipulating Current Limit 10 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void currentlimit10_cfg_setup | ( | currentlimit10_cfg_t * | cfg | ) |
Current Limit 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See currentlimit10_cfg_t object definition for detailed explanation. |
err_t currentlimit10_default_cfg | ( | currentlimit10_t * | ctx | ) |
Current Limit 10 default configuration function.
This function executes a default configuration of Current Limit 10 click board.
[in] | ctx | : Click context object. See currentlimit10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void currentlimit10_disable | ( | currentlimit10_t * | ctx | ) |
Current Limit 10 disable the device function.
This function turns off power switch and disable of the HS2950P, 29V 5A Load Protection HotSwitch with Adjustable OVP, OCP and SS on the Current Limit 10 Click board.
[in] | ctx | : Click context object. See currentlimit10_t object definition for detailed explanation. |
void currentlimit10_enable | ( | currentlimit10_t * | ctx | ) |
Current Limit 10 enable the device function.
This function turns on the power switch and enables the internal MOSFET of the HS2950P, 29V 5A Load Protection HotSwitch with Adjustable OVP, OCP and SS on the Current Limit 10 Click board.
[in] | ctx | : Click context object. See currentlimit10_t object definition for detailed explanation. |
uint8_t currentlimit10_get_fault | ( | currentlimit10_t * | ctx | ) |
Current Limit 10 get the fault flag function.
This function gets the state of the fault flag to indicate overcurrent, overtemperature, or reverse-voltage conditions of the HS2950P, 29V 5A Load Protection HotSwitch with Adjustable OVP, OCP and SS on the Current Limit 10 Click board.
[in] | ctx | : Click context object. See currentlimit10_t object definition for detailed explanation. |
[in] | current_limit | : Current limit [0.5mA-5.5mA] |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit10_init | ( | currentlimit10_t * | ctx, |
currentlimit10_cfg_t * | cfg ) |
Current Limit 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See currentlimit10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See currentlimit10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit10_set_limit | ( | currentlimit10_t * | ctx, |
float | current_limit ) |
Current Limit 10 sets the current limit function.
This function sets the desired current limit threshold using the I2C serial interface.
[in] | ctx | : Click context object. See currentlimit10_t object definition for detailed explanation. |
[in] | current_limit | : Current limit [0.5mA-5.5mA] |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t currentlimit10_set_resistance | ( | currentlimit10_t * | ctx, |
float | res_kohm ) |
Current Limit 10 sets the resistance function.
This function sets the resistance of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the Current Limit 10 Click board.
[in] | ctx | : Click context object. See currentlimit10_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 currentlimit10_set_wiper_pos | ( | currentlimit10_t * | ctx, |
uint8_t | wiper_pos ) |
Current Limit 10 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 10 Click board.
[in] | ctx | : Click context object. See currentlimit10_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 currentlimit10_write_data | ( | currentlimit10_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | data_in ) |
Current Limit 10 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 currentlimit10_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.