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... | |
LED control.
Control of the LEDs, red and green. Each one has separated ways to be Controlled.
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.
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.
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().
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.
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().
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.
[in] | n | Number of times to blink, from 0 to 15. |
[in] | offDelay | Time (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().