File syn_port_adc.h¶
FileList > port > syn_port_adc.h
Go to the source code of this file
Port contract for Analog-to-Digital Converter (ADC) hardware.
#include "../common/syn_defs.h"
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_port_adc_deinit (uint8_t adc_id) De-initialize the ADC peripheral. |
| SYN_Status | syn_port_adc_init (uint8_t adc_id, uint32_t channel_mask) Initialize the ADC peripheral. |
| uint16_t | syn_port_adc_read_channel (uint8_t adc_id, uint8_t channel) Read a single analog channel (single-shot polled read). |
| SYN_Status | syn_port_adc_start_dma_scan (uint8_t adc_id, uint16_t * dest, size_t num_channels) Start continuous multi-channel background scan via DMA. |
Public Functions Documentation¶
function syn_port_adc_deinit¶
De-initialize the ADC peripheral.
Parameters:
adc_idADC instance index.
Returns:
SYN_OK on success.
function syn_port_adc_init¶
Initialize the ADC peripheral.
Parameters:
adc_idADC instance index (0 = ADC1, 1 = ADC2, etc.).channel_maskBitmask of channels to configure for analog input.
Returns:
SYN_OK on success.
function syn_port_adc_read_channel¶
Read a single analog channel (single-shot polled read).
Parameters:
adc_idADC instance index.channelChannel index (0..18).
Returns:
12-bit raw conversion value (0..4095).
function syn_port_adc_start_dma_scan¶
Start continuous multi-channel background scan via DMA.
Parameters:
adc_idADC instance index.destDestination buffer in SRAM.num_channelsNumber of active channels in scan sequence.
Returns:
SYN_OK on success.
The documentation for this class was generated from the following file src/syntropic/port/syn_port_adc.h