currentlimit7 2.0.0.0
|
API for configuring and manipulating Current Limit 7 Click driver. More...
Topics | |
Current Limit 7 Registers List | |
List of registers of Current Limit 7 Click driver. | |
Current Limit 7 Registers Settings | |
Settings for registers of Current Limit 7 Click driver. | |
Current Limit 7 MikroBUS Map | |
MikroBUS pin mapping of Current Limit 7 Click driver. | |
Currentlimit7_cmd | |
Functions | |
void | currentlimit7_cfg_setup (currentlimit7_cfg_t *cfg) |
Current Limit 7 configuration object setup function. | |
err_t | currentlimit7_init (currentlimit7_t *ctx, currentlimit7_cfg_t *cfg) |
Current Limit 7 initialization function. | |
err_t | currentlimit7_default_cfg (currentlimit7_t *ctx) |
Current Limit 7 default configuration function. | |
err_t | currentlimit7_set_slave_address (currentlimit7_t *ctx, uint16_t slave_address) |
Current Limit 7 set I2C Slave address. | |
err_t | currentlimit7_hw_reset (currentlimit7_t *ctx) |
Current Limit 7 hardware reset function. | |
err_t | currentlimit7_set_enable (currentlimit7_t *ctx) |
Current Limit 7 enable the device function. | |
err_t | currentlimit7_set_disable (currentlimit7_t *ctx) |
Current Limit 7 disable the device function. | |
err_t | currentlimit7_generic_write (currentlimit7_t *ctx, uint8_t cmd, uint16_t data_byte) |
Current Limit 7 I2C writing function. | |
err_t | currentlimit7_generic_read (currentlimit7_t *ctx, uint8_t cmd, uint16_t data_byte, uint16_t *data_out) |
Current Limit 7 I2C reading function. | |
err_t | currentlimit7_enable_write (currentlimit7_t *ctx) |
Current Limit 7 enable write function. | |
err_t | currentlimit7_write_rdac (currentlimit7_t *ctx, uint16_t data_in) |
Current Limit 7 write RDAC function. | |
err_t | currentlimit7_read_rdac (currentlimit7_t *ctx, uint16_t *data_out) |
Current Limit 7 read RDAC function. | |
err_t | currentlimit7_sw_reset (currentlimit7_t *ctx) |
Current Limit 7 software reset function. | |
err_t | currentlimit7_store_wiper (currentlimit7_t *ctx) |
Current Limit 7 store wiper function. | |
err_t | currentlimit7_next_frame_read (currentlimit7_t *ctx, uint8_t wiper_location, uint16_t *data_out) |
Current Limit 7 next frame read function. | |
err_t | currentlimit7_read_memory (currentlimit7_t *ctx, uint8_t wiper_location, uint16_t *data_out) |
Current Limit 7 read memory function. | |
err_t | currentlimit7_operating_mode (currentlimit7_t *ctx, uint8_t mode) |
Current Limit 7 set operating mode function. | |
err_t | currentlimit7_set_digi_pot (currentlimit7_t *ctx, uint16_t wiper_pos) |
Current Limit 7 set DIGI POT function. | |
err_t | currentlimit7_set_resistance (currentlimit7_t *ctx, uint32_t res_ohm) |
Current Limit 7 set resistance function. | |
err_t | currentlimit7_set_current_limit (currentlimit7_t *ctx, uint8_t op_mode, uint16_t current_limit_ma) |
Current Limit 7 set current limit function. | |
uint8_t | currentlimit7_get_fault (currentlimit7_t *ctx) |
Current Limit 7 get fault function. | |
API for configuring and manipulating Current Limit 7 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void currentlimit7_cfg_setup | ( | currentlimit7_cfg_t * | cfg | ) |
Current Limit 7 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See currentlimit7_cfg_t object definition for detailed explanation. |
err_t currentlimit7_default_cfg | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 default configuration function.
This function executes a default configuration of Current Limit 7 click board.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_enable_write | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 enable write function.
This function set command enable write of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_generic_read | ( | currentlimit7_t * | ctx, |
uint8_t | cmd, | ||
uint16_t | data_byte, | ||
uint16_t * | data_out ) |
Current Limit 7 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | cmd | : Command. |
[in] | data_byte | : Data to be written. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t currentlimit7_generic_write | ( | currentlimit7_t * | ctx, |
uint8_t | cmd, | ||
uint16_t | data_byte ) |
Current Limit 7 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | cmd | : Command. |
[in] | data_byte | : Data to be written. |
0
- Success, -1
- Error.uint8_t currentlimit7_get_fault | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 get fault function.
This function get state of the FLT ( INT ) pin of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Overload fault duration exceeds the blanking time, reverse current is detected, thermal shutdown mode is active. 1
- Ok.err_t currentlimit7_hw_reset | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 hardware reset function.
This function performs the hardware reset of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_init | ( | currentlimit7_t * | ctx, |
currentlimit7_cfg_t * | cfg ) |
Current Limit 7 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See currentlimit7_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_next_frame_read | ( | currentlimit7_t * | ctx, |
uint8_t | wiper_location, | ||
uint16_t * | data_out ) |
Current Limit 7 next frame read function.
This function next frame read of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | wiper_location | : Wiper location ( from 0x00 to the 0x38 ). |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t currentlimit7_operating_mode | ( | currentlimit7_t * | ctx, |
uint8_t | mode ) |
Current Limit 7 set operating mode function.
This function select operating mode, Shutdown or Normal mode of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | mode | : Operating mode: Shutdown or Normal mode. |
0
- Success, -1
- Error.err_t currentlimit7_read_memory | ( | currentlimit7_t * | ctx, |
uint8_t | wiper_location, | ||
uint16_t * | data_out ) |
Current Limit 7 read memory function.
This function read memory of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | wiper_location | : Wiper location ( from 0x00 to the 0x38 ). |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t currentlimit7_read_rdac | ( | currentlimit7_t * | ctx, |
uint16_t * | data_out ) |
Current Limit 7 read RDAC function.
This function read a 10-bit RDAC of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t currentlimit7_set_current_limit | ( | currentlimit7_t * | ctx, |
uint8_t | op_mode, | ||
uint16_t | current_limit_ma ) |
Current Limit 7 set current limit function.
This function set current limit of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | op_mode | : Operating mode:
|
[in] | current_limit_ma | : current limit [ mA ]. |
0
- Success, -1
- Error.err_t currentlimit7_set_digi_pot | ( | currentlimit7_t * | ctx, |
uint16_t | wiper_pos ) |
Current Limit 7 set DIGI POT function.
This function set DIGI POT wiper position of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | wiper_pos | : Wiper position ( from 0 to 2047 ). |
0
- Success, -1
- Error.err_t currentlimit7_set_disable | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 disable the device function.
This function enable the MAX14575,
250mA to 2.5A Adjustable Current-Limit Switches on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_set_enable | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 enable the device function.
This function enable the MAX14575,
250mA to 2.5A Adjustable Current-Limit Switches on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_set_resistance | ( | currentlimit7_t * | ctx, |
uint32_t | res_ohm ) |
Current Limit 7 set resistance function.
This function set resistance of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | res_ohm | : Resistance [ Ohm ]. |
0
- Success, -1
- Error.err_t currentlimit7_set_slave_address | ( | currentlimit7_t * | ctx, |
uint16_t | slave_address ) |
Current Limit 7 set I2C Slave address.
Sets I2C address of the subordinate I2C device to slave_address
which is targeted by read and write operations.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
[in] | slave_address | Specified I2C slave address. |
0
- Success, -1
- Error.err_t currentlimit7_store_wiper | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 store wiper function.
This function store wiper setting, store RDAC setting to 50-TP of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_sw_reset | ( | currentlimit7_t * | ctx | ) |
Current Limit 7 software reset function.
This function performs the software reset of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t currentlimit7_write_rdac | ( | currentlimit7_t * | ctx, |
uint16_t | data_in ) |
Current Limit 7 write RDAC function.
This function writes a 10-bit RDAC of the selected AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the Current Limit 7 Click board™.
[in] | data_in | : 10-bit RDAC data. |
[in] | ctx | : Click context object. See currentlimit7_t object definition for detailed explanation. |
0
- Success, -1
- Error.