generated from Template/H563ZI-HAL-CMake-Template
重构 SerialPort 类,移除静态成员,改为实例成员,优化 UART 读写方法
This commit is contained in:
@@ -17,7 +17,6 @@ extern "C" void AppStart() {
|
||||
auto gpio = GpioHelper::GpioInit(GPIOB, GPIO_PIN_0, GPIO_MODE_OUTPUT_PP, GPIO_NOPULL, GPIO_PIN_SET);
|
||||
while (true) {
|
||||
gpio.Toggle();
|
||||
SerialPort::WriteBlocking("LED is toggled,current state: %s", gpio.Read() ? "OFF" : "ON");
|
||||
DelayS(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user