mirror of
https://github.com/halleysfifthinc/Toyota-AVC-LAN
synced 2025-06-07 16:06:12 +00:00
Use alternate UART TxD/RxD pins
This commit is contained in:
parent
48b20a9c5c
commit
c4f67378ae
2
com232.c
2
com232.c
@ -34,6 +34,8 @@ byte readkey;
|
|||||||
void RS232_Init(void) {
|
void RS232_Init(void) {
|
||||||
RS232_RxCharBegin = RS232_RxCharEnd = 0;
|
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.CTRLA = USART_RXCIE_bm; // Enable receive interrupts
|
||||||
USART0.CTRLB = USART_RXEN_bm | USART_TXEN_bm |
|
USART0.CTRLB = USART_RXEN_bm | USART_TXEN_bm |
|
||||||
USART_RXMODE_NORMAL_gc; // Enable Rx/Tx and set receive mode
|
USART_RXMODE_NORMAL_gc; // Enable Rx/Tx and set receive mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user