Skip to content

Commit

Permalink
fix: cleanup uartstm destructors (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
BarisTanyeri authored Oct 28, 2024
1 parent bb209a3 commit 5042b8d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
6 changes: 0 additions & 6 deletions hal_st/stm32fxxx/UartStmDma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ namespace hal
}
#endif

UartStmDma::~UartStmDma()
{
uartArray[uartIndex]->CR1 &= ~(USART_CR1_TE | USART_CR1_RE);
DisableClockUart(uartIndex);
}

void UartStmDma::SendData(infra::MemoryRange<const uint8_t> data, infra::Function<void()> actionOnCompletion)
{
if (!data.empty())
Expand Down
1 change: 0 additions & 1 deletion hal_st/stm32fxxx/UartStmDma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace hal
UartStmDma(DmaStm::TransmitStream& transmitStream, uint8_t oneBasedIndex, GpioPinStm& uartTx, GpioPinStm& uartRx, LpUart lpUart, const Config& config = Config());
UartStmDma(DmaStm::TransmitStream& transmitStream, uint8_t oneBasedIndex, GpioPinStm& uartTx, GpioPinStm& uartRx, GpioPinStm& uartRts, GpioPinStm& uartCts, LpUart lpUart, const Config& config = Config());
#endif
~UartStmDma();

void SendData(infra::MemoryRange<const uint8_t> data, infra::Function<void()> actionOnCompletion = infra::emptyFunction) override;
void ReceiveData(infra::Function<void(infra::ConstByteRange data)> dataReceived) override;
Expand Down
2 changes: 0 additions & 2 deletions hal_st/stm32fxxx/UartStmDuplexDma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ namespace hal
UartStmDuplexDma::~UartStmDuplexDma()
{
receiveDmaChannel.StopTransfer();
uartArray[uartIndex]->CR1 &= ~(USART_CR1_TE | USART_CR1_RE);
DisableClockUart(uartIndex);
}

void UartStmDuplexDma::ReceiveData(infra::Function<void(infra::ConstByteRange data)> dataReceived)
Expand Down

0 comments on commit 5042b8d

Please sign in to comment.