isoadc5 2.0.0.0
|
API for configuring and manipulating ISO ADC 5 Click driver. More...
Topics | |
ISO ADC 5 Registers List | |
List of registers of ISO ADC 5 Click driver. | |
ISO ADC 5 Registers Settings | |
Settings for registers of ISO ADC 5 Click driver. | |
ISO ADC 5 MikroBUS Map | |
MikroBUS pin mapping of ISO ADC 5 Click driver. | |
Functions | |
void | isoadc5_cfg_setup (isoadc5_cfg_t *cfg) |
ISO ADC 5 configuration object setup function. | |
err_t | isoadc5_init (isoadc5_t *ctx, isoadc5_cfg_t *cfg) |
ISO ADC 5 initialization function. | |
err_t | isoadc5_write_register (isoadc5_t *ctx, uint8_t reg, uint16_t data_in) |
ISO ADC 5 write register function. | |
err_t | isoadc5_read_register (isoadc5_t *ctx, uint8_t reg, uint16_t *data_out) |
ISO ADC 5 read register function. | |
err_t | isoadc5_read_register_burst (isoadc5_t *ctx, uint8_t filt, isoadc5_burst_payload_t *payload) |
ISO ADC 5 read register function. | |
err_t | isoadc5_read_voltage (isoadc5_t *ctx, uint8_t filt, uint8_t ch, float *volt) |
ISO ADC 5 read voltage function. | |
uint8_t | isoadc5_get_int_pin (isoadc5_t *ctx) |
ISO ADC 5 get int pin function. | |
API for configuring and manipulating ISO ADC 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void isoadc5_cfg_setup | ( | isoadc5_cfg_t * | cfg | ) |
ISO ADC 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See isoadc5_cfg_t object definition for detailed explanation. |
uint8_t isoadc5_get_int_pin | ( | isoadc5_t * | ctx | ) |
ISO ADC 5 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See isoadc5_t object definition for detailed explanation. |
err_t isoadc5_init | ( | isoadc5_t * | ctx, |
isoadc5_cfg_t * | cfg ) |
ISO ADC 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See isoadc5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See isoadc5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc5_read_register | ( | isoadc5_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
ISO ADC 5 read register function.
This function reads two bytes of data from the selected register by using the SPI serial interface.
[in] | ctx | : Click context object. See isoadc5_t object definition for detailed explanation. |
[in] | reg | : Register address [0x00-0x14]. |
[out] | data_out | : Read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc5_read_register_burst | ( | isoadc5_t * | ctx, |
uint8_t | filt, | ||
isoadc5_burst_payload_t * | payload ) |
ISO ADC 5 read register function.
This function reads all filtered or unfiltered ADC data registers as well as the interrupt status register and stores data in the payload structure.
[in] | ctx | : Click context object. See isoadc5_t object definition for detailed explanation. |
[in] | filt | :
|
[out] | payload | : Burst payload structure where the read data is being stored. See isoadc5_burst_payload_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc5_read_voltage | ( | isoadc5_t * | ctx, |
uint8_t | filt, | ||
uint8_t | ch, | ||
float * | volt ) |
ISO ADC 5 read voltage function.
This function reads the raw adc data from a desired input channel and converts it to voltage.
[in] | ctx | : Click context object. See isoadc5_t object definition for detailed explanation. |
[in] | filt | :
|
[in] | ch | : Input channel selection [1-4]. |
[out] | volt | : Voltage read from a desired input channel. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc5_write_register | ( | isoadc5_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
ISO ADC 5 write register function.
This function writes two bytes of data to the selected register by using the SPI serial interface.
[in] | ctx | : Click context object. See isoadc5_t object definition for detailed explanation. |
[in] | reg | : Register address [0x00-0x14]. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.