1 /* 2 * Copyright (C) 2019-2020 Alibaba Group Holding Limited 3 */ 4 5 #ifndef _TAG_BLE_OTA_ 6 #define _TAG_BLE_OTA_ 7 8 #include <stdint.h> 9 10 typedef enum { 11 OTA_ST_IDLE = 0, 12 OTA_ST_START, 13 OTA_ST_REQUEST, 14 OTA_ST_DL, 15 OTA_ST_FLASH, 16 OTA_ST_STOP, 17 OTA_ST_COMPLETE, 18 } ota_state_en; 19 20 typedef void (*ota_event_callback_t)(ota_state_en ota_state); 21 22 int ble_ota_init(ota_event_callback_t cb); 23 24 void ble_ota_process(); 25 26 #endif /* _TAG_BLE_OTA_ */ 27 28 /******************************** END OF FILE *********************************/ 29