aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-GCC
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-17 11:07:15 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-17 11:07:15 +0000
commite9d7b9de5705a3b5c0b822077fbd165c86087481 (patch)
treefc6a51fec7f88d34acfeb79df63cc8a4d9a10f54 /demos/ARM7-LPC214x-GCC
parent26ed3732876a649fb02a83e768e4392034d65653 (diff)
downloadChibiOS-e9d7b9de5705a3b5c0b822077fbd165c86087481.tar.gz
ChibiOS-e9d7b9de5705a3b5c0b822077fbd165c86087481.tar.bz2
ChibiOS-e9d7b9de5705a3b5c0b822077fbd165c86087481.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1230 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-GCC')
-rw-r--r--demos/ARM7-LPC214x-GCC/Makefile4
-rw-r--r--demos/ARM7-LPC214x-GCC/buzzer.c5
-rw-r--r--demos/ARM7-LPC214x-GCC/main.c8
-rw-r--r--demos/ARM7-LPC214x-GCC/mmcsd.c1
4 files changed, 13 insertions, 5 deletions
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile
index 54b1e0ffd..792ff4fbd 100644
--- a/demos/ARM7-LPC214x-GCC/Makefile
+++ b/demos/ARM7-LPC214x-GCC/Makefile
@@ -127,10 +127,10 @@ AOPT =
TOPT = -mthumb -DTHUMB
# Define C warning options here
-CWARN = -Wall -Wstrict-prototypes
+CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
-CPPWARN = -Wall
+CPPWARN = -Wall -Wextra
#
# Compiler settings
diff --git a/demos/ARM7-LPC214x-GCC/buzzer.c b/demos/ARM7-LPC214x-GCC/buzzer.c
index 25be0e2d9..1d3350bb2 100644
--- a/demos/ARM7-LPC214x-GCC/buzzer.c
+++ b/demos/ARM7-LPC214x-GCC/buzzer.c
@@ -58,9 +58,8 @@ void InitBuzzer(void) {
}
static void stop(void *p) {
- TC *tc = T1Base;
- StopCounter(tc);
+ StopCounter((TC *)p);
chEvtBroadcastI(&BuzzerSilentEventSource);
}
@@ -77,7 +76,7 @@ void PlaySound(int freq, systime_t duration) {
tc->TC_MR0 = tc->TC_MR1 = (PCLK / (freq * 2));
StartCounter(tc);
- chVTSetI(&bvt, duration, stop, NULL);
+ chVTSetI(&bvt, duration, stop, tc);
chSysUnlock();
}
diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c
index a8db1b667..93b6fd768 100644
--- a/demos/ARM7-LPC214x-GCC/main.c
+++ b/demos/ARM7-LPC214x-GCC/main.c
@@ -35,6 +35,7 @@
static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2));
chThdSleepMilliseconds(200);
@@ -54,6 +55,7 @@ static msg_t Thread1(void *arg) {
static WORKING_AREA(waThread2, 128);
static msg_t Thread2(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPad(IOPORT1, PA_LEDUSB);
chThdSleepMilliseconds(200);
@@ -70,6 +72,7 @@ static WORKING_AREA(waTestThread, 128);
*/
static void TimerHandler(eventid_t id) {
+ (void)id;
if (!(palReadPort(IOPORT1) & BOTH_BUTTONS)) {
Thread *tp = chThdCreateStatic(waTestThread, sizeof(waTestThread),
NORMALPRIO, TestThread, &SD1);
@@ -94,6 +97,7 @@ static void InsertHandler(eventid_t id) {
static uint8_t rwbuf[512];
MMCCSD data;
+ (void)id;
PlaySoundWait(1000, MS2ST(100));
PlaySoundWait(2000, MS2ST(100));
if (mmcInit())
@@ -111,6 +115,7 @@ static void InsertHandler(eventid_t id) {
*/
static void RemoveHandler(eventid_t id) {
+ (void)id;
PlaySoundWait(2000, MS2ST(100));
PlaySoundWait(1000, MS2ST(100));
}
@@ -128,6 +133,9 @@ int main(int argc, char **argv) {
static EvTimer evt;
struct EventListener el0, el1, el2;
+ (void)argc;
+ (void)argv;
+
/*
* Activates the serial driver 2 using the driver default configuration.
*/
diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.c b/demos/ARM7-LPC214x-GCC/mmcsd.c
index aba532544..731f594a2 100644
--- a/demos/ARM7-LPC214x-GCC/mmcsd.c
+++ b/demos/ARM7-LPC214x-GCC/mmcsd.c
@@ -42,6 +42,7 @@ void InitMMC(void) {
void tmrfunc(void *par) {
+ (void)par;
if (cnt) {
if (!palReadPad(IOPORT2, PB_CP1)) {
if (!--cnt)