diff --git a/src/main/drivers/transponder_ir_io_hal.c b/src/main/drivers/transponder_ir_io_hal.c index c5e180891e..75b36bced8 100644 --- a/src/main/drivers/transponder_ir_io_hal.c +++ b/src/main/drivers/transponder_ir_io_hal.c @@ -193,14 +193,16 @@ bool isTransponderIrReady(void) return !transponderIrDataTransferInProgress; } -static uint16_t dmaBufferOffset; - void transponderIrWaitForTransmitComplete(void) { +#ifdef DEBUG static uint32_t waitCounter = 0; +#endif while (transponderIrDataTransferInProgress) { +#ifdef DEBUG waitCounter++; +#endif } } @@ -257,8 +259,6 @@ void transponderIrTransmit(void) { transponderIrWaitForTransmitComplete(); - dmaBufferOffset = 0; - transponderIrDataTransferInProgress = 1; transponderIrDMAEnable(&transponder); } diff --git a/src/main/drivers/transponder_ir_io_stdperiph.c b/src/main/drivers/transponder_ir_io_stdperiph.c index 365317729f..adec2a8bce 100644 --- a/src/main/drivers/transponder_ir_io_stdperiph.c +++ b/src/main/drivers/transponder_ir_io_stdperiph.c @@ -185,14 +185,16 @@ bool isTransponderIrReady(void) return !transponderIrDataTransferInProgress; } -static uint16_t dmaBufferOffset; - void transponderIrWaitForTransmitComplete(void) { +#ifdef DEBUG static uint32_t waitCounter = 0; +#endif while (transponderIrDataTransferInProgress) { +#ifdef DEBUG waitCounter++; +#endif } } @@ -229,8 +231,6 @@ void transponderIrTransmit(void) { transponderIrWaitForTransmitComplete(); - dmaBufferOffset = 0; - transponderIrDataTransferInProgress = 1; transponderIrDMAEnable(&transponder); }