1
0
mirror of https://github.com/halleysfifthinc/Toyota-AVC-LAN synced 2025-06-07 07:56:21 +00:00

Use alternate UART TxD/RxD pins

This commit is contained in:
Allen Hill 2023-08-20 20:41:25 -04:00
parent 48b20a9c5c
commit c4f67378ae

View File

@ -34,6 +34,8 @@ byte readkey;
void RS232_Init(void) {
RS232_RxCharBegin = RS232_RxCharEnd = 0;
PORTMUX.CTRLB = PORTMUX_USART0_ALTERNATE_gc; // Use PA1/PA2 for TxD/RxD
USART0.CTRLA = USART_RXCIE_bm; // Enable receive interrupts
USART0.CTRLB = USART_RXEN_bm | USART_TXEN_bm |
USART_RXMODE_NORMAL_gc; // Enable Rx/Tx and set receive mode