aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos/gos_keil.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-10-19 22:07:34 +0200
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-10-19 22:07:34 +0200
commit73b39a7d36504d33e04309a359beeb027b854c5a (patch)
tree848a3dd25131694acf7ee4cd20de031ecc0d6394 /src/gos/gos_keil.h
parentd4d9a1be98d775f308367d2eba913ffd30eaa4f6 (diff)
downloaduGFX-73b39a7d36504d33e04309a359beeb027b854c5a.tar.gz
uGFX-73b39a7d36504d33e04309a359beeb027b854c5a.tar.bz2
uGFX-73b39a7d36504d33e04309a359beeb027b854c5a.zip
Updating KEIL port
Diffstat (limited to 'src/gos/gos_keil.h')
-rw-r--r--src/gos/gos_keil.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gos/gos_keil.h b/src/gos/gos_keil.h
index f966b956..f3f60113 100644
--- a/src/gos/gos_keil.h
+++ b/src/gos/gos_keil.h
@@ -15,6 +15,7 @@
#if GFX_USE_OS_KEIL
+#include <stdbool.h>
#include "cmsis_os.h"
#ifndef GFX_OS_HEAP_SIZE
@@ -25,7 +26,7 @@
/* Type definitions */
/*===========================================================================*/
-typedef uint8_t bool_t;
+typedef bool bool_t;
#define TIME_IMMEDIATE 0
#define TIME_INFINITE osWaitForever
@@ -52,8 +53,9 @@ typedef struct gfxMutex {
typedef osThreadId gfxThreadHandle;
-#define DECLARE_THREAD_STACK(name, sz)
-#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void* params)
+#define DECLARE_THREAD_STACK(name, sz) uint8_t name[1]; // Some compilers don't allow zero sized arrays. Let's waste one byte
+#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void* param)
+#define THREAD_RETURN(retval)
/*===========================================================================*/
/* Function declarations. */
@@ -66,7 +68,7 @@ extern "C" {
#define gfxExit() os_error(0)
#define gfxHalt(msg) os_error(1)
#define gfxSystemTicks() osKernelSysTick()
-#define gfxMillisecondsToTicks(ms) osKernelSysTickMicroSec(1000*(ms))
+#define gfxMillisecondsToTicks(ms) osKernelSysTickMicroSec(1000*ms)
#define gfxSystemLock() osKernelInitialize()
#define gfxSystemUnlock() osKernelStart()
#define gfxSleepMilliseconds(ms) osDelay(ms)