33 lines
553 B
C
33 lines
553 B
C
/*
|
|
* ota.h
|
|
*
|
|
* Created on: Feb 13, 2023
|
|
* Author: Sword
|
|
*/
|
|
|
|
#ifndef MAIN_OTA_H_
|
|
#define MAIN_OTA_H_
|
|
|
|
typedef enum{
|
|
OTA_NEEDED,
|
|
OTA_NOT_NEEDED,
|
|
OTA_FINISHED
|
|
}ota_status_t;
|
|
|
|
|
|
typedef enum{
|
|
OTA_BYTES_WRITTEN_SUCCESS,
|
|
OTA_BYTES_WRITTEN_FAILED,
|
|
OTA_BYTES_WRITTEN_WAIT
|
|
}ota_bytes_status_t;
|
|
|
|
void ota_set_needed(void);
|
|
void ota_set_not_needed(void);
|
|
void ota_set_finished(void);
|
|
|
|
esp_err_t ota_init(uint32_t fileSize);
|
|
esp_err_t ota_get_data_to_buffer(const char* buf, int buf_len);
|
|
void ota_finish_processing(void);
|
|
|
|
#endif /* MAIN_OTA_H_ */
|