generated from Template/H563ZI-HAL-CMake-Template
22 lines
523 B
C++
22 lines
523 B
C++
#include "Helper/delay_helper.h"
|
|
#include "stm32h563xx.h"
|
|
|
|
#include "Common/serial_port.hpp"
|
|
#include "Helper/gpio_helper.hpp"
|
|
|
|
|
|
void Setup() {
|
|
GpioHelper::EnableAllGpioPeripheral();
|
|
DelaySetup();
|
|
}
|
|
|
|
extern "C" void AppStart() {
|
|
Setup();
|
|
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);
|
|
}
|
|
}
|