---vl6180dr
This commit is contained in:
@@ -7,18 +7,20 @@
|
||||
#include "circular_buffer.hpp"
|
||||
#include "usart.h"
|
||||
|
||||
#define BUF_SIZE 1024U
|
||||
#define MAX_QUEUE 16
|
||||
|
||||
class UartBridge{
|
||||
|
||||
public:
|
||||
UartBridge(bool isOn, USART_TypeDef *uart1, USART_TypeDef *uart2, uint16_t baudRate1,
|
||||
uint16_t baudRate2);
|
||||
Circular_Buffer<uint8_t> *uart1Buf;
|
||||
Circular_Buffer<uint8_t> *uart2Buf;
|
||||
Circular_Buffer<std::string_view> *uart1Buf;
|
||||
Circular_Buffer<std::string_view> *uart2Buf;
|
||||
bool isTurnOn() const;
|
||||
void setTurnOn(bool isTurnOn);
|
||||
volatile uint8_t dataFromUart1;
|
||||
volatile uint8_t dataFromUart2;
|
||||
volatile uint8_t dataFromUart1[BUF_SIZE];
|
||||
volatile uint8_t dataFromUart2[BUF_SIZE];
|
||||
void init(void);
|
||||
private:
|
||||
|
||||
@@ -28,7 +30,8 @@ protected:
|
||||
UART_HandleTypeDef uart1Handle, uart2Handle;
|
||||
public:
|
||||
UART_HandleTypeDef* getHuart1() ;
|
||||
|
||||
bool receiveStarted;
|
||||
bool receiveTimeout = true;
|
||||
UART_HandleTypeDef* getHuart2() ;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user