5.3.2.6 adc_os_read_channel
Read data asked for from the ring buffer.
int32_t adc_os_read_channel(
struct adc_os_descriptor *const descr,
const uint8_t channel,
uint8_t *const buffer,
const uint16_t length
)
If the number of data in ring buffer less than want to read, the task/thread will be blocked until read is done.
Parameters
- descr
-
Type: struct adc_os_descriptor Struct *const
The pointer to ADC descriptor
- channel
-
Type: const uint8_t
Channel number
- buf
-
A buffer to read data
- length
-
Type: const uint16_t
The size of the buffer
Returns
Type: int32_t
The number of bytes the user wants to read.