digipot7 2.0.0.0
|
API for configuring and manipulating DIGI POT 7 Click driver. More...
Topics | |
DIGI POT 7 Registers Settings | |
Settings for registers of DIGI POT 7 Click driver. | |
DIGI POT 7 MikroBUS Map | |
MikroBUS pin mapping of DIGI POT 7 Click driver. | |
Functions | |
void | digipot7_cfg_setup (digipot7_cfg_t *cfg) |
DIGI POT 7 configuration object setup function. | |
err_t | digipot7_init (digipot7_t *ctx, digipot7_cfg_t *cfg) |
DIGI POT 7 initialization function. | |
void | digipot7_generic_write (digipot7_t *ctx, uint8_t cmd, uint16_t data_byte) |
DIGI POT 7 I2C writing function. | |
uint16_t | digipot7_generic_read (digipot7_t *ctx, uint8_t cmd, uint8_t wiper_pos) |
DIGI POT 7 I2C reading function. | |
void | digipot7_hw_reset (digipot7_t *ctx) |
Hardware reset function. | |
void | digipot7_enable_write (digipot7_t *ctx) |
Enable write function. | |
uint16_t | digipot7_read_rdac (digipot7_t *ctx) |
Read RDAC function. | |
void | digipot7_write_rdac (digipot7_t *ctx, uint16_t rdac_data) |
Write RDAC function. | |
err_t | digipot7_set_resistance (digipot7_t *ctx, uint16_t res_ohm) |
Set resistance function. | |
void | digipot7_sw_reset (digipot7_t *ctx) |
Software reset function. | |
void | digipot7_store_wiper (digipot7_t *ctx) |
Store wiper setting function. | |
void | digipot7_operating_mode (digipot7_t *ctx, uint8_t mode) |
Set operating mode function. | |
uint16_t | digipot7_next_frame_read (digipot7_t *ctx, uint8_t wiper_location) |
Next frame read function. | |
uint16_t | digipot7_read_memory (digipot7_t *ctx) |
Read memory function. | |
uint8_t | digipot7_read_control (digipot7_t *ctx) |
Read control register function. | |
API for configuring and manipulating DIGI POT 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 digipot7_cfg_setup | ( | digipot7_cfg_t * | cfg | ) |
DIGI POT 7 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See digipot7_cfg_t object definition for detailed explanation. |
void digipot7_enable_write | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
uint16_t digipot7_generic_read | ( | digipot7_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | wiper_pos ) |
DIGI POT 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 digipot7_t object definition for detailed explanation. |
[in] | cmd | : Command operation. See #digipot7_set object definition for detailed explanation. |
[in] | wiper_pos | : 10-bit data to be written. |
void digipot7_generic_write | ( | digipot7_t * | ctx, |
uint8_t | cmd, | ||
uint16_t | data_byte ) |
DIGI POT 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 digipot7_t object definition for detailed explanation. |
[in] | cmd | : Start register address. |
[in] | data_byte | : Data to be written. |
void digipot7_hw_reset | ( | digipot7_t * | ctx | ) |
Hardware reset function.
The function reset the AD5175 Single-Channel, 1024-Position, Digital Rheostat with I2C Interface and 50-TP Memory on the DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
err_t digipot7_init | ( | digipot7_t * | ctx, |
digipot7_cfg_t * | cfg ) |
DIGI POT 7 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See digipot7_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint16_t digipot7_next_frame_read | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
[in] | wiper_location | : Wiper location ( from 0x00 to the 0x38 ). |
void digipot7_operating_mode | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
[in] | mode | : Software shutdown options. |
uint8_t digipot7_read_control | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
uint16_t digipot7_read_memory | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
uint16_t digipot7_read_rdac | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
err_t digipot7_set_resistance | ( | digipot7_t * | ctx, |
uint16_t | res_ohm ) |
Set resistance 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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
[in] | res_ohm | : Resistance ( ohm ) from 0 to 10000. |
0
- Success, -1
- Error.void digipot7_store_wiper | ( | digipot7_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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
void digipot7_sw_reset | ( | digipot7_t * | ctx | ) |
Software reset function.
The function software reset the AD5241 I2C Compatible, 256-Position Digital Potentiometers on the DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
void digipot7_write_rdac | ( | digipot7_t * | ctx, |
uint16_t | rdac_data ) |
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 DIGI POT 7 click board.
[in] | ctx | : Click context object. See digipot7_t object definition for detailed explanation. |
[in] | rdac_data | : 10-bit rdac data. |