isoadc6 2.1.0.0
|
API for configuring and manipulating ISO ADC 6 Click driver. More...
Topics | |
ISO ADC 6 Registers List | |
List of registers of ISO ADC 6 Click driver. | |
ISO ADC 6 Registers Settings | |
Settings for registers of ISO ADC 6 Click driver. | |
ISO ADC 6 MikroBUS Map | |
MikroBUS pin mapping of ISO ADC 6 Click driver. | |
Isoadc6_cmd | |
Functions | |
void | isoadc6_cfg_setup (isoadc6_cfg_t *cfg) |
ISO ADC 6 configuration object setup function. | |
err_t | isoadc6_init (isoadc6_t *ctx, isoadc6_cfg_t *cfg) |
ISO ADC 6 initialization function. | |
err_t | isoadc6_default_cfg (isoadc6_t *ctx) |
ISO ADC 6 default configuration function. | |
err_t | isoadc6_generic_write (isoadc6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
ISO ADC 6 data writing function. | |
err_t | isoadc6_generic_read (isoadc6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
ISO ADC 6 data reading function. | |
err_t | isoadc6_write_byte (isoadc6_t *ctx, uint8_t reg, uint8_t data_in) |
ISO ADC 6 byte writing function. | |
err_t | isoadc6_read_byte (isoadc6_t *ctx, uint8_t reg, uint8_t *data_out) |
ISO ADC 6 byte reading function. | |
err_t | isoadc6_write_word (isoadc6_t *ctx, uint8_t reg, uint16_t data_in) |
ISO ADC 6 word writing function. | |
err_t | isoadc6_read_word (isoadc6_t *ctx, uint8_t reg, uint16_t *data_out) |
ISO ADC 6 word reading function. | |
err_t | isoadc6_write_dword (isoadc6_t *ctx, uint8_t reg, uint32_t data_in) |
ISO ADC 6 dword writing function. | |
err_t | isoadc6_read_dword (isoadc6_t *ctx, uint8_t reg, uint32_t *data_out) |
ISO ADC 6 dword reading function. | |
err_t | isoadc6_get_device_id (isoadc6_t *ctx, uint8_t *device_id, uint8_t *sil_rev) |
ISO ADC 6 get device ID function. | |
err_t | isoadc6_set_channel (isoadc6_t *ctx, uint8_t sel_ch, uint16_t ch_data) |
ISO ADC 6 set channel function. | |
err_t | isoadc6_set_ch_config (isoadc6_t *ctx, uint16_t cfg_data) |
ISO ADC 6 set channel config function. | |
err_t | isoadc6_set_adc_control (isoadc6_t *ctx, uint16_t adc_ctrl) |
ISO ADC 6 set ADC control function. | |
err_t | isoadc6_set_ch_offset (isoadc6_t *ctx, uint32_t offset) |
ISO ADC 6 set channel offset function. | |
err_t | isoadc6_get_ch_offset (isoadc6_t *ctx, uint32_t *offset) |
ISO ADC 6 get channel offset function. | |
err_t | isoadc6_set_ch_gain (isoadc6_t *ctx, uint32_t gain) |
ISO ADC 6 set channel gain function. | |
err_t | isoadc6_get_ch_gain (isoadc6_t *ctx, uint32_t *gain) |
ISO ADC 6 get channel gain function. | |
err_t | isoadc6_get_adc_data (isoadc6_t *ctx, uint32_t *adc_data) |
ISO ADC 6 get ADC data function. | |
err_t | isoadc6_get_voltage (isoadc6_t *ctx, float *voltage) |
ISO ADC 6 get voltage level function. | |
API for configuring and manipulating ISO ADC 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void isoadc6_cfg_setup | ( | isoadc6_cfg_t * | cfg | ) |
ISO ADC 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See isoadc6_cfg_t object definition for detailed explanation. |
err_t isoadc6_default_cfg | ( | isoadc6_t * | ctx | ) |
ISO ADC 6 default configuration function.
This function executes a default configuration of ISO ADC 6 click board.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_generic_read | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
ISO ADC 6 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_generic_write | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
ISO ADC 6 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_get_adc_data | ( | isoadc6_t * | ctx, |
uint32_t * | adc_data ) |
ISO ADC 6 get ADC data function.
This function is used to read 24-Bit ADC raw data value of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[out] | ch_data | : 24-Bit ADC data value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_get_ch_gain | ( | isoadc6_t * | ctx, |
uint32_t * | gain ) |
ISO ADC 6 get channel gain function.
This function reads a channel gain data of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[out] | ch_data | : Channel gain. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_get_ch_offset | ( | isoadc6_t * | ctx, |
uint32_t * | offset ) |
ISO ADC 6 get channel offset function.
This function reads a channel offset data of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[out] | ch_data | : Channel offset. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_get_device_id | ( | isoadc6_t * | ctx, |
uint8_t * | device_id, | ||
uint8_t * | sil_rev ) |
ISO ADC 6 get device ID function.
This function read the device ID and silicon revision of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[out] | device_id | : Device ID. |
[out] | sil_rev | : Silicon revision. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_get_voltage | ( | isoadc6_t * | ctx, |
float * | voltage ) |
ISO ADC 6 get voltage level function.
This function reads results of 24-bit ADC raw data and converts them to proportional voltage level [V], of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[out] | voltage | :Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_init | ( | isoadc6_t * | ctx, |
isoadc6_cfg_t * | cfg ) |
ISO ADC 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See isoadc6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_read_byte | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
ISO ADC 6 byte reading function.
This function reads a desired data byte from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read 8-bit data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_read_dword | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint32_t * | data_out ) |
ISO ADC 6 dword reading function.
This function reads a desired data dword from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read 32-bit data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_read_word | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
ISO ADC 6 word reading function.
This function reads a desired data word from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read 16-bit data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_set_adc_control | ( | isoadc6_t * | ctx, |
uint16_t | adc_ctrl ) |
ISO ADC 6 set ADC control function.
This function sets the ADC control configuration of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | adc_ctrl_data | : ADC control configuration data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_set_ch_config | ( | isoadc6_t * | ctx, |
uint16_t | cfg_data ) |
ISO ADC 6 set channel config function.
This function sets the configuration of the channel settings of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | ch_data | : Configuration data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_set_ch_gain | ( | isoadc6_t * | ctx, |
uint32_t | gain ) |
ISO ADC 6 set channel gain function.
This function sets the channel gain of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | ch_data | : Channel offset. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_set_ch_offset | ( | isoadc6_t * | ctx, |
uint32_t | offset ) |
ISO ADC 6 set channel offset function.
This function sets the channel offset of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | ch_data | : Channel offset. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_set_channel | ( | isoadc6_t * | ctx, |
uint8_t | sel_ch, | ||
uint16_t | ch_data ) |
ISO ADC 6 set channel function.
This function sets the channel configuration of the AD7124-8, 8-Channel, Low Noise, Low Power, 24-Bit, Sigma-Delta ADC with PGA and Reference wired with ADuM341E, 5.7 kV rms Quad Digital Isolators on the ISO ADC 6 Click board™.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | sel_ch | : Channel selection [0-8]. |
[in] | ch_data | : Channel config data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_write_byte | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
ISO ADC 6 byte writing function.
This function writes a desired data byte to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : 8-bit data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_write_dword | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint32_t | data_in ) |
ISO ADC 6 dword writing function.
This function writes a desired data dword to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : 32-bit data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t isoadc6_write_word | ( | isoadc6_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
ISO ADC 6 word writing function.
This function writes a desired data word to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See isoadc6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : 16-bit data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.