Interface: moteiv.tos.platform.msp430.adc.ADCSingle
interface ADCSingleCommands
command adcresult_t getData()
command adcresult_t reserve()
command adcresult_t unreserve()
Events
event result_t dataReady(adcresult_t result, uint16_t data)
Commands - Details
getData
command adcresult_t getData()
- Returns:
-
ADC_SUCCESS if the ADC is free and available
to accept the request, error code otherwise (see ADCHIL.h).
getDataContinuous
command adcresult_t getDataContinuous()
- Returns:
-
ADC_SUCCESS if the ADC is free and available
to accept the request, error code otherwise (see ADCHIL.h).
reserve
command adcresult_t reserve()
- Returns:
-
ADC_SUCCESS if reservation was successful,
to accept the request, error code otherwise (see ADCHIL.h).
reserveContinuous
command adcresult_t reserveContinuous()
unreserve
command adcresult_t unreserve()
- Returns:
-
ADC_SUCCESS if reservation was cancelled successfully,
error code otherwise (see ADCHIL.h).
Events - Details
dataReady
event result_t dataReady(adcresult_t result, uint16_t data)
- Parameters:
-
result
- ADC_SUCCESS if the conversion was performed
successfully and data
is valid, error
code otherwise (see ADCHIL.h).
-
data
- The conversion result, an uninterpreted
16-bit value.
- Returns:
-
SUCCESS continues conversions in continuous mode,
FAIL stops further conversions in continuous mode
(ignored if not in continuous mode).