44 lines
1.5 KiB
C
44 lines
1.5 KiB
C
/*----------------------------------------------------------------------------
|
|
* Copyright (c) Fenda Technologies Co., Ltd. 2022. All rights reserved.
|
|
*
|
|
* Description: ble_protocol_ota_service.h
|
|
*
|
|
* Author: saimen
|
|
*
|
|
* Create: 2024-12-13
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef _BLE_PROTOCOL_OTA_SERVICE_H_
|
|
#define _BLE_PROTOCOL_OTA_SERVICE_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "stdint.h"
|
|
#include "bts_gatt_server.h"
|
|
#include "sys_typedef.h"
|
|
#include "ble_port_protocol.h"
|
|
|
|
typedef void (*ota_schedule_callback_t)(uint32_t g_ota_total_file_offest, uint32_t g_ota_file_size);
|
|
void register_ota_schedule_callback(ota_schedule_callback_t callback);
|
|
void unregister_ota_schedule_callback(void);
|
|
|
|
uint32_t tjd_ota_get_fimrware_size(void);
|
|
void tjd_ota_upgrade_operation(void);
|
|
void tjd_ota_recovery_upgrade_operation(uint32_t file_size);
|
|
void tjd_ota_breakpoint_callback(void);
|
|
void tjd_ble_protocol_switch_ota(uint8_t server_id, uint16_t conn_id, uint8_t *write_cb_para, uint16_t len , uint8_t cmd_id);
|
|
|
|
void file_download_callback_start_type_fiemware(FileDescriptionInfo_t *p_description, FileTransferInfo_t *p_transfer);
|
|
void file_download_callback_end_type_fiemware(FileDescriptionInfo_t *p_description, FileTransferInfo_t *p_transfer);
|
|
void file_download_callback_data_type_fiemware(FileDescriptionInfo_t *p_description, FileTransferInfo_t *p_transfer);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _BLE_PORT_PROTOCOL_H_ */
|
|
|