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

Fix UART 2x speed config

This commit is contained in:
Allen Hill 2023-09-16 19:34:45 +00:00
parent ebb5ec95ca
commit 0fe2f64eed

View File

@ -29,13 +29,13 @@
#include "timing.h"
#if USART_RXMODE == USART_RXMODE_CLK2X_gc
#define RXMODE_S 9
#define RXMODE_S 8
#elif USART_RXMODE == USART_RXMODE_NORMAL_gc
#define RXMODE_S 16
#endif
#define USART_BAUD_RATE(BAUD_RATE) \
(uint16_t)((float)(F_CPU * 64 / (USART_RXMODE * (float)BAUD_RATE)) + 0.5)
(uint16_t)((float)(F_CPU * 64 / (RXMODE_S * (float)BAUD_RATE)) + 0.5)
uint8_t RS232_RxCharBuffer[25], RS232_RxCharBegin, RS232_RxCharEnd;
uint8_t readkey;