Interface: tos.interfaces.ADCError

interface ADCError

Commands
command result_t disable() Disables error reporting for an ADC channel disable() must be called when the ADC is IDLE.
command result_t enable() Enables error reporting for an ADC channel.

Events
event result_t error(uint8_t token) Notification that an error has occurred in the sampling process.

Commands - Details

disable

command result_t disable()

Disables error reporting for an ADC channel disable() must be called when the ADC is IDLE. If it is busy processing a request, disable() should return FAIL.

Returns:
SUCCESS if error reporting has been disabled

enable

command result_t enable()

Enables error reporting for an ADC channel. enable() must be called when the ADC is IDLE. If it is busy processing a request, enable() should return FAIL.

Returns:
SUCCESS if error reporting has been enabled

Events - Details

error

event result_t error(uint8_t token)

Notification that an error has occurred in the sampling process. Token values are sensor specific, see the specific sensor to determine what the error values mean.

Parameters:
token - an error code that describes the error that occurred
Returns:
SUCCESS to continue error reporting, FAIL to disable error reporting