Interface: tos.interfaces.Leds

interface Leds

Abstraction of the LEDs.

Author:
Jason Hill
David Gay
Philip Levis

Commands
command uint8_t get() Get current Leds information
command result_t greenOff() Turn the green LED off.
command result_t greenOn() Turn the green LED on.
command result_t greenToggle() Toggle the green LED.
command result_t init() Initialize the LEDs; among other things, initialization turns them all off.
command result_t redOff() Turn the red LED off.
command result_t redOn() Turn the red LED on.
command result_t redToggle() Toggle the red LED.
command result_t set(uint8_t value) Set Leds to a specified value
command result_t yellowOff() Turn the yellow LED off.
command result_t yellowOn() Turn the yellow LED on.
command result_t yellowToggle() Toggle the yellow LED.

Commands - Details

get

command uint8_t get()

Get current Leds information

Returns:
A uint8_t typed value representing Leds status

greenOff

command result_t greenOff()

Turn the green LED off.

Returns:
SUCCESS always.

greenOn

command result_t greenOn()

Turn the green LED on.

Returns:
SUCCESS always.

greenToggle

command result_t greenToggle()

Toggle the green LED. If it was on, turn it off. If it was off, turn it on.

Returns:
SUCCESS always.

init

command result_t init()

Initialize the LEDs; among other things, initialization turns them all off.

Returns:
SUCCESS always.

redOff

command result_t redOff()

Turn the red LED off.

Returns:
SUCCESS always.

redOn

command result_t redOn()

Turn the red LED on.

Returns:
SUCCESS always.

redToggle

command result_t redToggle()

Toggle the red LED. If it was on, turn it off. If it was off, turn it on.

Returns:
SUCCESS always.

set

command result_t set(uint8_t value)

Set Leds to a specified value

Parameters:
value - ranging from 0 to 7 inclusive
Returns:
SUCCESS Always

yellowOff

command result_t yellowOff()

Turn the yellow LED off.

Returns:
SUCCESS always.

yellowOn

command result_t yellowOn()

Turn the yellow LED on.

Returns:
SUCCESS always.

yellowToggle

command result_t yellowToggle()

Toggle the yellow LED. If it was on, turn it off. If it was off, turn it on.

Returns:
SUCCESS always.