recovery.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "application_name.h"
  4. #include "esp_err.h"
  5. #include "esp_app_format.h"
  6. extern esp_err_t process_recovery_ota(const char * bin_url, char * bin_buffer, uint32_t length);
  7. const __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = {
  8. .magic_word = ESP_APP_DESC_MAGIC_WORD,
  9. .version = PROJECT_VER,
  10. .project_name = CONFIG_PROJECT_NAME,
  11. .idf_ver = IDF_VER,
  12. #ifdef CONFIG_BOOTLOADER_APP_SECURE_VERSION
  13. .secure_version = CONFIG_BOOTLOADER_APP_SECURE_VERSION,
  14. #else
  15. .secure_version = 0,
  16. #endif
  17. #ifdef CONFIG_APP_COMPILE_TIME_DATE
  18. .time = __TIME__,
  19. .date = __DATE__,
  20. #else
  21. .time = "",
  22. .date = "",
  23. #endif
  24. };
  25. void register_optional_cmd(void) {
  26. }
  27. int main(int argc, char **argv){
  28. return 1;
  29. }
  30. void register_squeezelite(){
  31. }
  32. void register_external(void) {
  33. }
  34. void deregister_external(void) {
  35. }
  36. void decode_restore(int external) {
  37. }
  38. esp_err_t start_ota(const char * bin_url, char * bin_buffer, uint32_t length)
  39. {
  40. return process_recovery_ota(bin_url,bin_buffer,length);
  41. }