2.6.4.3.7 Function adc_read()

Reads the ADC result.

enum status_code adc_read( struct adc_module *const module_inst, uint16_t * result)

Reads the result from an ADC conversion that was previously started.

Table 2-19. Parameters
Data directionParameter nameDescription

[in]

module_inst

Pointer to the ADC software instance struct

[out]

result

Pointer to store the result value in

Returns

Status of the ADC read request.

Table 2-20. Return Values
Return valueDescription

STATUS_OK

The result was retrieved successfully

STATUS_BUSY

A conversion result was not ready

STATUS_ERR_OVERFLOW

The result register has been overwritten by the ADC module before the result was read by the software