adc_async_read_channel

Read data from the ADC.

int32_t adc_async_read_channel(
    struct adc_async_descriptor *const descr,
    const uint8_t channel,
    uint8_t *const buffer,
    const uint16_t length
)

Parameters

descr

Type: struct adc_async_descriptor Struct *const

The pointer to the ADC descriptor

channel

Type: const uint8_t

Channel number

buf

A buffer to read data to

length

Type: const uint16_t

The size of a buffer

Returns

Type: int32_t

The number of bytes read.