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.
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.
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 |