SZSPTP ez430-RF2480 1.0

ZigBee Sensor Network with synchronized time and time-stamped measurements.
LED control

LED control. More...

Files

file  led.c
 Led implementation.
 
file  led.h
 Led interface.
 

Functions

void led_init ()
 LED Initialization. More...
 
UInt16 led_proccess ()
 This function processes the tasks of the LED, it controls the red LED. More...
 
void led_redConfigure (UInt8 n, UInt16 offDelay)
 Configures red led. More...
 
void led_greenUp ()
 Green led up. More...
 
void led_greenDown ()
 Green led down. More...
 

Detailed Description

LED control.

Control of the LEDs, red and green. Each one has separated ways to be Controlled.

Function Documentation

void led_greenDown ( )

Green led down.

This function decreases 1 from the green LED request counter and turn it off if counter reaches 0.

Definition at line 228 of file led.c.

References im_disable_interrupt(), im_enable_interrupt(), led_control, LED_GREENCLR, and LED_GREENCTRLMASK.

+ Here is the call graph for this function:

void led_greenUp ( )

Green led up.

This function adds 1 to the green LED request counter and turn it on

Definition at line 212 of file led.c.

References im_disable_interrupt(), im_enable_interrupt(), led_control, LED_GREENCTRLMASK, and LED_GREENSET.

+ Here is the call graph for this function:

void led_init ( )

LED Initialization.

This function initializes the LED control variables.

Definition at line 141 of file led.c.

References led_control, led_currentState, and led_redCfg.

Referenced by main().

+ Here is the caller graph for this function:

UInt16 led_proccess ( )

This function processes the tasks of the LED, it controls the red LED.

The red LED blinks periodically in a configurable pattern with some limitations, it blinks at 5 Hz, from 0 to 15 times then it stays off for up to 4095ms. Green LED free to be controlled by the application.

Returns
Time to run again (ms); 0 means 65536ms

Definition at line 158 of file led.c.

References led_control, led_currentState, led_redCfg, LED_REDCLR, LED_REDCTRLMASK, LED_REDGET, and LED_REDSET.

Referenced by main().

+ Here is the caller graph for this function:

void led_redConfigure ( UInt8  n,
UInt16  offDelay 
)

Configures red led.

The configuration may take up to 1s to take effect if blink is disabled and up to the configured delay or 190ms (the larger value) if blink is enabled. Each blink is 10ms on and 190ms off.

Parameters
[in]nNumber of times to blink, from 0 to 15.
[in]offDelayTime (ms) to stay off after blinking n times, from 0 to 4095.

Definition at line 201 of file led.c.

References led_redCfg.

Referenced by nwk_getDeviceInfoRsp(), nwk_process(), nwk_resetResume(), nwk_setDeviceType(), and nwk_wakeUp().

+ Here is the caller graph for this function: