Skip to content

Commit 13c5f01

Browse files
committed
ChibiOS: UARTDriver: init dma buffer
1 parent cef8bce commit 13c5f01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libraries/AP_HAL_ChibiOS/UARTDriver.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,12 @@ void UARTDriver::_begin(uint32_t b, uint16_t rxS, uint16_t txS)
332332
rx_dma_enabled = rx_bounce_buf[0] != nullptr && rx_bounce_buf[1] != nullptr;
333333
tx_dma_enabled = tx_bounce_buf != nullptr;
334334
}
335+
if (_last_options & OPTION_NODMA_RX) {
336+
rx_dma_enabled = false;
337+
}
338+
if (_last_options & OPTION_NODMA_TX) {
339+
tx_dma_enabled = false;
340+
}
335341
if (contention_counter > 1000 && _baudrate <= CONTENTION_BAUD_THRESHOLD) {
336342
// we've previously disabled TX DMA due to contention, don't
337343
// re-enable on a new begin() unless high baudrate

0 commit comments

Comments
 (0)