Go to the source code of this file.
Functions | |
void | Key1Thread (void *arg) |
First thread responding to pressed keys. | |
void | Key2Thread (void *arg) |
Second0 thread responding to pressed keys. | |
int | main (void) |
Variables | |
HANDLE | led1 |
HANDLE | led2 |
HANDLE | led3 |
HANDLE | led4 |
HANDLE | keyUp |
HANDLE | keyDn |
HANDLE | keyLt |
HANDLE | keyRt |
HANDLE | keyMi |
HANDLE | keyT1w |
HANDLE | keyT2w |
void Key1Thread | ( | void * | arg | ) |
First thread responding to pressed keys.
This thread handles some of the keys of this example. In response to a key it gives some text on the debug consle and alters the behaviour of the assigned LEDs.
Definition at line 82 of file pbtest.c.
References KEY_PENDING, keyDn, keyMi, keyT1w, led2, led3, led4, LED_BLINK, LED_OFF, NUT_WAIT_INFINITE, NutEventWait(), NutGetKeyState(), NutSetLed(), NutThreadSetPriority(), and printf.
Referenced by main().
void Key2Thread | ( | void * | arg | ) |
Second0 thread responding to pressed keys.
This thread handles some of the keys of this example. In response to a key it gives some text on the debug consle and alters the behaviour of the assigned LEDs.
Definition at line 110 of file pbtest.c.
References KEY_PENDING, keyLt, keyRt, keyT2w, keyUp, led2, led3, led4, LED_FLIP, LED_OFF, LED_ON, NUT_WAIT_INFINITE, NutEventWait(), NutGetKeyState(), NutSetLed(), NutThreadSetPriority(), and printf.
Referenced by main().
int main | ( | void | ) |
Definition at line 136 of file pbtest.c.
References _fileno(), _ioctl(), DEV_DEBUG, DEV_DEBUG_NAME, freopen(), Key1Thread(), Key2Thread(), KEY_ACTION_DOWN, KEY_ACTION_HOLD, KEY_ACTION_SHORT, KEY_ACTION_UP, keyDn, keyLt, keyMi, keyRt, keyT1w, keyT2w, keyUp, led1, led2, led3, led4, LED_BLINK, LED_ON, NUTGPIO_PORTA, NUTGPIO_PORTB, NutRegisterDevice(), NutRegisterKey(), NutRegisterLed(), NutSetLed(), NutSleep(), NutThreadCreate(), putchar(), puts, stdout, and UART_SETSPEED.
Definition at line 68 of file pbtest.c.
Referenced by Key1Thread(), Key2Thread(), main(), and Thread2().
Definition at line 68 of file pbtest.c.
Referenced by Key1Thread(), Key2Thread(), and main().