mirror of
https://github.com/halleysfifthinc/Toyota-AVC-LAN
synced 2025-06-07 16:06:12 +00:00
Reformat comments
This commit is contained in:
parent
eb93931522
commit
fb0bbbe3ca
12
src/com232.c
12
src/com232.c
@ -36,10 +36,9 @@ void RS232_Init(void) {
|
|||||||
|
|
||||||
PORTMUX.CTRLB = PORTMUX_USART0_ALTERNATE_gc; // Use PA1/PA2 for TxD/RxD
|
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 | // Enable Rx/Tx and set receive
|
||||||
USART_RXMODE_NORMAL_gc; // Enable Rx/Tx and set receive mode
|
USART_RXMODE_NORMAL_gc; // mode normal
|
||||||
// normal
|
|
||||||
USART0.CTRLC = USART_CMODE_ASYNCHRONOUS_gc | USART_PMODE_DISABLED_gc |
|
USART0.CTRLC = USART_CMODE_ASYNCHRONOUS_gc | USART_PMODE_DISABLED_gc |
|
||||||
USART_CHSIZE_8BIT_gc |
|
USART_CHSIZE_8BIT_gc |
|
||||||
USART_SBMODE_1BIT_gc; // Async UART with 8N1 config
|
USART_SBMODE_1BIT_gc; // Async UART with 8N1 config
|
||||||
@ -47,9 +46,8 @@ void RS232_Init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ISR(USART0_RXC_vect) {
|
ISR(USART0_RXC_vect) {
|
||||||
RS232_RxCharBuffer[RS232_RxCharEnd] = USART0_RXDATAL; // Store received
|
// Store received character to the End of Buffer
|
||||||
// character to the End
|
RS232_RxCharBuffer[RS232_RxCharEnd] = USART0_RXDATAL;
|
||||||
// of Buffer
|
|
||||||
RS232_RxCharEnd++;
|
RS232_RxCharEnd++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user