sfunc_bt_ota.c 731 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "include.h"
  2. #include "func.h"
  3. #include "func_bt.h"
  4. #if FUNC_BT_EN
  5. AT(.text.func.btring)
  6. void sfunc_bt_ota(void)
  7. {
  8. if(bsp_res_is_playing()) {
  9. bsp_res_set_break(true);
  10. return;
  11. }
  12. printf("%s\n", __func__);
  13. bt_audio_bypass();
  14. led_off();
  15. rled_off();
  16. ota_enter();
  17. while(bt_get_status() == BT_STA_OTA) {
  18. delay_5ms(1);
  19. bt_thread_check_trigger();
  20. }
  21. ota_exit();
  22. /*
  23. while ((f_bt.disp_status == BT_STA_OTA) && (func_cb.sta == FUNC_BT)) {
  24. sfunc_bt_ota_process();
  25. func_bt_message(msg_dequeue());
  26. func_bt_display();
  27. }
  28. sfunc_bt_ota_exit();
  29. */
  30. }
  31. u8 ota_get_flash_size(void){
  32. return FLASH_SIZE>>16;
  33. }
  34. #endif //FUNC_BT_EN