File syn_port_adc.h¶
FileList > port > syn_port_adc.h
Go to the source code of this file
ADC port interface — implement these for your platform.
#include "../common/syn_defs.h"#include <stdint.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_port_adc_init (uint8_t channel) Initialize an ADC channel. |
| uint16_t | syn_port_adc_read (uint8_t channel) Read a single ADC sample. |
| uint16_t | syn_port_adc_reference_mv (void) Get the ADC reference voltage in millivolts. |
| uint8_t | syn_port_adc_resolution (void) Get the ADC resolution in bits. |
Public Functions Documentation¶
function syn_port_adc_init¶
Initialize an ADC channel.
Parameters:
channelADC channel number.
Returns:
SYN_OK on success.
function syn_port_adc_read¶
Read a single ADC sample.
Parameters:
channelADC channel number.
Returns:
Raw ADC value (resolution depends on platform).
function syn_port_adc_reference_mv¶
Get the ADC reference voltage in millivolts.
Returns:
Reference voltage (e.g., 3300 for 3.3V).
function syn_port_adc_resolution¶
Get the ADC resolution in bits.
Returns:
Resolution (e.g., 10, 12, 16).
The documentation for this class was generated from the following file src/syntropic/port/syn_port_adc.h