2.6.4.7.1 Function adc_read_buffer_job()

Read multiple samples from ADC.

enum status_code adc_read_buffer_job( struct adc_module *const module_inst, uint16_t * buffer, uint16_t samples)

Read samples from the ADC into the buffer. If there is no hardware trigger defined (event action) the driver will retrigger the ADC conversion whenever a conversion is complete until samples has been acquired. To avoid jitter in the sampling frequency using an event trigger is advised.

Table 2-33. Parameters
Data directionParameter nameDescription

[in]

module_inst

Pointer to the ADC software instance struct

[in]

samples

Number of samples to acquire

[out]

buffer

Buffer to store the ADC samples

Returns

Status of the job start.

Table 2-34. Return Values
Return valueDescription

STATUS_OK

The conversion job was started successfully and is in progress

STATUS_BUSY

The ADC is already busy with another job