From 2bca32f80b989a211fb39b7e04ef5834f79fea4a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 31 Oct 2007 15:52:26 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@71 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-GCC/chcore.c | 1 - demos/ARM7-LPC214x-GCC/chcore2.s | 10 ---------- demos/ARM7-LPC214x-GCC/main.c | 11 +++++++---- 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'demos/ARM7-LPC214x-GCC') diff --git a/demos/ARM7-LPC214x-GCC/chcore.c b/demos/ARM7-LPC214x-GCC/chcore.c index beee2a7ae..9624c5b42 100644 --- a/demos/ARM7-LPC214x-GCC/chcore.c +++ b/demos/ARM7-LPC214x-GCC/chcore.c @@ -118,7 +118,6 @@ void hwinit(void) { SetVICVector(T0IrqHandler, 0, SOURCE_Timer0); SetVICVector(UART0IrqHandler, 1, SOURCE_UART0); SetVICVector(UART1IrqHandler, 2, SOURCE_UART1); - SetVICVector(SSPIrqHandler, 3, SOURCE_SPI1); /* * System Timer initialization, 1ms intervals. diff --git a/demos/ARM7-LPC214x-GCC/chcore2.s b/demos/ARM7-LPC214x-GCC/chcore2.s index 97a38fdfe..f734eebba 100644 --- a/demos/ARM7-LPC214x-GCC/chcore2.s +++ b/demos/ARM7-LPC214x-GCC/chcore2.s @@ -155,16 +155,6 @@ UART1IrqHandler: bl UART1Irq b IrqCommon -.globl SSPIrqHandler -SSPIrqHandler: - sub lr, lr, #4 - stmfd sp!, {r0-r3, r12, lr} - mrs r0, SPSR // Workaround for ARM7TDMI+VIC - tst r0, #I_BIT // spurious interrupts. - ldmnefd sp!, {r0-r3, r12, pc}^ - bl SSPIrq - b IrqCommon - /* * Common exit point for all IRQ routines, it performs the rescheduling if * required. diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c index 564c03bfc..702a25d98 100644 --- a/demos/ARM7-LPC214x-GCC/main.c +++ b/demos/ARM7-LPC214x-GCC/main.c @@ -21,6 +21,7 @@ #include "lpc214x.h" #include "lpc214x_serial.h" +#include "lpc214x_ssp.h" #include "buzzer.h" #include "evtimer.h" @@ -55,9 +56,9 @@ static t_msg Thread2(void *arg) { } static void TimerHandler(t_eventid id) { - + static BYTE8 sspbuf[16]; t_msg TestThread(void *p); - + if (!(IO0PIN & 0x00018000)) { // Both buttons TestThread(&COM1); PlaySound(500, 100); @@ -65,8 +66,10 @@ static void TimerHandler(t_eventid id) { else { if (!(IO0PIN & 0x00008000)) // Button 1 PlaySound(1000, 100); - if (!(IO0PIN & 0x00010000)) // Button 2 - chFDDWrite(&COM1, (BYTE8 *)"Hello World!\r\n", 14); + if (!(IO0PIN & 0x00010000)) { // Button 2 + sspRW(sspbuf, (BYTE8 *)"Hello World!\r\n", 14); + chFDDWrite(&COM1, sspbuf, 14); + } } } -- cgit v1.2.3