#ifndef OTA_ESPNOW_H #define OTA_ESPNOW_H #include "esp_err.h" #include "esp_now_messages.pb.h" #include "esp_partition.h" #include /** Master: read staged image from partition and push to all available slaves. */ esp_err_t ota_espnow_distribute(const esp_partition_t *partition, uint32_t size); /** Master: handle slave → master OTA status / block ACK. */ void ota_espnow_master_on_status(const uint8_t slave_mac[6], const alox_EspNowOtaStatus *status); /** Slave: handle master → slave OTA commands. */ void ota_espnow_slave_on_start(const uint8_t master_mac[6], const alox_EspNowOtaStart *start); void ota_espnow_slave_on_payload(const uint8_t master_mac[6], const alox_EspNowOtaPayload *payload); void ota_espnow_slave_on_end(const uint8_t master_mac[6]); #endif