From d158e16ed86a5617ef748f69cede95a32a1526df Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 7 May 2008 12:00:55 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@282 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/templates/chcore.h | 16 +++++++++++----- src/templates/chtypes.h | 6 +++--- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/templates/chcore.h b/src/templates/chcore.h index c13ee59ed..879e2732c 100644 --- a/src/templates/chcore.h +++ b/src/templates/chcore.h @@ -76,7 +76,7 @@ typedef struct { * Macro used to allocate a thread working area aligned as both position and * size. */ -#define WorkingArea(s, n) BYTE8 s[UserStackSize(n)]; +#define WorkingArea(s, n) uint8_t s[UserStackSize(n)]; /** * Enters the ChibiOS/RT system mutual exclusion zone, the implementation is @@ -115,10 +115,16 @@ typedef struct { */ #define chSysIRQExitI() -void _IdleThread(void *p); -void chSysHalt(void); -void chSysSwitchI(Thread *otp, Thread *ntp); -void chSysPuts(char *msg); +#ifdef __cplusplus +extern "C" { +#endif + void _IdleThread(void *p); + void chSysHalt(void); + void chSysSwitchI(Thread *otp, Thread *ntp); + void chSysPuts(char *msg); +#ifdef __cplusplus +} +#endif #endif /* _CHCORE_H_ */ diff --git a/src/templates/chtypes.h b/src/templates/chtypes.h index 1c4004c6d..b333c1a49 100644 --- a/src/templates/chtypes.h +++ b/src/templates/chtypes.h @@ -33,9 +33,9 @@ #include #endif -typedef int8_t bool_t; /* Signed byte boolean. */ -typedef uint8_t tmode_t; /* Thread mode flags, BYTE8 is ok. */ -typedef uint8_t tstate_t; /* Thread state, BYTE8 is ok. */ +typedef int32_t bool_t; /* Signed boolean. */ +typedef uint8_t tmode_t; /* Thread mode flags, uint8_t is ok. */ +typedef uint8_t tstate_t; /* Thread state, uint8_t is ok. */ typedef uint16_t tid_t; /* Thread id. */ typedef uint32_t tprio_t; /* Priority, use the fastest unsigned type. */ typedef int32_t msg_t; /* Message, use signed pointer equivalent.*/ -- cgit v1.2.3