![]() |
simple FS
v0.1.0
|
Module for communication Analog-digital peripheral used on MCU. More...


Go to the source code of this file.
Macros | |
| #define | ADC_RESOLUTION 12 |
| Physically resolution of ADC peripheral. More... | |
| #define | ADC_Q_RESOLUTION 5 |
| Precision of converted value. More... | |
| #define | ADC_HW_MULTIPLYER 8 |
| Physically placed voltage divider in measuring circuit. | |
| #define | Q_FORMAT_ADC (((8-ADC_Q_RESOLUTION)<<8) | ADC_Q_RESOLUTION) |
| #define | ADC_VALUE_CONSTANT (10*(2<<(ADC_RESOLUTION-ADC_Q_RESOLUTION-1))) |
Functions | |
| void | adc_init (void *handle, uint16_t adc_dummy) |
| Initialization of ADC module. More... | |
| SensorID_t * | get_adc_sensor_id (uint8_t index) |
| Return ID of sensor. More... | |
| RecordDescriptor_t | adc_getType () |
| Return format specification of this senor. More... | |
| SensorValue_t * | get_adc_value () |
| Read measured value from ADC. More... | |
| void | adc_reset (void) |
| Reset ADC peripheral. More... | |
| void | adc_doMeasure (void) |
| Start the measure procedure in blocking mode. More... | |
| uint8_t | adc_count (void) |
| Return number of sensors in this peripheral. More... | |
Variables | |
| SensorInterface_t | adcSensor |
| Interface to ADC sensor. More... | |
Module for communication Analog-digital peripheral used on MCU.
Supported modes:
Configuration of this module:
#Properties of ADC module
Example of ADC record format stored in META area:
| Sensor ID | TYPE | META_FORMAT | Q_m | Q_n |
|---|---|---|---|---|
| 0 .. 7B | 8B | 9B | 10B | 11B |
| 0x0ADC043200000000 | 0x0B | 0x41 => FORMAT_META_FMT_Q + FORMAT_META_LENGTH_1B | 0x03 | 0x05 |
1.8.17