![]() |
no-OS
|
Classes | |
| struct | ltc2312_dev |
| struct | ltc2312_init_param |
Macros | |
| #define | LTC2315_CS QUIKEVAL_CS |
| #define | LTC2312_READ_BYTES_NUMBER 2 |
| #define | LTC2312_READ_VALUES_NUMBER 100 |
LTC2315 Channel Address | |
| #define | LTC2315_ADDRESS 0x00 |
Enumerations | |
| enum | device_type { LTC2312_12 , LTC2312_14 } |
Functions | |
| int32_t | ltc2312_setup (struct ltc2312_dev **device, struct ltc2312_init_param *init_param) |
| int32_t | ltc2312_remove (struct ltc2312_dev *dev) |
| int32_t | ltc2312_read (struct ltc2312_dev *dev, uint16_t *ptr_adc_code) |
| void | ltc2312_code_to_voltage (struct ltc2312_dev *dev, uint16_t adc_code, float vref, float *voltage) |
Header for LTC2315: 12/14-bit 1Msps ADC
| #define LTC2312_READ_BYTES_NUMBER 2 |
| #define LTC2312_READ_VALUES_NUMBER 100 |
| #define LTC2315_ADDRESS 0x00 |
| #define LTC2315_CS QUIKEVAL_CS |
Define the SPI CS pin
| enum device_type |
| void ltc2312_code_to_voltage | ( | struct ltc2312_dev * | dev, |
| uint16_t | adc_code, | ||
| float | vref, | ||
| float * | voltage ) |
Calculates the LTC2312 input voltage given the binary data and LSB weight.
| [in] | dev | - The device structure. |
| [in] | adc_code | - Raw ADC code. |
| [in] | vref | - The reference voltage of the ADC. |
| [out] | voltage | - Voltage value calculated. |
| int32_t ltc2312_read | ( | struct ltc2312_dev * | dev, |
| uint16_t * | ptr_adc_code ) |
Reads the LTC2312 and returns 16-bit data in offset binary format.
| [in] | dev | - The device structure. |
| [out] | ptr_adc_code | - Read data. |
| int32_t ltc2312_remove | ( | struct ltc2312_dev * | dev | ) |
Free the resources allocated by ltc2312_setup().
| [in] | dev | - The device structure. |
| int32_t ltc2312_setup | ( | struct ltc2312_dev ** | device, |
| struct ltc2312_init_param * | init_param ) |
Initializes the ltc2312 device handler.
| [out] | device | - The device structure. |
| [in] | init_param | - The structure that contains the device initial parameters. |