guiInit() returns pointer to created thread

ugfx_release_2.6
Tectu 2012-06-25 10:52:52 +02:00
parent f2cb8a0c53
commit 192282d6af
2 changed files with 5 additions and 3 deletions

4
gui.c
View File

@ -70,9 +70,11 @@ static void barThread(struct bar_t *a) {
} }
} }
void guiInit(uint16_t updateInterval) { Thread *guiInit(uint16_t updateInterval) {
Thread *tp = NULL; Thread *tp = NULL;
tp = chThdCreateFromHeap(NULL, THD_WA_SIZE(64), HIGHPRIO-1, TouchPadThread, updateInterval); tp = chThdCreateFromHeap(NULL, THD_WA_SIZE(64), HIGHPRIO-1, TouchPadThread, updateInterval);
return tp;
} }
Thread *guiDrawButton(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, char *str, uint16_t fontColor, uint16_t buttonColor, uint16_t interval, uint8_t *active, uint8_t *state) { Thread *guiDrawButton(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, char *str, uint16_t fontColor, uint16_t buttonColor, uint16_t interval, uint8_t *active, uint8_t *state) {

4
gui.h
View File

@ -39,9 +39,9 @@ extern "C" {
* param: * param:
* - updateInterval: update interval in milliseconds until next coordinates read-out * - updateInterval: update interval in milliseconds until next coordinates read-out
* *
* return: none * return: pointer to created thread
*/ */
void guiInit(uint16_t updateIntervl); Thread *guiInit(uint16_t updateIntervl);
/* /*
* Description: draws button and creates thread which keeps pressed/unpressed state up-to-date * Description: draws button and creates thread which keeps pressed/unpressed state up-to-date