新增 Hc05 类,支持 HC-05 蓝牙模块的串口通信,增加串口设置波特率函数
All checks were successful
Build and Upload Artifact / build and upload-artifact (push) Successful in 20m1s

This commit is contained in:
2025-05-13 10:04:09 +08:00
parent c3e0edd72d
commit 69155f3ce1
9 changed files with 119 additions and 18 deletions

View File

@@ -56,7 +56,8 @@ public:
return {port, pin};
}
static Gpio GpioInit(const Gpio& gpio, const uint32_t mode, const uint32_t pull, const GPIO_PinState state) {
static Gpio GpioInit(const Gpio& gpio, const uint32_t mode, const uint32_t pull,
const std::optional<GPIO_PinState> state = std::nullopt) {
return GpioInit(gpio.port, gpio.pin, mode, pull, state);
}