Merge remote branch 'libmc1322x/master'
This commit is contained in:
commit
4f4e06c71b
|
@ -51,6 +51,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 */
|
||||
|
|
Loading…
Reference in a new issue