Interface: tos.interfaces.ADCControl
interface ADCControl
Controls various aspects of the ADC.
- Author:
-
Alec Woo
-
David Gay
-
Philip Levis
Commands
command result_t bindPort(uint8_t port, uint8_t adcPort)
command result_t init()
command result_t setSamplingRate(uint8_t rate)
Commands - Details
bindPort
command result_t bindPort(uint8_t port, uint8_t adcPort)
- Parameters:
-
port
- The port in the portmap you wish to modify
-
adcPort
- The ADC destination port that port
binds to
- Returns:
-
SUCCESS if successful
init
command result_t init()
- Returns:
-
SUCCESS if successful
setSamplingRate
command result_t setSamplingRate(uint8_t rate)
- Parameters:
-
rate
- 2^rate is the prescaler factor to the ADC.
The rate of the ADC is the crystal frequency times the prescaler,
or XTAL * 2^rate = 32kHz * 2^rate.
- Returns:
-
SUCCESS if successful