aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-06-25 10:52:52 +0200
committerTectu <joel@unormal.org>2012-06-25 10:52:52 +0200
commit192282d6aff3a7fbe7c73e7c181d62955586bbce (patch)
tree21548c43172d00b34cf63b5c29d13f5ddd5d1036
parentf2cb8a0c5310430a88c3392f8f7b8048da97dbc5 (diff)
downloaduGFX-192282d6aff3a7fbe7c73e7c181d62955586bbce.tar.gz
uGFX-192282d6aff3a7fbe7c73e7c181d62955586bbce.tar.bz2
uGFX-192282d6aff3a7fbe7c73e7c181d62955586bbce.zip
guiInit() returns pointer to created thread
-rw-r--r--gui.c4
-rw-r--r--gui.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/gui.c b/gui.c
index 05406373..ec1ee951 100644
--- a/gui.c
+++ b/gui.c
@@ -70,9 +70,11 @@ static void barThread(struct bar_t *a) {
}
}
-void guiInit(uint16_t updateInterval) {
+Thread *guiInit(uint16_t updateInterval) {
Thread *tp = NULL;
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) {
diff --git a/gui.h b/gui.h
index 66200c7a..d56ca6e7 100644
--- a/gui.h
+++ b/gui.h
@@ -39,9 +39,9 @@ extern "C" {
* param:
* - 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