adc9 2.0.0.0
|
Functions | |
void | adc9_cfg_setup (adc9_cfg_t *cfg) |
Config Object Initialization function. | |
ADC9_RETVAL | adc9_init (adc9_t *ctx, adc9_cfg_t *cfg) |
Initialization function. | |
void | adc9_default_cfg (adc9_t *ctx, adc9_rw_t *rw) |
Click Default Configuration function. | |
void | adc9_generic_transfer (adc9_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint8_t | adc9_write_fast_cmd (adc9_t *ctx, adc9_rw_t *rw) |
Write fast commands function. | |
uint8_t | adc9_write_u8 (adc9_t *ctx, adc9_rw_t *rw, uint8_t wr_data) |
Write byte function. | |
uint8_t | adc9_read_u8 (adc9_t *ctx, adc9_rw_t *rw, uint8_t *rd_data) |
Read byte function. | |
uint8_t | adc9_write_u16 (adc9_t *ctx, adc9_rw_t *rw, uint16_t wr_data) |
Write word function. | |
uint8_t | adc9_read_u16 (adc9_t *ctx, adc9_rw_t *rw, uint16_t *rd_data) |
Read word function. | |
uint8_t | adc9_write_u24 (adc9_t *ctx, adc9_rw_t *rw, uint32_t wr_data) |
Write 24-bit function. | |
uint8_t | adc9_read_u24 (adc9_t *ctx, adc9_rw_t *rw, uint32_t *rd_data) |
Read 24-bit function. | |
uint8_t | adc9_read_u32 (adc9_t *ctx, adc9_rw_t *rw, uint32_t *rd_data) |
Read 32-bit function. | |
uint8_t | adc9_irq_pin_state (adc9_t *ctx) |
Get IRQ pin state function. | |
uint8_t | adc9_read_def_adc (adc9_t *ctx, adc9_rw_t *rw, int32_t *rd_data) |
Read default adc format value function. | |
uint8_t | adc9_read_24_left_adc (adc9_t *ctx, adc9_rw_t *rw, int32_t *rd_data) |
Read left justified adc value function. | |
uint8_t | adc9_read_sign_adc (adc9_t *ctx, adc9_rw_t *rw, int32_t *adc_val) |
Read Sign and ADC value function. | |
uint8_t | adc9_read_chan_adc (adc9_t *ctx, adc9_rw_t *rw, int32_t *adc_val, uint8_t *chan) |
Read Channel and ADC value function. | |
float | adc9_volt_calc (adc9_t *ctx, int32_t adc_val, uint16_t v_ref, uint8_t gain) |
Calculate Voltage function. | |
void adc9_cfg_setup | ( | adc9_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
Click Default Configuration function.
ctx | Click object. |
rw | Read/write object. |
@description This function executes default configuration for ADC 9 click.
void adc9_generic_transfer | ( | adc9_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
ADC9_RETVAL adc9_init | ( | adc9_t * | ctx, |
adc9_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t adc9_irq_pin_state | ( | adc9_t * | ctx | ) |
Get IRQ pin state function.
ctx | Click object. |
@description Function is used to check if an interrupt has occured.
Read left justified adc value function.
ctx | Click object. |
rw | Read/write object. Struct Argument: dev_adr 8-bit value that defines the dvice. |
rd_data | 32-bit value that defines the ADC output data. |
@description Function is used to read ADC value when the left-justified fata format is applied.
Read Channel and ADC value function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice. |
rd_data | 32-bit value that defines the ADC output data. |
chan | 8-bit value that defines the ADC output channel. |
@description Function is used to read ADC value when the read channel and ADC fata format is applied.
Read default adc format value function.
ctx | Click object. |
rw | Read/write object. Struct Argument: dev_adr 8-bit value that defines the dvice. |
rd_data | 32-bit value that defines the ADC output data. |
@description Function is used to read ADC value when the default fata format is applied.
Read Sign and ADC value function.
ctx | Click object. |
rw | Read/write object. Struct Argument: dev_adr 8-bit value that defines the dvice. |
rd_data | 32-bit value that defines the ADC output data. |
@description Function is used to read ADC value when the read sign and ADC fata format is applied.
Read word function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register cmd 8-bit value that defines the command( static or incremental read ) |
rd_data | 16-bit value that defines the output data |
@description Function is used to read two bytes of data from user defined register.
Read 24-bit function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register cmd 8-bit value that defines the command( static or incremental read ) |
rd_data | 24-bit value that defines the output data |
@description Function is used to read three bytes of data from user defined register.
Read 32-bit function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register cmd 8-bit value that defines the command( static or incremental read ) |
rd_data | 32-bit value that defines the output data |
@description Function is used to read four bytes of data from user defined register.
Read byte function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register cmd 8-bit value that defines the command( static or incremental read ) |
rd_data | 8-bit value that defines the output data |
@description Function is used to read single byte of data from user defined register.
float adc9_volt_calc | ( | adc9_t * | ctx, |
int32_t | adc_val, | ||
uint16_t | v_ref, | ||
uint8_t | gain ) |
Calculate Voltage function.
ctx | Click object. |
adc_val | 32-bit value that defines the ADC input data. |
v_ref | 16-bit data that defines reference voltage. |
gain | 8-bit data that defines gain applied. |
@description Function is used to calculate voltage based on ADC values.
Write fast commands function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice cmd 8-bit value that defines the command |
@description Function is used to execute fast command.
Write word function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register |
wr_data | 16-bit value that defines the input data |
@description Function is used to write two bytes of data into user defined register.
Write 24-bit function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register |
wr_data | 24-bit value that defines the input data |
@description Function is used to write three bytes of data into user defined register.
Write byte function.
ctx | Click object. |
rw | Read/write object. Struct Arguments: dev_adr 8-bit value that defines the dvice reg 8-bit value that defines the register |
wr_data | 8-bit value that defines the input data |
@description Function is used to write single byte of data into user defined register.