Go to the source code of this file.
Functions | |
void | InitLED (LEDEventT *led) |
Configures LED connection port. | |
void | TimerCallback (HANDLE timer, void *arg) |
Callback function for LED blink and flash timer. | |
void | sys_led (void *arg) |
Thread to control blinking and flashing of all registered LEDs. | |
void | NutSetLed (HANDLE ledh, uint8_t tim, uint8_t fxin) |
sets state of a LED | |
int | NutRegisterLed (HANDLE *ledh, int bank, int pin) |
register an LED for handling. | |
Variables | |
LEDEventT * | first_led = NULL |
HANDLE | led_evt = NULL |
HANDLE | led_tmr = NULL |
void InitLED | ( | LEDEventT * | led | ) |
Configures LED connection port.
Definition at line 82 of file led.c.
References GPIO_CFG_OUTPUT, GpioPinConfigSet(), GpioPinSetHigh(), IOExpPinConfigSet(), IOExpSetBitHigh(), and IOXP_PORT0.
Referenced by NutRegisterLed().
void TimerCallback | ( | HANDLE | timer, | |
void * | arg | |||
) |
Callback function for LED blink and flash timer.
Definition at line 100 of file led.c.
References NutEventPostAsync().
void sys_led | ( | void * | arg | ) |
Thread to control blinking and flashing of all registered LEDs.
Definition at line 112 of file led.c.
References first_led, LED_OFF, LED_ONESHOT, NUT_WAIT_INFINITE, NutEventWait(), NutSetLed(), and NutThreadSetPriority().
Referenced by NutSetLed().
sets state of a LED
ledh | the handle to the LED that should be controlled. | |||||||||||
tim,: | interval for blinking or time for oneshot. | |||||||||||
fxin,: | effect to set
|
Definition at line 153 of file led.c.
References GpioPinSet(), IOExpSetBit(), IOXP_PORT0, LED_BLINK, led_evt, LED_FLIP, LED_OFF, LED_ON, LED_ONESHOT, led_tmr, NutThreadCreate(), NutTimerStart(), sys_led(), and TimerCallback().
Referenced by sys_led().
int NutRegisterLed | ( | HANDLE * | ledh, | |
int | bank, | |||
int | pin | |||
) |
register an LED for handling.
ledh | the led-handle for accessing the LED through NutSetLed(). | |
bank,: | Port of CPU or IO-Expander the LED is connected to. | |
pin,: | Pin at the given port. |
LEDEventT* first_led = NULL |