|
Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
Go to the source code of this file.
Data Structures | |
| struct | ADC_Device_t |
| A structure to represent ADC device. More... | |
Macros | |
| #define | ADC_MODE_STREAM ((uint32_t)(1<<0)) |
| The enumeration of ADC mode. More... | |
| #define | ADC_MODE_SINGLE ((uint32_t)(1<<1)) |
| #define | ADC_MODE_NORMAL ((uint32_t)(1<<2)) |
| #define | ADC_MODE_CALIBRATION ((uint32_t)(1<<3)) |
| #define | ADC_MODE_REF_VDD ((uint32_t)(1<<4)) |
| #define | ADC_MODE_REF_BANDGAP ((uint32_t)(1<<5)) |
Typedefs | |
| typedef const struct ADC_Device_t | ADC_Device_t |
| A structure to represent ADC device. More... | |
Functions | |
| int32_t | ADC_devSelectChannel (ADC_Device_t *dev, uint8_t channel) |
| Select ADC channel for a ADC device. More... | |
| int32_t | ADC_devRead (ADC_Device_t *dev, uint8_t *val) |
| Read ADC result from a ADC device. More... | |
| int32_t | ADC_devTake (ADC_Device_t *dev, uint8_t channel, uint8_t *val) |
| Start a ADC conversion, wait for its completion and read result back. More... | |
| int32_t | ADC_devStart (ADC_Device_t *dev) |
| Start a ADC conversion. More... | |
| int32_t | ADC_devConversionInProgress (ADC_Device_t *dev) |
| Check status of a ADC conversion. More... | |
| int32_t | ADC_devConfigReference (ADC_Device_t *dev, uint8_t refh, uint8_t refl, uint8_t refg) |
| Initialize ADC reference settings. It sets the dynamic range and the gain. More... | |
| int32_t | ADC_devInit (ADC_Device_t *dev, uint8_t div, uint8_t cycle, uint32_t mode) |
| Initialize ADC device. More... | |
| ADC_Device_t * | ADC_devRequest (const char *name) |
| ADC Request Device. More... | |
This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.
| #define ADC_MODE_CALIBRATION ((uint32_t)(1<<3)) |
| #define ADC_MODE_NORMAL ((uint32_t)(1<<2)) |
| #define ADC_MODE_REF_BANDGAP ((uint32_t)(1<<5)) |
| #define ADC_MODE_REF_VDD ((uint32_t)(1<<4)) |
| #define ADC_MODE_SINGLE ((uint32_t)(1<<1)) |
| #define ADC_MODE_STREAM ((uint32_t)(1<<0)) |
The enumeration of ADC mode.
| typedef const struct ADC_Device_t ADC_Device_t |
A structure to represent ADC device.
| int32_t ADC_devConfigReference | ( | ADC_Device_t * | dev, |
| uint8_t | refh, | ||
| uint8_t | refl, | ||
| uint8_t | refg | ||
| ) |
Initialize ADC reference settings. It sets the dynamic range and the gain.
| dev | The pointer to ADC device |
| refh | The high watermark to the reference voltage. |
| refl | The low watermark to the reference voltage. |
| refg | The gain of the reference voltage. |
| int32_t ADC_devConversionInProgress | ( | ADC_Device_t * | dev | ) |
Check status of a ADC conversion.
| dev | The pointer to ADC device |
| int32_t ADC_devInit | ( | ADC_Device_t * | dev, |
| uint8_t | div, | ||
| uint8_t | cycle, | ||
| uint32_t | mode | ||
| ) |
Initialize ADC device.
| dev | The pointer to ADC device |
| div | The clock divider. |
| cycle | The ADC cycle. |
| mode | The ADC mode. |
| int32_t ADC_devRead | ( | ADC_Device_t * | dev, |
| uint8_t * | val | ||
| ) |
Read ADC result from a ADC device.
| dev | The pointer to ADC device |
| val | The pointer to the result. |
| ADC_Device_t* ADC_devRequest | ( | const char * | name | ) |
ADC Request Device.
| name | The name string of ADC device. |
| int32_t ADC_devSelectChannel | ( | ADC_Device_t * | dev, |
| uint8_t | channel | ||
| ) |
Select ADC channel for a ADC device.
| dev | The pointer to ADC device |
| channel | The enumeration of ADC channel. return 0 for success or error code upon a failure. |
| int32_t ADC_devStart | ( | ADC_Device_t * | dev | ) |
Start a ADC conversion.
| dev | The pointer to ADC device |
| int32_t ADC_devTake | ( | ADC_Device_t * | dev, |
| uint8_t | channel, | ||
| uint8_t * | val | ||
| ) |
Start a ADC conversion, wait for its completion and read result back.
| dev | The pointer to ADC device |
| channel | The enumeration of ADC channel. |
| val | The pointer to the result. |
1.8.9.1