|
ESPHome 2026.3.0
|
OTA backend for ESP8266 using native SDK functions. More...
#include <ota_backend_esp8266.h>
Public Member Functions | |
| OTAResponseTypes | begin (size_t image_size) |
| void | set_update_md5 (const char *md5) |
| OTAResponseTypes | write (uint8_t *data, size_t len) |
| OTAResponseTypes | end () |
| void | abort () |
| bool | supports_compression () |
Protected Member Functions | |
| bool | erase_sector_if_needed_ () |
| Erase flash sector if current address is at sector boundary. | |
| bool | flash_write_ () |
| Write buffer to flash (does not update address or clear buffer) | |
| bool | write_buffer_ () |
| Write buffered data to flash and update MD5. | |
| bool | write_buffer_final_ () |
| Write buffered data to flash without MD5 update (for final padded write) | |
| bool | verify_end_ () |
| Verify the firmware header is valid. | |
| uint8_t | get_flash_chip_mode_ () |
| Get current flash chip mode from flash header. | |
Protected Attributes | |
| std::unique_ptr< uint8_t[]> | buffer_ |
| size_t | buffer_size_ {0} |
| size_t | buffer_len_ {0} |
| uint32_t | start_address_ {0} |
| uint32_t | current_address_ {0} |
| size_t | image_size_ {0} |
| size_t | bytes_received_ {0} |
| md5::MD5Digest | md5_ {} |
| uint8_t | expected_md5_ [16] |
| bool | md5_set_ {false} |
OTA backend for ESP8266 using native SDK functions.
This implementation bypasses the Arduino Updater library to save ~228 bytes of RAM by not having a global Update object in .bss.
Definition at line 15 of file ota_backend_esp8266.h.
| void esphome::ota::ESP8266OTABackend::abort | ( | ) |
Definition at line 305 of file ota_backend_esp8266.cpp.
| OTAResponseTypes esphome::ota::ESP8266OTABackend::begin | ( | size_t | image_size | ) |
Definition at line 53 of file ota_backend_esp8266.cpp.
| OTAResponseTypes esphome::ota::ESP8266OTABackend::end | ( | ) |
Definition at line 241 of file ota_backend_esp8266.cpp.
|
protected |
Erase flash sector if current address is at sector boundary.
Definition at line 156 of file ota_backend_esp8266.cpp.
|
protected |
Write buffer to flash (does not update address or clear buffer)
Definition at line 169 of file ota_backend_esp8266.cpp.
|
protected |
Get current flash chip mode from flash header.
Definition at line 350 of file ota_backend_esp8266.cpp.
| void esphome::ota::ESP8266OTABackend::set_update_md5 | ( | const char * | md5 | ) |
Definition at line 126 of file ota_backend_esp8266.cpp.
|
inline |
Definition at line 23 of file ota_backend_esp8266.h.
|
protected |
Verify the firmware header is valid.
Definition at line 313 of file ota_backend_esp8266.cpp.
| OTAResponseTypes esphome::ota::ESP8266OTABackend::write | ( | uint8_t * | data, |
| size_t | len ) |
Definition at line 133 of file ota_backend_esp8266.cpp.
|
protected |
Write buffered data to flash and update MD5.
Definition at line 179 of file ota_backend_esp8266.cpp.
|
protected |
Write buffered data to flash without MD5 update (for final padded write)
Definition at line 225 of file ota_backend_esp8266.cpp.
|
protected |
Definition at line 44 of file ota_backend_esp8266.h.
|
protected |
Definition at line 46 of file ota_backend_esp8266.h.
|
protected |
Definition at line 45 of file ota_backend_esp8266.h.
|
protected |
Definition at line 51 of file ota_backend_esp8266.h.
|
protected |
Definition at line 49 of file ota_backend_esp8266.h.
|
protected |
Definition at line 54 of file ota_backend_esp8266.h.
|
protected |
Definition at line 50 of file ota_backend_esp8266.h.
|
protected |
Definition at line 53 of file ota_backend_esp8266.h.
|
protected |
Definition at line 55 of file ota_backend_esp8266.h.
|
protected |
Definition at line 48 of file ota_backend_esp8266.h.