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 1. Parameters
Data direction Parameter name Description

[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. Return Values
Return value Description

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