From 8c076abc7e7dfd9705f430e70fbdb921f92c680b Mon Sep 17 00:00:00 2001 From: Simon Kueppers Date: Sun, 12 Mar 2023 12:15:24 +0100 Subject: [PATCH] Reverted to using DTR=HIGH && RTS=LOW for asserting the PTT, since PTT would otherwise interfere during CHIRP programming with some radios (issue #11) --- stm32/aioc-fw/Src/usb_serial.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stm32/aioc-fw/Src/usb_serial.c b/stm32/aioc-fw/Src/usb_serial.c index 7760ea5..643bbb2 100644 --- a/stm32/aioc-fw/Src/usb_serial.c +++ b/stm32/aioc-fw/Src/usb_serial.c @@ -168,11 +168,7 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) TU_ASSERT(itf == 0, /**/); /* PTT Encoding logic */ - uint8_t pttMask = (dtr ? PTT_MASK_PTT1 : 0); - -#if AIOC_ENABLE_PTT2 - pttMask |= (rts ? PTT_MASK_PTT2 : 0); -#endif + uint8_t pttMask = ((dtr && !rts) ? PTT_MASK_PTT1 : 0); if (! (USB_SERIAL_UART->CR1 & USART_CR1_TE) ) { /* Enable PTT only when UART transmitter is not currently transmitting */