efuse2 2.0.0.0
|
API for configuring and manipulating eFuse 2 Click driver. More...
Topics | |
eFuse 2 Registers Settings | |
Settings for registers of eFuse 2 Click driver. | |
eFuse 2 MikroBUS Map | |
MikroBUS pin mapping of eFuse 2 Click driver. | |
Functions | |
void | efuse2_cfg_setup (efuse2_cfg_t *cfg) |
eFuse 2 configuration object setup function. | |
err_t | efuse2_init (efuse2_t *ctx, efuse2_cfg_t *cfg) |
eFuse 2 initialization function. | |
err_t | efuse2_default_cfg (efuse2_t *ctx) |
eFuse 2 default configuration function. | |
err_t | efuse2_write_ad5241 (efuse2_t *ctx, ad5241_instru_t cmd, uint8_t data_byte) |
Generic write data to the AD5241 function. | |
uint8_t | efuse2_read_ad5241 (efuse2_t *ctx) |
Generic read data from the AD5241 function. | |
void | efuse2_hw_reset (efuse2_t *ctx) |
Hardware reset function. | |
err_t | efuse2_set_operating_voltage (efuse2_t *ctx, float voltage, float *min_voltage, float *max_voltage) |
Set operating voltage function. | |
err_t | efuse2_write_ad5175 (efuse2_t *ctx, uint8_t cmd, uint16_t data_byte) |
Generic write data to the AD5175 function. | |
uint16_t | efuse2_read_ad5175 (efuse2_t *ctx, uint8_t cmd, uint8_t wiper_location) |
Generic read data from the AD5175 function. | |
uint16_t | efuse2_read_rdac (efuse2_t *ctx) |
Read RDAC function. | |
err_t | efuse2_enable_write (efuse2_t *ctx) |
Enable write function. | |
err_t | efuse2_write_rdac (efuse2_t *ctx, uint16_t data_byte) |
Write RDAC function. | |
err_t | efuse2_set_current_limit (efuse2_t *ctx, float current) |
Set operating current function. | |
err_t | efuse2_sw_reset (efuse2_t *ctx) |
Software reset function. | |
err_t | efuse2_store_wiper (efuse2_t *ctx) |
Store wiper setting function. | |
err_t | efuse2_operating_mode (efuse2_t *ctx, uint8_t mode) |
Set operating mode function. | |
uint16_t | efuse2_next_frame_read (efuse2_t *ctx, uint8_t wiper_location) |
Next frame read function. | |
uint16_t | efuse2_read_memory (efuse2_t *ctx) |
Read memory function. | |
uint8_t | efuse2_read_control (efuse2_t *ctx) |
Read control register function. | |
uint8_t | efuse2_get_fault (efuse2_t *ctx) |
Get fault function. | |
API for configuring and manipulating eFuse 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void efuse2_cfg_setup | ( | efuse2_cfg_t * | cfg | ) |
eFuse 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See efuse2_cfg_t object definition for detailed explanation. |
err_t efuse2_default_cfg | ( | efuse2_t * | ctx | ) |
eFuse 2 default configuration function.
This function executes a default configuration of eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_enable_write | ( | efuse2_t * | ctx | ) |
Enable write function.
The function enable write of the AD5175 Single-Channel, 1024-Position, Digital Rheostat with I2C Interface and 50-TP Memory on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t efuse2_get_fault | ( | efuse2_t * | ctx | ) |
Get fault function.
The function get state of the FLT ( INT ) pin, active low indicator which will be pulled low when a fault is detected. It is an open-drain output that requires an external pull-up resistance of the TPS2596 2.7 to 19 V, 0.125 to 2-A, 89-mO eFuse With Accurate Current Monitor and Fast Overvoltage Protection on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
void efuse2_hw_reset | ( | efuse2_t * | ctx | ) |
Hardware reset function.
The function reset the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[out] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
err_t efuse2_init | ( | efuse2_t * | ctx, |
efuse2_cfg_t * | cfg ) |
eFuse 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See efuse2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint16_t efuse2_next_frame_read | ( | efuse2_t * | ctx, |
uint8_t | wiper_location ) |
Next frame read function.
The function next frame read of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | wiper_location | : Wiper location ( from 0x00 to the 0x38 ). |
err_t efuse2_operating_mode | ( | efuse2_t * | ctx, |
uint8_t | mode ) |
Set operating mode function.
The function set operating mode of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | mode | : Operation mode options |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint16_t efuse2_read_ad5175 | ( | efuse2_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | wiper_location ) |
Generic read data from the AD5175 function.
The function read a 10-bit data of the AD5175 Single-Channel, 1024-Position, Digital Rheostat with I2C Interface and 50-TP Memory on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | cmd | : Command Operation:
|
[in] | data_byte | : 10-bit data to be written. |
uint8_t efuse2_read_ad5241 | ( | efuse2_t * | ctx | ) |
Generic read data from the AD5241 function.
The function read a the byte of data from the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
uint8_t efuse2_read_control | ( | efuse2_t * | ctx | ) |
Read control register function.
The function read contents of the control register of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
0x01
( EFUSE2_AD5175_50T_PROGRAM_ENABLE ) : Enable device for 50-TP program. 0x02
( EFUSE2_AD5175_UPDATE_WIPER_POS ) : RDAC register write protect. 0x08
( EFUSE2_AD5175_FUSE_PROGRAM_UNSUCCESSFUL ) : Fuse program command successful. uint16_t efuse2_read_memory | ( | efuse2_t * | ctx | ) |
Read memory function.
The function read address of the last 50-TP programmed memory location of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
uint16_t efuse2_read_rdac | ( | efuse2_t * | ctx | ) |
Read RDAC function.
The function read a 10-bit RDAC data of the AD5175 Single-Channel, 1024-Position, Digital Rheostat with I2C Interface and 50-TP Memory on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
err_t efuse2_set_current_limit | ( | efuse2_t * | ctx, |
float | current ) |
Set operating current function.
The function set operating current of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | current | : Operating current ( from 0.125 A to the 2.0 A ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_set_operating_voltage | ( | efuse2_t * | ctx, |
float | voltage, | ||
float * | min_voltage, | ||
float * | max_voltage ) |
Set operating voltage function.
The function set operating voltage, OVLO and UVLO of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | voltage | : Operating voltage ( from 3.65 V to the 15.0 V ). |
[in] | min_voltage | : Pointer to the memory location where UVLO data is stored. |
[in] | max_voltage | : Pointer to the memory location where OVLO data is stored. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_store_wiper | ( | efuse2_t * | ctx | ) |
Store wiper setting function.
The function store wiper setting, store RDAC setting to 50-TP of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_sw_reset | ( | efuse2_t * | ctx | ) |
Software reset function.
The function software reset the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_write_ad5175 | ( | efuse2_t * | ctx, |
uint8_t | cmd, | ||
uint16_t | data_byte ) |
Generic write data to the AD5175 function.
The function writes a 10-bit data to the AD5175 Single-Channel, 1024-Position, Digital Rheostat with I2C Interface and 50-TP Memory on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | cmd | : Pointer to the memory location where data is stored. |
[in] | data_byte | : 10-bit data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_write_ad5241 | ( | efuse2_t * | ctx, |
ad5241_instru_t | cmd, | ||
uint8_t | data_byte ) |
Generic write data to the AD5241 function.
The function writes a the byte of data and instruction of the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
[in] | cmd | : Pointer to the memory location where data is stored. |
[in] | data_byte | : Byte of the data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t efuse2_write_rdac | ( | efuse2_t * | ctx, |
uint16_t | data_byte ) |
Write RDAC function.
The function writes a 10-bit RDAC data of the AD5175 Single-Channel, 1024-Position, Digital Rheostat with I2C Interface and 50-TP Memory on the eFuse 2 click board.
[in] | ctx | : Click context object. See efuse2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.