Kinda works
This commit is contained in:
parent
f3d345e2e3
commit
662a7a9b12
40 changed files with 2851 additions and 26 deletions
31
components/f4ll_cpp/uartbase.h
Normal file
31
components/f4ll_cpp/uartbase.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* UartBase.h
|
||||
*
|
||||
* Created on: Feb 4, 2020
|
||||
* Author: abody
|
||||
*/
|
||||
#ifndef F4LL_CPP_UARTBASE_H_
|
||||
#define F4LL_CPP_UARTBASE_H_
|
||||
|
||||
#include <platform/usart_ll.h>
|
||||
#include <f4ll_cpp/dmahelper.h>
|
||||
|
||||
namespace f4ll_cpp {
|
||||
|
||||
class UartBase
|
||||
{
|
||||
public:
|
||||
UartBase() = delete;
|
||||
protected:
|
||||
UartBase(USART_TypeDef *uart, DMA_TypeDef *dma, uint32_t stream_rx, uint32_t stream_tx);
|
||||
void SetupTransmit(void *buffer, uint16_t length);
|
||||
void SetupReceive(void *buffer, uint16_t length);
|
||||
|
||||
USART_TypeDef *m_uart;
|
||||
DmaHelper m_rxDma;
|
||||
DmaHelper m_txDma;
|
||||
};
|
||||
|
||||
} // f4ll_cpp
|
||||
|
||||
#endif /* F4LL_CPP_UARTBASE_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue