Apps     Components     Interfaces     All Files     Source Tree     source: tos.interfaces.Leds.nc

Interface: Leds

Abstraction of the LEDs.

Components providing this interface:
tos.lib.Commands.CommandLeds
tos.system.LedsC
tos.system.NoLeds

Components requiring this interface:
tos.lib.Attributes.AttrMicM
tos.lib.Commands.CommandLedsM
tos.lib.Commands.CommandPotM
tos.lib.Commands.CommandResetM
tos.lib.TinyAlloc
tos.lib.TinyDB.AggOperator
tos.lib.TinyDB.DBBufferC
tos.lib.TinyDB.NetworkC
tos.lib.TinyDB.ParsedQuery
tos.lib.TinyDB.QueryResult
tos.lib.TinyDB.TupleRouterM
tos.sensorboards.micasb.I2CPotM
tos.system.AMStandard
tos.system.NoCRCPacket
tos.system.TimerM

Commands

Commands - Details

init

result_t init(void)

Initialize the LEDs; among other things, initialization turns them all off.
Returns: SUCCESS always.

redOn

result_t redOn(void)

Turn the red LED on.
Returns: SUCCESS always.

redOff

result_t redOff(void)

Turn the red LED off.
Returns: SUCCESS always.

redToggle

result_t redToggle(void)

Toggle the red LED. If it was on, turn it off. If it was off, turn it on.
Returns: SUCCESS always.

greenOn

result_t greenOn(void)

Turn the green LED on.
Returns: SUCCESS always.

greenOff

result_t greenOff(void)

Turn the green LED off.
Returns: SUCCESS always.

greenToggle

result_t greenToggle(void)

Toggle the green LED. If it was on, turn it off. If it was off, turn it on.
Returns: SUCCESS always.

yellowOn

result_t yellowOn(void)

Turn the yellow LED on.
Returns: SUCCESS always.

yellowOff

result_t yellowOff(void)

Turn the yellow LED off.
Returns: SUCCESS always.

yellowToggle

result_t yellowToggle(void)

Toggle the yellow LED. If it was on, turn it off. If it was off, turn it on.
Returns: SUCCESS always.