generated from Template/H563ZI-HAL-CMake-Template
删除多个类和结构体的拷贝构造函数和赋值运算符,确保不可复制性
All checks were successful
Build and Upload Artifact / build and upload-artifact (push) Successful in 20m4s
All checks were successful
Build and Upload Artifact / build and upload-artifact (push) Successful in 20m4s
This commit is contained in:
@@ -16,6 +16,11 @@ public:
|
||||
explicit Key(GpioHelper::Gpio gpio, GPIO_PinState normalStatus) : gpio(gpio), normalStatus(normalStatus) {
|
||||
GpioHelper::GpioInit(gpio, GPIO_MODE_INPUT, normalStatus ? GPIO_PULLUP : GPIO_PULLDOWN);
|
||||
}
|
||||
~Key() = default;
|
||||
Key(const Key&) = delete;
|
||||
Key& operator=(const Key&) = delete;
|
||||
Key(Key&&) = delete;
|
||||
Key& operator=(Key&&) = delete;
|
||||
|
||||
bool IsPressed() {
|
||||
auto reading = gpio.Read();
|
||||
|
||||
Reference in New Issue
Block a user