Lines Matching refs:ota_handle

33 static int _dm_fota_send_new_config_to_user(void *ota_handle)  in _dm_fota_send_new_config_to_user()  argument
40 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_VERSION, version, 128); in _dm_fota_send_new_config_to_user()
71 void *ota_handle = NULL; in dm_fota_perform_sync() local
80 res = dm_ota_get_ota_handle(&ota_handle); in dm_fota_perform_sync()
85 if (ota_handle == NULL) { in dm_fota_perform_sync()
88 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_OTA_TYPE, &ota_type, 4); in dm_fota_perform_sync()
95 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_RESET_FETCHED_SIZE, ota_handle, 4); in dm_fota_perform_sync()
99 file_download = IOT_OTA_FetchYield(ota_handle, output, output_len, 1); in dm_fota_perform_sync()
103 IOT_OTA_ReportProgress(ota_handle, IOT_OTAP_FETCH_FAILED, NULL); in dm_fota_perform_sync()
104 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_RESET_STATE, NULL, 0); in dm_fota_perform_sync()
119 IOT_OTA_ReportProgress(ota_handle, IOT_OTAP_BURN_FAILED, NULL); in dm_fota_perform_sync()
120 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_RESET_STATE, NULL, 0); in dm_fota_perform_sync()
128 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_FETCHED_SIZE, &file_downloaded, 4); in dm_fota_perform_sync()
129 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_FILE_SIZE, &file_size, 4); in dm_fota_perform_sync()
142 IOT_OTA_ReportProgress(ota_handle, percent_now, NULL); in dm_fota_perform_sync()
148 if (IOT_OTA_IsFetchFinish(ota_handle)) { in dm_fota_perform_sync()
150 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_CHECK_FIRMWARE, &file_isvalid, in dm_fota_perform_sync()
153 IOT_OTA_ReportProgress(ota_handle, IOT_OTAP_CHECK_FALIED, NULL); in dm_fota_perform_sync()
154 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_RESET_STATE, NULL, 0); in dm_fota_perform_sync()
174 void *ota_handle = NULL; in dm_fota_status_check() local
177 res = dm_ota_get_ota_handle(&ota_handle); in dm_fota_status_check()
182 if (IOT_OTA_IsFetching(ota_handle)) { in dm_fota_status_check()
185 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_OTA_TYPE, &ota_type, 4); in dm_fota_status_check()
191 res = _dm_fota_send_new_config_to_user(ota_handle); in dm_fota_status_check()
205 void *ota_handle = NULL; in dm_fota_request_image() local
214 res = dm_ota_get_ota_handle(&ota_handle); in dm_fota_request_image()
227 res = iotx_req_image(ota_handle, version_str); in dm_fota_request_image()