digipot9 2.0.0.0
|
API for configuring and manipulating DIGI POT 9 Click driver. More...
Topics | |
DIGI POT 9 Command byte List | |
List of command bytes of DIGI POT 9 Click driver. | |
DIGI POT 9 RDAC Settings | |
Settings for RDAC of DIGI POT 9 Click driver. | |
DIGI POT 9 MikroBUS Map | |
MikroBUS pin mapping of DIGI POT 9 Click driver. | |
Functions | |
void | digipot9_cfg_setup (digipot9_cfg_t *cfg) |
DIGI POT 9 configuration object setup function. | |
err_t | digipot9_init (digipot9_t *ctx, digipot9_cfg_t *cfg) |
DIGI POT 9 initialization function. | |
void | digipot9_default_cfg (digipot9_t *ctx) |
DIGI POT 9 default configuration function. | |
err_t | digipot9_generic_write (digipot9_t *ctx, uint8_t command, uint8_t address, uint16_t data_in) |
DIGI POT 9 data writing function. | |
err_t | digipot9_generic_read (digipot9_t *ctx, uint8_t command, uint8_t address, uint16_t *data_out) |
DIGI POT 9 data reading function. | |
err_t | digipot9_set_wiper_1 (digipot9_t *ctx, uint16_t data_in) |
DIGI POT 9 Set wiper 1 function. | |
err_t | digipot9_set_wiper_2 (digipot9_t *ctx, uint16_t data_in) |
DIGI POT 9 Set wiper 2 function. | |
void | digipot9_set_pr_pin (digipot9_t *ctx, uint8_t state) |
DIGI POT 9 Set PR pin function. | |
void | digipot9_set_wp_pin (digipot9_t *ctx, uint8_t state) |
DIGI POT 9 Set WP pin function. | |
uint8_t | digipot9_get_rdy_pin (digipot9_t *ctx) |
DIGI POT 9 get RDY pin function. | |
err_t | digipot9_write_user_data (digipot9_t *ctx, uint8_t address, uint16_t data_in) |
DIGI POT 9 write user data function. | |
err_t | digipot9_read_user_data (digipot9_t *ctx, uint8_t address, uint16_t *data_out) |
DIGI POT 9 read user data function. | |
API for configuring and manipulating DIGI POT 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 digipot9_cfg_setup | ( | digipot9_cfg_t * | cfg | ) |
DIGI POT 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See digipot9_cfg_t object definition for detailed explanation. |
void digipot9_default_cfg | ( | digipot9_t * | ctx | ) |
DIGI POT 9 default configuration function.
This function executes a default configuration of DIGI POT 9 click board.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
err_t digipot9_generic_read | ( | digipot9_t * | ctx, |
uint8_t | command, | ||
uint8_t | address, | ||
uint16_t * | data_out ) |
DIGI POT 9 data reading function.
This function reads two data bytes from the selected command and address by using SPI serial interface.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | command | : 4-bits command. |
[in] | address | : 4-bits address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t digipot9_generic_write | ( | digipot9_t * | ctx, |
uint8_t | command, | ||
uint8_t | address, | ||
uint16_t | data_in ) |
DIGI POT 9 data writing function.
This function writes two data bytes to the selected command and address by using SPI serial interface.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | command | : 4-bits command. |
[in] | address | : 4-bits address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.uint8_t digipot9_get_rdy_pin | ( | digipot9_t * | ctx | ) |
DIGI POT 9 get RDY pin function.
This function returns the RDY pin logic state.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
err_t digipot9_init | ( | digipot9_t * | ctx, |
digipot9_cfg_t * | cfg ) |
DIGI POT 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See digipot9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t digipot9_read_user_data | ( | digipot9_t * | ctx, |
uint8_t | address, | ||
uint16_t * | data_out ) |
DIGI POT 9 read user data function.
This function reads two bytes of user data from a desired address of EEMEM.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | address | : User data address in EEMEM [2-14]. |
[in] | data_out | : Output read data. |
0
- Success, -1
- Error.void digipot9_set_pr_pin | ( | digipot9_t * | ctx, |
uint8_t | state ) |
DIGI POT 9 Set PR pin function.
This function sets the PR pin to desired logic state.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t digipot9_set_wiper_1 | ( | digipot9_t * | ctx, |
uint16_t | data_in ) |
DIGI POT 9 Set wiper 1 function.
This function sets wiper 1 to desired value.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | data_in | : Data to be written to wiper 1 register. |
0
- Success, -1
- Error.err_t digipot9_set_wiper_2 | ( | digipot9_t * | ctx, |
uint16_t | data_in ) |
DIGI POT 9 Set wiper 2 function.
This function sets wiper 2 to desired value.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | data_in | : Data to be written to wiper 2 register. |
0
- Success, -1
- Error.void digipot9_set_wp_pin | ( | digipot9_t * | ctx, |
uint8_t | state ) |
DIGI POT 9 Set WP pin function.
This function sets the WP pin to desired logic state.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t digipot9_write_user_data | ( | digipot9_t * | ctx, |
uint8_t | address, | ||
uint16_t | data_in ) |
DIGI POT 9 write user data function.
This function writes two bytes of user data to a desired address of EEMEM.
[in] | ctx | : Click context object. See digipot9_t object definition for detailed explanation. |
[in] | address | : User data address in EEMEM [2-14]. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.