Files
CLion_STM32/Core/driver/led/led_cpp.cpp

23 lines
324 B
C++

//
// Created by Wind on 2025/11/9.
//
#include "include/led_cpp.h"
LED::LED(GPIO_TypeDef *port, const uint16_t pin) : Gpio(port, pin) {
}
LED::~LED() = default;
void LED::ledOn() const {
this->write(true);
}
void LED::ledOff() const {
this->write(false);
}
void LED::ledToggle() const {
this->toggle();
}