andreika-git 2023-02-18 15:45:40 +02:00 committed by rusefillc
parent dc4b115889
commit de539d0261
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,11 @@ void kLineThread(void*)
void initKLine() {
#ifdef EFI_KLINE
#if EFI_PROD_CODE
efiSetPadMode("K-Line UART RX", KLINE_SERIAL_DEVICE_RX, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
efiSetPadMode("K-Line UART TX", KLINE_SERIAL_DEVICE_TX, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
#endif /* EFI_PROD_CODE */
static const SerialConfig cfg = {
#if EFI_PROD_CODE
.speed = KLINE_BAUD_RATE,

View File

@ -2,6 +2,8 @@
#define KLINE_SERIAL_DEVICE (&SD2)
#define KLINE_SERIAL_DEVICE_RX H144_UART2_RX
#define KLINE_SERIAL_DEVICE_TX H144_UART2_TX
// The standard transmission rate
#define KLINE_BAUD_RATE 10400