mirror of
https://github.com/esphome/esphome.git
synced 2025-10-31 23:21:54 +00:00
no zero init pin
This commit is contained in:
@@ -40,7 +40,7 @@ class ESP32InternalGPIOPin : public InternalGPIOPin {
|
|||||||
// - 3 bytes for members below
|
// - 3 bytes for members below
|
||||||
// - 1 byte padding for alignment
|
// - 1 byte padding for alignment
|
||||||
// - 4 bytes for vtable pointer
|
// - 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)
|
gpio::Flags flags_{}; // GPIO flags (1 byte)
|
||||||
struct PinFlags {
|
struct PinFlags {
|
||||||
uint8_t inverted : 1; // Invert pin logic (1 bit)
|
uint8_t inverted : 1; // Invert pin logic (1 bit)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class ESP8266GPIOPin : public InternalGPIOPin {
|
|||||||
protected:
|
protected:
|
||||||
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
||||||
|
|
||||||
uint8_t pin_{};
|
uint8_t pin_;
|
||||||
bool inverted_{};
|
bool inverted_{};
|
||||||
gpio::Flags flags_{};
|
gpio::Flags flags_{};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class HostGPIOPin : public InternalGPIOPin {
|
|||||||
protected:
|
protected:
|
||||||
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
||||||
|
|
||||||
uint8_t pin_{};
|
uint8_t pin_;
|
||||||
bool inverted_{};
|
bool inverted_{};
|
||||||
gpio::Flags flags_{};
|
gpio::Flags flags_{};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class ArduinoInternalGPIOPin : public InternalGPIOPin {
|
|||||||
protected:
|
protected:
|
||||||
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
||||||
|
|
||||||
uint8_t pin_{};
|
uint8_t pin_;
|
||||||
bool inverted_{};
|
bool inverted_{};
|
||||||
gpio::Flags flags_{};
|
gpio::Flags flags_{};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class RP2040GPIOPin : public InternalGPIOPin {
|
|||||||
protected:
|
protected:
|
||||||
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
||||||
|
|
||||||
uint8_t pin_{};
|
uint8_t pin_;
|
||||||
bool inverted_{};
|
bool inverted_{};
|
||||||
gpio::Flags flags_{};
|
gpio::Flags flags_{};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class ZephyrGPIOPin : public InternalGPIOPin {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
|
||||||
uint8_t pin_{};
|
uint8_t pin_;
|
||||||
bool inverted_{};
|
bool inverted_{};
|
||||||
gpio::Flags flags_{};
|
gpio::Flags flags_{};
|
||||||
const device *gpio_{nullptr};
|
const device *gpio_{nullptr};
|
||||||
|
|||||||
Reference in New Issue
Block a user