Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
818 B

  1. /*
  2. OTA MODULE
  3. */
  4. #pragma once
  5. #include "espurna.h"
  6. #if OTA_WEB_SUPPORT
  7. void otaWebSetup();
  8. #endif // OTA_WEB_SUPPORT == 1
  9. #if OTA_ARDUINOOTA_SUPPORT
  10. void arduinoOtaSetup();
  11. #endif // OTA_ARDUINOOTA_SUPPORT == 1
  12. #if OTA_CLIENT == OTA_CLIENT_ASYNCTCP
  13. void otaClientSetup();
  14. #endif // OTA_CLIENT == OTA_CLIENT_ASYNCTCP
  15. #if OTA_CLIENT == OTA_CLIENT_HTTPUPDATE
  16. void otaClientSetup();
  17. #endif // OTA_CLIENT == OTA_CLIENT_HTTPUPDATE
  18. void otaSetup();
  19. void otaPrintError();
  20. bool otaFinalize(size_t size, CustomResetReason reason, bool evenIfRemaining = false);
  21. // Helper methods from UpdaterClass that need to be called manually for async mode,
  22. // because we are not using Stream interface to feed it data.
  23. bool otaVerifyHeader(uint8_t* data, size_t len);
  24. void otaProgress(size_t bytes, size_t each = 8192u);