diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-11-12 15:02:23 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-11-12 15:02:23 +0000 |
commit | a7ad3ace523d19be103e03f6244e0e797354fe0f (patch) | |
tree | 62234f13c1fcb3477d16f5727b60503900b87f7f /demos/ARM7-LPC214x-GCC | |
parent | 48cdf91217fd6460628315a63ccc9e87de21c193 (diff) | |
download | ChibiOS-a7ad3ace523d19be103e03f6244e0e797354fe0f.tar.gz ChibiOS-a7ad3ace523d19be103e03f6244e0e797354fe0f.tar.bz2 ChibiOS-a7ad3ace523d19be103e03f6244e0e797354fe0f.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@87 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-GCC')
-rw-r--r-- | demos/ARM7-LPC214x-GCC/Makefile | 6 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/buzzer.c | 2 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/buzzer.h | 12 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/chconf.h | 6 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/chcore.h | 5 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/chtypes.h | 1 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/mmcsd.h | 32 |
7 files changed, 41 insertions, 23 deletions
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 0ee445783..755c134e5 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -65,9 +65,9 @@ UADEFS = ASRC = chcore.c main.c buzzer.c mmcsd.c ../../src/lib/evtimer.c ../../test/test.c \
../../ports/ARM7-LPC214x/GCC/vic.c ../../ports/ARM7-LPC214x/GCC/lpc214x_serial.c \
../../ports/ARM7-LPC214x/GCC/lpc214x_ssp.c \
- ../../src/chinit.c ../../src/chlists.c ../../src/chdelta.c ../../src/chschd.c \
- ../../src/chthreads.c ../../src/chsem.c ../../src/chevents.c ../../src/chmsg.c \
- ../../src/chsleep.c ../../src/chqueues.c ../../src/chserial.c
+ ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
+ ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chevents.c \
+ ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c ../../src/chserial.c
# List THUMB-mode C sources here
# NOTE: If any module is compiled in thumb mode then -mthumb-interwork is
diff --git a/demos/ARM7-LPC214x-GCC/buzzer.c b/demos/ARM7-LPC214x-GCC/buzzer.c index a93bafa98..218d920d0 100644 --- a/demos/ARM7-LPC214x-GCC/buzzer.c +++ b/demos/ARM7-LPC214x-GCC/buzzer.c @@ -89,4 +89,4 @@ void PlaySoundWait(int freq, t_time duration) { StartCounter(tc);
chThdSleep(duration);
StopCounter(tc);
-}
\ No newline at end of file +}
diff --git a/demos/ARM7-LPC214x-GCC/buzzer.h b/demos/ARM7-LPC214x-GCC/buzzer.h index f5f9e82ac..464e081d8 100644 --- a/demos/ARM7-LPC214x-GCC/buzzer.h +++ b/demos/ARM7-LPC214x-GCC/buzzer.h @@ -20,9 +20,15 @@ #ifndef _BUZZER_H_
#define _BUZZER_H_
-void InitBuzzer(void);
-void PlaySound(int freq, t_time duration);
-void PlaySoundWait(int freq, t_time duration);
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void InitBuzzer(void);
+ void PlaySound(int freq, t_time duration);
+ void PlaySoundWait(int freq, t_time duration);
+#ifdef __cplusplus
+}
+#endif
extern EventSource BuzzerSilentEventSource;
diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index f4d902a9a..ba9957e49 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -156,6 +156,12 @@ */
//#define CH_CURRP_REGISTER_CACHE "r7"
+/** Configuration option: Includes basic debug support to the kernel.
+ * @note the debug support is port-dependent, it may be not present on some
+ * targets. In that case stub functions will be included.
+ */
+#define CH_USE_DEBUG
+
#endif /* _CHCONF_H_ */
/** @} */
diff --git a/demos/ARM7-LPC214x-GCC/chcore.h b/demos/ARM7-LPC214x-GCC/chcore.h index 9c583c2ac..5a42cdf89 100644 --- a/demos/ARM7-LPC214x-GCC/chcore.h +++ b/demos/ARM7-LPC214x-GCC/chcore.h @@ -92,8 +92,9 @@ extern void chSysUnlock(void); #define chSysUnlock() asm("msr CPSR_c, #0x1F")
#endif /* THUMB */
-#define INT_REQUIRED_STACK 0x40 // Must include registers and stack frames.
+#define chSysPuts(msg) {}
+#define INT_REQUIRED_STACK 0x40 // Must include registers and stack frames.
#define UserStackSize(n) (sizeof(Thread) + \
sizeof(struct stackregs) + (n) + (INT_REQUIRED_STACK))
@@ -105,6 +106,4 @@ void DefFiqHandler(void); void DefIrqHandler(void);
void SpuriousHandler(void);
-void SetVICVector(void *handler, int vector, int source);
-
#endif /* _CHCORE_H_ */
diff --git a/demos/ARM7-LPC214x-GCC/chtypes.h b/demos/ARM7-LPC214x-GCC/chtypes.h index 803b5ead4..2ac219148 100644 --- a/demos/ARM7-LPC214x-GCC/chtypes.h +++ b/demos/ARM7-LPC214x-GCC/chtypes.h @@ -33,6 +33,7 @@ typedef BYTE8 t_tmode;
typedef BYTE8 t_tstate;
+typedef UWORD16 t_tid;
typedef ULONG32 t_prio;
typedef LONG32 t_msg;
typedef LONG32 t_eventid;
diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.h b/demos/ARM7-LPC214x-GCC/mmcsd.h index 823a76a3d..b5f0ea57c 100644 --- a/demos/ARM7-LPC214x-GCC/mmcsd.h +++ b/demos/ARM7-LPC214x-GCC/mmcsd.h @@ -43,18 +43,24 @@ typedef struct { extern EventSource MMCInsertEventSource, MMCRemoveEventSource;
-void InitMMC(void);
-
-BOOL mmcInit(void);
-void mmcStartPolling(void);
-void mmcStopPolling(void);
-BOOL mmcCardInserted (void);
-BYTE8 mmcSendCommand(BYTE8 cmd, ULONG32 arg);
-BOOL mmcGetSize(MMCCSD *data);
-BOOL mmcRead(BYTE8 *buf, ULONG32 blknum);
-BOOL mmcReadMultiple(BYTE8 *buf, ULONG32 blknum, ULONG32 n);
-BOOL mmcWrite(BYTE8 *buf, ULONG32 blknum);
-BOOL mmcWriteMultiple(BYTE8 *buf, ULONG32 blknum, ULONG32 n);
-void mmcSynch(void);
+#ifdef __cplusplus
+}
+#endif
+ void InitMMC(void);
+
+ BOOL mmcInit(void);
+ void mmcStartPolling(void);
+ void mmcStopPolling(void);
+ BOOL mmcCardInserted (void);
+ BYTE8 mmcSendCommand(BYTE8 cmd, ULONG32 arg);
+ BOOL mmcGetSize(MMCCSD *data);
+ BOOL mmcRead(BYTE8 *buf, ULONG32 blknum);
+ BOOL mmcReadMultiple(BYTE8 *buf, ULONG32 blknum, ULONG32 n);
+ BOOL mmcWrite(BYTE8 *buf, ULONG32 blknum);
+ BOOL mmcWriteMultiple(BYTE8 *buf, ULONG32 blknum, ULONG32 n);
+ void mmcSynch(void);
+#ifdef __cplusplus
+}
+#endif
#endif /* _MMCSD_H_*/
|