diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-10-24 20:00:20 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-10-24 20:00:20 +0000 |
commit | da7438dffea3781f9228d6f322c6912631bb9a19 (patch) | |
tree | 7562e1e98c53f7c7b0b403bbadab517a5e457c16 | |
parent | af0921235ffe94efb5467b3877b763d3c030cb0c (diff) | |
download | ChibiOS-da7438dffea3781f9228d6f322c6912631bb9a19.tar.gz ChibiOS-da7438dffea3781f9228d6f322c6912631bb9a19.tar.bz2 ChibiOS-da7438dffea3781f9228d6f322c6912631bb9a19.zip |
LPC11xx DPI driver working, demo updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2286 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | boards/EA_LPCXPRESSO_BB_1114/board.h | 7 | ||||
-rw-r--r-- | demos/ARMCM0-LPC1114-GCC/main.c | 7 | ||||
-rw-r--r-- | readme.txt | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/boards/EA_LPCXPRESSO_BB_1114/board.h b/boards/EA_LPCXPRESSO_BB_1114/board.h index 07966c527..60126b548 100644 --- a/boards/EA_LPCXPRESSO_BB_1114/board.h +++ b/boards/EA_LPCXPRESSO_BB_1114/board.h @@ -51,9 +51,10 @@ /*
* GPIO 1 initial setup.
*/
-#define VAL_GPIO1DIR PAL_PORT_BIT(GPIO1_LED3B) | \
- PAL_PORT_BIT(GPIO1_LED3R) | \
- PAL_PORT_BIT(GPIO1_LED3G)
+#define VAL_GPIO1DIR PAL_PORT_BIT(GPIO1_LED3B) | \
+ PAL_PORT_BIT(GPIO1_LED3R) | \
+ PAL_PORT_BIT(GPIO1_LED3G) | \
+ PAL_PORT_BIT(GPIO1_SPI0SEL)
#define VAL_GPIO1DATA 0x00000000
/*
diff --git a/demos/ARMCM0-LPC1114-GCC/main.c b/demos/ARMCM0-LPC1114-GCC/main.c index 3a5197207..70e8312ab 100644 --- a/demos/ARMCM0-LPC1114-GCC/main.c +++ b/demos/ARMCM0-LPC1114-GCC/main.c @@ -21,10 +21,14 @@ #include "hal.h"
#include "test.h"
+static void endsend(SPIDriver *spip) {
+
+ spiUnselect(spip);
+}
/* Maximum speed SPI configuration (1MHz, CPHA=0, CPOL=0).*/
static SPIConfig spicfg = {
- NULL,
+ endsend,
GPIO1,
GPIO1_SPI0SEL,
CR0_DSS8BIT | CR0_FRFSPI | CR0_CLOCKRATE(0),
@@ -40,6 +44,7 @@ static msg_t Thread1(void *arg) { (void)arg;
while (TRUE) {
+ spiSelect(&SPID1);
spiStartSend(&SPID1, 1, &digit);
digit++;
palClearPad(GPIO0, GPIO0_LED2);
diff --git a/readme.txt b/readme.txt index 594bb0506..7e78619ac 100644 --- a/readme.txt +++ b/readme.txt @@ -119,6 +119,7 @@ new SPI device driver model.
- NEW: Improved AT91SAM7 SPI driver, now it uses IRQs and DMAs, it implements
the new SPI device driver model.
+- NEW: New LPC11xx SPI driver.
- NEW: Added a simple STM32 ADC demo under ./testhal/STM32/ADC.
- NEW: Added a simple STM32 CAN demo under ./testhal/STM32/CAN.
- NEW: Added a simple STM32 PWM demo under ./testhal/STM32/PWM.
|