Compare commits

..
2 changed files with 6 additions and 6 deletions

No files matched your search

+1 -4
View File
@@ -12,9 +12,6 @@ static_assert(GPIO_DRIVE_CAP_MAX <= 4, "gpio_drive_cap_t has too many values for
class ESP32InternalGPIOPin final : public InternalGPIOPin {
public:
// User provided, not "= default": `new(p) ESP32InternalGPIOPin()` would zero-fill .bss that is already zero.
ESP32InternalGPIOPin() {}
void set_pin(gpio_num_t pin) { this->pin_ = static_cast<uint8_t>(pin); }
void set_inverted(bool inverted) { this->pin_flags_.inverted = inverted; }
void set_drive_strength(gpio_drive_cap_t drive_strength) {
@@ -42,7 +39,7 @@ class ESP32InternalGPIOPin final : public InternalGPIOPin {
// - 3 bytes for members below
// - 1 byte padding for alignment
// - 4 bytes for vtable pointer
uint8_t pin_{0}; // 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)
@@ -15,6 +15,9 @@ namespace esphome::http_request {
class HttpRequestUpdate final : public update::UpdateEntity, public PollingComponent, public ota::OTAStateListener {
public:
// User provided, not "= default": `new(p) HttpRequestUpdate()` would zero-fill .bss that is already zero.
HttpRequestUpdate() {}
void setup() override;
void update() override;
@@ -31,8 +34,8 @@ class HttpRequestUpdate final : public update::UpdateEntity, public PollingCompo
void on_ota_state(ota::OTAState state, float progress, uint8_t error) override;
protected:
HttpRequestComponent *request_parent_;
OtaHttpRequestComponent *ota_parent_;
HttpRequestComponent *request_parent_{nullptr};
OtaHttpRequestComponent *ota_parent_{nullptr};
std::string source_url_;
static void update_task(void *params);