kopia lustrzana https://github.com/skuep/AIOC
Changed PTT behaviour and made PTT2 optional since it may interfere with some softwares
rodzic
c8fe84c65a
commit
3af01b8f09
|
@ -6,4 +6,6 @@
|
|||
#define AIOC_IRQ_PRIO_SERIAL 3
|
||||
#define AIOC_IRQ_PRIO_AUDIO 2
|
||||
|
||||
//#define AIOC_ENABLE_PTT2
|
||||
|
||||
#endif /* AIOC_H_ */
|
||||
|
|
|
@ -152,7 +152,7 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
|
|||
__enable_irq();
|
||||
}
|
||||
|
||||
if (dtr & !rts) {
|
||||
if (!dtr & rts) {
|
||||
/* PTT1 */
|
||||
USB_SERIAL_UART_GPIO->BSRR |= USB_SERIAL_UART_PIN_PTT1;
|
||||
LED_SET(1, 1);
|
||||
|
@ -161,7 +161,8 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
|
|||
LED_SET(1, 0);
|
||||
}
|
||||
|
||||
if (!dtr & rts) {
|
||||
#if AIOC_ENABLE_PTT2
|
||||
if (dtr & !rts) {
|
||||
/* PTT2 */
|
||||
USB_SERIAL_UART_GPIO->BSRR |= USB_SERIAL_UART_PIN_PTT2;
|
||||
LED_SET(0, 1);
|
||||
|
@ -169,6 +170,7 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
|
|||
USB_SERIAL_UART_GPIO->BRR |= USB_SERIAL_UART_PIN_PTT2;
|
||||
LED_SET(0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !(dtr ^ rts) ) {
|
||||
/* Enable UART transmitter again, when no PTT is asserted */
|
||||
|
|
Ładowanie…
Reference in New Issue