lpc176x: Add support for serial on UART3 P4.29/P4.28
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ce8fe615ed
commit
b1f6a608c3
|
@ -70,8 +70,11 @@ choice
|
|||
config LPC_USB
|
||||
bool "USB"
|
||||
select USBSERIAL
|
||||
config LPC_SERIAL
|
||||
bool "Serial"
|
||||
config LPC_SERIAL_UART0_P03_P02
|
||||
bool "Serial (on UART0 P0.3/P0.2)"
|
||||
select SERIAL
|
||||
config LPC_SERIAL_UART3_P429_P428
|
||||
bool "Serial (on UART3 P4.29/P4.28)" if LOW_LEVEL_OPTIONS
|
||||
select SERIAL
|
||||
endchoice
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define PCLK_ADC 12
|
||||
#define PCLK_I2C1 19
|
||||
#define PCLK_SSP0 21
|
||||
#define PCLK_UART3 25
|
||||
#define PCLK_I2C2 26
|
||||
#define PCLK_USB 31
|
||||
int is_enabled_pclock(uint32_t pclk);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "internal.h" // gpio_peripheral
|
||||
#include "sched.h" // DECL_INIT
|
||||
|
||||
#if CONFIG_LPC_SERIAL_UART0_P03_P02
|
||||
DECL_CONSTANT_STR("RESERVE_PINS_serial", "P0.3,P0.2");
|
||||
#define GPIO_Rx GPIO(0, 3)
|
||||
#define GPIO_Tx GPIO(0, 2)
|
||||
|
@ -19,6 +20,15 @@ DECL_CONSTANT_STR("RESERVE_PINS_serial", "P0.3,P0.2");
|
|||
#define LPC_UARTx LPC_UART0
|
||||
#define UARTx_IRQn UART0_IRQn
|
||||
#define PCLK_UARTx PCLK_UART0
|
||||
#elif CONFIG_LPC_SERIAL_UART3_P429_P428
|
||||
DECL_CONSTANT_STR("RESERVE_PINS_serial", "P4.29,P4.28");
|
||||
#define GPIO_Rx GPIO(4, 29)
|
||||
#define GPIO_Tx GPIO(4, 28)
|
||||
#define GPIO_FUNCTION_UARTx 3
|
||||
#define LPC_UARTx LPC_UART3
|
||||
#define UARTx_IRQn UART3_IRQn
|
||||
#define PCLK_UARTx PCLK_UART3
|
||||
#endif
|
||||
|
||||
// Write tx bytes to the serial port
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue