drv_ota.h 629 B

12345678910111213141516171819202122232425262728
  1. #ifndef __DRV_OTA_H__
  2. #define __DRV_OTA_H__
  3. #include "yc_drv_common.h"
  4. //#define DEVICE_INFO_BASE 0x07f000
  5. #define REVERSE_3BYTE_DEFINE(a) ((a>>16)+(a&0xff00)+((a&0xff)<<16))
  6. #define CODE_START_FLASHADDR1 0x1003
  7. #define CODE_START_FLASHADDR2 0X18003
  8. #define OTA_EVT_START 0xc0
  9. #define OTA_EVT_DATA 0xc1
  10. #define OTA_EVT_END 0Xc2
  11. #define OTA_EVT_RESET 0Xff
  12. #define OTA_EVT 0xBA
  13. #define OTA_CMD 0xAB
  14. #define OTA_BLE_WRITE_HANDLE 0x0011
  15. #define OTA_BLE_NOTIFY_HANDLE 0x000e
  16. #define OTA_END_CHECK_OK 0X55
  17. #define OTA_END_CHECK_FAIL 0XFF
  18. void Bt_BleOTA(uint8_t len,uint8_t *dataPtr);
  19. #endif //__DRV_OTA_H__