diff --git a/src/default_lowlevel.c b/src/default_lowlevel.c index 918567bbe..452771085 100644 --- a/src/default_lowlevel.c +++ b/src/default_lowlevel.c @@ -50,6 +50,14 @@ void uart1_init(uint16_t inc, uint16_t mod, uint8_t samp) { *UART1_UCON = 0; *UART1_UBRCNT = ( inc << 16 ) | mod; + /* TX and CTS as outputs */ + GPIO->PAD_DIR_SET.GPIO_14 = 1; + GPIO->PAD_DIR_SET.GPIO_16 = 1; + + /* RX and RTS as inputs */ + GPIO->PAD_DIR_RESET.GPIO_15 = 1; + GPIO->PAD_DIR_RESET.GPIO_17 = 1; + /* see Section 11.5.1.2 Alternate Modes */ /* you must enable the peripheral first BEFORE setting the function in GPIO_FUNC_SEL */ /* From the datasheet: "The peripheral function will control operation of the pad IF */