Interface: moteiv.tos.sensorboards.invent.Max7315LedsControl

interface Max7315LedsControl

Controls the LED settings of the Maxim MAX7315 digital output driver.

Author:
Joe Polastre, Moteiv Corporation <info@moteiv.com>

Commands
command result_t allOff() Turns everything off for the lowest power consumption.
command uint8_t get() Get the outputs configuration.
command uint8_t getBlink0() Returns the current value of the Blink0 register.
command uint8_t getBlink1() Returns the current value of the Blink1 register.
command max7315_config_t getConfig() Get the value of the configuration register.
command uint8_t getGlobalIntensity() Get the value of the global intensity register.
command result_t set(uint8_t port, bool value) Set on or off ports input/output configuration.
command result_t setAll(uint8_t value) Set all of the LED outputs at once.
command result_t setBlink0(uint8_t port, bool value) Set the Blink0 register for a particular port.
command result_t setBlink1(uint8_t port, bool value) Set the Blink1 register for a particular port.
command result_t setBlinkAll0(uint8_t values) Set all of the Blink0 port values in the register.
command result_t setBlinkAll1(uint8_t values) Set all of the Blink1 port values in the register.
command result_t setConfig(max7315_config_t config) Set the configuration register of the MAX7315.
command result_t setGlobalIntensity(uint8_t value) Set the global intensity register.
command result_t setIntensity(uint8_t port, uint8_t value) Set the intensity for a specific port.

Events
event void allOffDone() Notification that everything is now off.
event void setAllDone(uint8_t value) Notification that the setAll operation has completed.
event void setBlink0Done() Notification that the Blink0 register has been set.
event void setBlink1Done() Notification that the Blink1 register has been set.
event void setBlinkAll0Done() Notification that the Blink0 register values have been set.
event void setBlinkAll1Done() Notification that the Blink1 register values have been set.
event void setConfigDone() Notification that the configuration register has been set.
event void setDone() Notification that the set operation has completed.
event void setGlobalIntensityDone() Notification that the global intensity register has been set.
event void setIntensityDone() Notification that the intensity has been set for the specified port.

Commands - Details

allOff

command result_t allOff()

Turns everything off for the lowest power consumption. Turns off blink, if enabled, and turns off all LEDs.

get

command uint8_t get()

Get the outputs configuration.

getBlink0

command uint8_t getBlink0()

Returns the current value of the Blink0 register.

getBlink1

command uint8_t getBlink1()

Returns the current value of the Blink1 register.

getConfig

command max7315_config_t getConfig()

Get the value of the configuration register.

getGlobalIntensity

command uint8_t getGlobalIntensity()

Get the value of the global intensity register.

set

command result_t set(uint8_t port, bool value)

Set on or off ports input/output configuration.

setAll

command result_t setAll(uint8_t value)

Set all of the LED outputs at once.

setBlink0

command result_t setBlink0(uint8_t port, bool value)

Set the Blink0 register for a particular port.

setBlink1

command result_t setBlink1(uint8_t port, bool value)

Set the Blink1 register for a particular port.

setBlinkAll0

command result_t setBlinkAll0(uint8_t values)

Set all of the Blink0 port values in the register.

setBlinkAll1

command result_t setBlinkAll1(uint8_t values)

Set all of the Blink1 port values in the register.

setConfig

command result_t setConfig(max7315_config_t config)

Set the configuration register of the MAX7315.

setGlobalIntensity

command result_t setGlobalIntensity(uint8_t value)

Set the global intensity register.

setIntensity

command result_t setIntensity(uint8_t port, uint8_t value)

Set the intensity for a specific port.

Events - Details

allOffDone

event void allOffDone()

Notification that everything is now off.

setAllDone

event void setAllDone(uint8_t value)

Notification that the setAll operation has completed.

setBlink0Done

event void setBlink0Done()

Notification that the Blink0 register has been set.

setBlink1Done

event void setBlink1Done()

Notification that the Blink1 register has been set.

setBlinkAll0Done

event void setBlinkAll0Done()

Notification that the Blink0 register values have been set.

setBlinkAll1Done

event void setBlinkAll1Done()

Notification that the Blink1 register values have been set.

setConfigDone

event void setConfigDone()

Notification that the configuration register has been set.

setDone

event void setDone()

Notification that the set operation has completed.

setGlobalIntensityDone

event void setGlobalIntensityDone()

Notification that the global intensity register has been set.

setIntensityDone

event void setIntensityDone()

Notification that the intensity has been set for the specified port.