@@ -71,6 +71,45 @@ int fota_set_interval(int hours);
71
71
*/
72
72
int fota_get_interval (void );
73
73
74
+ /**
75
+ * @defgroup APPFOTA
76
+ * @brief These functions are used to update application firmware
77
+ * from external source. User can write their own update interface
78
+ * and use these function to interface with low level firmware update.
79
+ *
80
+ * @{
81
+ */
82
+
83
+ /**
84
+ * @brief Initialize application firmware update
85
+ *
86
+ * @param handle [out] handle to use in subsequent calls
87
+ * @return return 0 on success, negative value on error
88
+ */
89
+ int appfota_init (int * handle );
90
+
91
+ /**
92
+ * @brief Write firmware data to application firmware update
93
+ *
94
+ * @param handle [in] handle returned by appfota_init()
95
+ * @param buff [in] buffer containing firmware data
96
+ * @param len [in] length of buffer
97
+ * @return return 0 on success, negative value on error
98
+ */
99
+ int appfota_write (int handle , const void * buff , size_t len );
100
+
101
+ /**
102
+ * @brief Finish application firmware update, If the firmware binary
103
+ * is valid, system will enter bootloader and update firmware. If the
104
+ * firmware binary is invalid, an error will be returned.
105
+ *
106
+ * @param handle [in] handle returned by appfota_init()
107
+ * @return return negative value on error
108
+ */
109
+ int appfota_finish (int handle );
110
+
111
+ /** @} */
112
+
74
113
#ifdef __cplusplus
75
114
}
76
115
#endif
0 commit comments