From 1760cd3aadb5d3a24479424b1e19570361f45abd Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 7 Feb 2015 22:25:00 +1000 Subject: [PATCH] Oops - left some debugging. --- boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h b/boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h index 0ec832aa..137808da 100644 --- a/boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h +++ b/boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h @@ -33,7 +33,6 @@ #define PORT_DC UEXT_PORT_PIN6 #define PIN_DC UEXT_PORTPIN_PIN6 - #if PIO_METHOD == PIO_METHOD_AT91 #define PinIsOutput(port,pin) ((port)->PIO_OER = 1 << (pin), (port)->PIO_PER = 1 << (pin), (port)->PIO_MDDR = 1 << (pin), (port)->PIO_PPUDR = 1 << (pin)) #define PinSet(port,pin) (port)->PIO_SODR = 1 << (pin) @@ -58,9 +57,9 @@ PinSet(UEXT_SPI_MOSI_PORT, UEXT_SPI_MOSI_PORTPIN); else PinClear(UEXT_SPI_MOSI_PORT, UEXT_SPI_MOSI_PORTPIN); - spi_delay(1000); + spi_delay(1); PinClear(UEXT_SPI_SCK_PORT, UEXT_SPI_SCK_PORTPIN); - spi_delay(1000); + spi_delay(1); PinSet(UEXT_SPI_SCK_PORT, UEXT_SPI_SCK_PORTPIN); } } @@ -101,7 +100,7 @@ UEXT_SPI_PORT->PIO_PPUER = 1<PIO_PDR = (1<UEXT_SPI_PERIPH = (1<PMC_PCER = 1 << UEXT_SPI_ID; \ + AT91C_BASE_PMC->PMC_PCER = 1 << UEXT_SPI_ID; \ UEXT_SPI_DEV->SPI_CR = 0x81; \ UEXT_SPI_DEV->SPI_CR = 0x81; \ UEXT_SPI_DEV->SPI_CR = 0x01; \