Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "spi.h"
#include "rfm69.h"

#ifdef defined(GATEWAY) || defined(DEBUG) || defined(GPS)
#if defined(GATEWAY) || defined(DEBUG) || defined(GPS)
#include "uart.h"
#endif

Expand Down Expand Up @@ -77,18 +77,28 @@ void configurePins() {
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<7);

/* Pin Assign 8 bit Configuration */
#ifdef ADC
/* U0_TXD */
LPC_SWM->PINASSIGN0 = 0xffffff00UL;
#else
/* U0_TXD */
/* U0_RXD */
LPC_SWM->PINASSIGN0 = 0xffff0001UL;
#endif
/* SPI0_SCK */
LPC_SWM->PINASSIGN3 = 0x02ffffffUL;
/* SPI0_MOSI */
/* SPI0_MISO */
/* SPI0_SSEL */
LPC_SWM->PINASSIGN4 = 0xff050304UL;

#ifdef ADC
/* Pin Assign 1 bit Configuration */
/* ACMP_I2 */
LPC_SWM->PINENABLE0 = 0xfffffffdUL;
#else
LPC_SWM->PINENABLE0 = 0xffffffffUL;
#endif

}

Expand Down