Interface: tos.chips.ad5200.Pot

interface Pot

There is currently no TEP for describing this interface.

This interface is an attempt at describing the HIL abstraction for potentiomter devices. Since there is currently no TEP describing the abstractions for potentiometers, this interface will need to be updated once one is created.

Author:
Jason Hill
David Gay
Philip Levis
Kevin Klues (klues@tkn.tu-berlin.de) -- modified for TinyOS-2.x

Commands
command error_t decrease() Decrement the potentiometer value by 1.
command uint8_t get() Return the current setting of the potentiometer.
command error_t increase() Increment the potentiometer value by 1.
command error_t set(uint8_t setting) Set the potentiometer value.

Commands - Details

decrease

command error_t decrease()

Decrement the potentiometer value by 1. This function proves to be quite useful in active potentiometer control scenarios.

Returns:
SUCCESS if the decrement was successful. FAIL if the component has not been initialized or if the potentiometer cannot be decremented further.

get

command uint8_t get()

Return the current setting of the potentiometer.

Returns:
An unsigned 8-bit value denoting the current setting of the potentiometer.

increase

command error_t increase()

Increment the potentiometer value by 1. This function proves to be quite useful in active potentiometer control scenarios.

Returns:
SUCCESS if the increment was successful.
FAIL if the component has not been initialized or if the potentiometer cannot be incremented further.

set

command error_t set(uint8_t setting)

Set the potentiometer value.

Parameters:
setting -- The new value of the potentiometer.
Returns:
SUCCESS if the setting was successful
FAIL if the component has not been initialized or the desired setting is outside of the valid range.