generated from Template/H563ZI-HAL-CMake-Template
新增 Hc05 类,支持 HC-05 蓝牙模块的串口通信,增加串口设置波特率函数
All checks were successful
Build and Upload Artifact / build and upload-artifact (push) Successful in 19m59s
All checks were successful
Build and Upload Artifact / build and upload-artifact (push) Successful in 19m59s
This commit is contained in:
@@ -7,12 +7,14 @@
|
||||
|
||||
class CanMv {
|
||||
public:
|
||||
explicit CanMv(UART_HandleTypeDef* uart) : serialPort(std::make_unique<SerialPort>(uart, kLength, kTimeout)) {}
|
||||
explicit CanMv(UART_HandleTypeDef* uart)
|
||||
: serialPort(std::make_unique<SerialPort>(uart, kBaudRate, kLength, kTimeout)) {}
|
||||
|
||||
~CanMv() = default;
|
||||
|
||||
private:
|
||||
static constexpr uint32_t kLength = 128;
|
||||
static constexpr uint32_t kTimeout = 10;
|
||||
static constexpr uint32_t kBaudRate = 115200;
|
||||
static constexpr uint32_t kLength = 128;
|
||||
static constexpr uint32_t kTimeout = 10;
|
||||
std::unique_ptr<SerialPort> serialPort;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user