mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	missing zero init
This commit is contained in:
		| @@ -40,13 +40,13 @@ 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) | ||||
|   gpio::Flags flags_;  // GPIO flags (1 byte) | ||||
|   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) | ||||
|     uint8_t drive_strength : 2;  // Drive strength 0-3 (2 bits) | ||||
|     uint8_t reserved : 5;        // Reserved for future use (5 bits) | ||||
|   } pin_flags_;                  // Total: 1 byte | ||||
|   } pin_flags_{};                // Total: 1 byte | ||||
|   // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) | ||||
|   static bool isr_service_installed; | ||||
| }; | ||||
|   | ||||
| @@ -28,9 +28,9 @@ class ESP8266GPIOPin : public InternalGPIOPin { | ||||
|  protected: | ||||
|   void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override; | ||||
|  | ||||
|   uint8_t pin_; | ||||
|   bool inverted_; | ||||
|   gpio::Flags flags_; | ||||
|   uint8_t pin_{}; | ||||
|   bool inverted_{}; | ||||
|   gpio::Flags flags_{}; | ||||
| }; | ||||
|  | ||||
| }  // namespace esp8266 | ||||
|   | ||||
| @@ -27,9 +27,9 @@ class HostGPIOPin : public InternalGPIOPin { | ||||
|  protected: | ||||
|   void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override; | ||||
|  | ||||
|   uint8_t pin_; | ||||
|   bool inverted_; | ||||
|   gpio::Flags flags_; | ||||
|   uint8_t pin_{}; | ||||
|   bool inverted_{}; | ||||
|   gpio::Flags flags_{}; | ||||
| }; | ||||
|  | ||||
| }  // namespace host | ||||
|   | ||||
| @@ -26,9 +26,9 @@ class ArduinoInternalGPIOPin : public InternalGPIOPin { | ||||
|  protected: | ||||
|   void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override; | ||||
|  | ||||
|   uint8_t pin_; | ||||
|   bool inverted_; | ||||
|   gpio::Flags flags_; | ||||
|   uint8_t pin_{}; | ||||
|   bool inverted_{}; | ||||
|   gpio::Flags flags_{}; | ||||
| }; | ||||
|  | ||||
| }  // namespace libretiny | ||||
|   | ||||
| @@ -28,9 +28,9 @@ class RP2040GPIOPin : public InternalGPIOPin { | ||||
|  protected: | ||||
|   void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override; | ||||
|  | ||||
|   uint8_t pin_; | ||||
|   bool inverted_; | ||||
|   gpio::Flags flags_; | ||||
|   uint8_t pin_{}; | ||||
|   bool inverted_{}; | ||||
|   gpio::Flags flags_{}; | ||||
| }; | ||||
|  | ||||
| }  // namespace rp2040 | ||||
|   | ||||
| @@ -25,11 +25,11 @@ class ZephyrGPIOPin : public InternalGPIOPin { | ||||
|  | ||||
|  protected: | ||||
|   void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override; | ||||
|   uint8_t pin_; | ||||
|   bool inverted_; | ||||
|   gpio::Flags flags_; | ||||
|   const device *gpio_ = nullptr; | ||||
|   bool value_ = false; | ||||
|   uint8_t pin_{}; | ||||
|   bool inverted_{}; | ||||
|   gpio::Flags flags_{}; | ||||
|   const device *gpio_{nullptr}; | ||||
|   bool value_{false}; | ||||
| }; | ||||
|  | ||||
| }  // namespace zephyr | ||||
|   | ||||
		Reference in New Issue
	
	Block a user