aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
Diffstat (limited to 'boards')
-rw-r--r--boards/EA_LPCXPRESSO_LPC1769/board.c12
-rw-r--r--boards/EA_LPCXPRESSO_LPC1769/board.h8
2 files changed, 19 insertions, 1 deletions
diff --git a/boards/EA_LPCXPRESSO_LPC1769/board.c b/boards/EA_LPCXPRESSO_LPC1769/board.c
index 66e046872..d32a96200 100644
--- a/boards/EA_LPCXPRESSO_LPC1769/board.c
+++ b/boards/EA_LPCXPRESSO_LPC1769/board.c
@@ -32,6 +32,7 @@ const PALConfig pal_default_config = {
};
#endif
+#if HAL_USE_MAC
/*
* Board Ethernet pins configuration.
* ENET_REF_CLK pin must be set before macInit().
@@ -51,6 +52,7 @@ static void board_eth_pin_config(void) {
LPC_PINCON->PINMODE3 |= (2UL << 2) | (2UL << 0); /* Disable pull-up on ENET_MDIO P1.17, ENET_MDC P1.16 */
}
+#endif
/*
* Early initialization code.
@@ -88,4 +90,14 @@ void boardInit(void) {
/* DAC pin config */
/* DAC pin set in dac_lld_start() */
+
+#if HAL_USE_CAN
+ /* CAN config i/o */
+ LPC_PINCON->PINSEL0 |= (1UL << 2) | (1UL << 0); /* Set CAN1 TD1 P0.1 and RD1 P0.0 pins. */
+ LPC_PINCON->PINMODE0 |= (2UL << 2) | (2UL << 0); /* Disable pull-up on TD1 and RD1 pins.*/
+
+ LPC_PINCON->PINSEL0 |= (2UL << 10) | (2UL << 8); /* Set CAN2 TD2 P0.5 and RD2 P0.4 pins. */
+ LPC_PINCON->PINMODE0 |= (2UL << 10) | (2UL << 8); /* Disable pull-up on TD1 and RD1 pins.*/
+#endif
+
}
diff --git a/boards/EA_LPCXPRESSO_LPC1769/board.h b/boards/EA_LPCXPRESSO_LPC1769/board.h
index 95d0b9155..1474f4dfa 100644
--- a/boards/EA_LPCXPRESSO_LPC1769/board.h
+++ b/boards/EA_LPCXPRESSO_LPC1769/board.h
@@ -35,6 +35,10 @@
#define BOARD_PHY_RMII
//#define BOARD_PHY_ADDRESS
+
+#define LPC17xx_HAS_CAN1 TRUE
+#define LPC17xx_HAS_CAN2 TRUE
+
/*
* Board frequencies.
*/
@@ -44,7 +48,8 @@
/*
* GPIO 0 initial setup.
*/
-#define VAL_GPIO0DIR PAL_PORT_BIT(GPIO0_LED2_RED)
+#define VAL_GPIO0DIR PAL_PORT_BIT(GPIO0_LED2_RED) | \
+ PAL_PORT_BIT(GPIO0_LED3_EXT)
#define VAL_GPIO0DATA 0x00000000
/*
@@ -75,6 +80,7 @@
* Pin definitions.
*/
#define GPIO0_LED2_RED 22
+#define GPIO0_LED3_EXT 28 /* Connect LED to board. */
#define GPIO2_PIN12_TO_GND 12