1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 15:12:06 +00:00

no zero init pin

This commit is contained in:
J. Nick Koston
2025-10-25 16:47:48 -07:00
parent 5099df00ec
commit 22b574992f
6 changed files with 6 additions and 6 deletions

View File

@@ -40,7 +40,7 @@ class ESP32InternalGPIOPin : public InternalGPIOPin {
// - 3 bytes for members below
// - 1 byte padding for alignment
// - 4 bytes for vtable pointer
uint8_t pin_{}; // GPIO pin number (0-255, actual max ~54 on ESP32)
uint8_t pin_; // GPIO pin number (0-255, actual max ~54 on ESP32)
gpio::Flags flags_{}; // GPIO flags (1 byte)
struct PinFlags {
uint8_t inverted : 1; // Invert pin logic (1 bit)

View File

@@ -28,7 +28,7 @@ class ESP8266GPIOPin : public InternalGPIOPin {
protected:
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
uint8_t pin_{};
uint8_t pin_;
bool inverted_{};
gpio::Flags flags_{};
};

View File

@@ -27,7 +27,7 @@ class HostGPIOPin : public InternalGPIOPin {
protected:
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
uint8_t pin_{};
uint8_t pin_;
bool inverted_{};
gpio::Flags flags_{};
};

View File

@@ -26,7 +26,7 @@ class ArduinoInternalGPIOPin : public InternalGPIOPin {
protected:
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
uint8_t pin_{};
uint8_t pin_;
bool inverted_{};
gpio::Flags flags_{};
};

View File

@@ -28,7 +28,7 @@ class RP2040GPIOPin : public InternalGPIOPin {
protected:
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
uint8_t pin_{};
uint8_t pin_;
bool inverted_{};
gpio::Flags flags_{};
};

View File

@@ -25,7 +25,7 @@ class ZephyrGPIOPin : public InternalGPIOPin {
protected:
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
uint8_t pin_{};
uint8_t pin_;
bool inverted_{};
gpio::Flags flags_{};
const device *gpio_{nullptr};