LPC11xx DPI driver working, demo updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2286 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
af0921235f
commit
da7438dffe
|
@ -51,9 +51,10 @@
|
||||||
/*
|
/*
|
||||||
* GPIO 1 initial setup.
|
* GPIO 1 initial setup.
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIO1DIR PAL_PORT_BIT(GPIO1_LED3B) | \
|
#define VAL_GPIO1DIR PAL_PORT_BIT(GPIO1_LED3B) | \
|
||||||
PAL_PORT_BIT(GPIO1_LED3R) | \
|
PAL_PORT_BIT(GPIO1_LED3R) | \
|
||||||
PAL_PORT_BIT(GPIO1_LED3G)
|
PAL_PORT_BIT(GPIO1_LED3G) | \
|
||||||
|
PAL_PORT_BIT(GPIO1_SPI0SEL)
|
||||||
#define VAL_GPIO1DATA 0x00000000
|
#define VAL_GPIO1DATA 0x00000000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -21,10 +21,14 @@
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
static void endsend(SPIDriver *spip) {
|
||||||
|
|
||||||
|
spiUnselect(spip);
|
||||||
|
}
|
||||||
|
|
||||||
/* Maximum speed SPI configuration (1MHz, CPHA=0, CPOL=0).*/
|
/* Maximum speed SPI configuration (1MHz, CPHA=0, CPOL=0).*/
|
||||||
static SPIConfig spicfg = {
|
static SPIConfig spicfg = {
|
||||||
NULL,
|
endsend,
|
||||||
GPIO1,
|
GPIO1,
|
||||||
GPIO1_SPI0SEL,
|
GPIO1_SPI0SEL,
|
||||||
CR0_DSS8BIT | CR0_FRFSPI | CR0_CLOCKRATE(0),
|
CR0_DSS8BIT | CR0_FRFSPI | CR0_CLOCKRATE(0),
|
||||||
|
@ -40,6 +44,7 @@ static msg_t Thread1(void *arg) {
|
||||||
|
|
||||||
(void)arg;
|
(void)arg;
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
spiSelect(&SPID1);
|
||||||
spiStartSend(&SPID1, 1, &digit);
|
spiStartSend(&SPID1, 1, &digit);
|
||||||
digit++;
|
digit++;
|
||||||
palClearPad(GPIO0, GPIO0_LED2);
|
palClearPad(GPIO0, GPIO0_LED2);
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
new SPI device driver model.
|
new SPI device driver model.
|
||||||
- NEW: Improved AT91SAM7 SPI driver, now it uses IRQs and DMAs, it implements
|
- NEW: Improved AT91SAM7 SPI driver, now it uses IRQs and DMAs, it implements
|
||||||
the new SPI device driver model.
|
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 ADC demo under ./testhal/STM32/ADC.
|
||||||
- NEW: Added a simple STM32 CAN demo under ./testhal/STM32/CAN.
|
- NEW: Added a simple STM32 CAN demo under ./testhal/STM32/CAN.
|
||||||
- NEW: Added a simple STM32 PWM demo under ./testhal/STM32/PWM.
|
- NEW: Added a simple STM32 PWM demo under ./testhal/STM32/PWM.
|
||||||
|
|
Loading…
Reference in New Issue