usr.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #include "usr.h"
  2. #include "system.h"
  3. #include "bsp_time.h"
  4. //Add your code here...
  5. #include "hal_ble_client.h"
  6. #include "hal_ble_host.h"
  7. #include "hal_mt.h"
  8. #include "hal_battery.h"
  9. #include "hal_led.h"
  10. #include "app_overturn.h"
  11. #include "app_charge.h"
  12. #include "app_power.h"
  13. #include "app_client.h"
  14. #include "app_host.h"
  15. #include "app_game.h"
  16. #include "app_config.h"
  17. #include "app_ota.h"
  18. #include "app_connect_manage.h"
  19. #include "app_organ.h"
  20. #include "ble_comm.h"
  21. #include "exception.h"
  22. #include "bsp_pwm.h"
  23. #include "bsp_wdt.h"
  24. #include "bsp_adc.h"
  25. #include "hal_wearshoes.h"
  26. #include "app_math.h"
  27. #include "app_losspack.h"
  28. #include "app_pair_chargerpin.h"
  29. #include "app_switchimu.h"
  30. #include "exception.h"
  31. #include "app_data_transfer.h"
  32. #include "app_safe.h"
  33. #include "bll_imu.h"
  34. #include "app_flash.h"
  35. #include "app_step.h"
  36. #include "hal_qma.h"
  37. #include "app_detectIsHost.h"
  38. #include "hal_charge.h"
  39. __weak void usr1_Init(void)
  40. {
  41. slave_init(BLE_Client_Push);
  42. host_init(BLE_Host_Push);
  43. }
  44. void PRE_Init(void)
  45. {
  46. usr1_Init();
  47. watchdog_init();
  48. feed_watchdog();
  49. PWR_Init();
  50. LED_Init();
  51. MT_Init();
  52. Flash_Initialize();
  53. Exception_Init();
  54. }
  55. void USR_Init(void)
  56. {
  57. //Add your code here...
  58. TIME_Init();
  59. bll_imu_Init();
  60. ADC_Initialize();
  61. hal_battery_init();
  62. BLE_Client_Initialize();
  63. BLE_Host_Initialize();
  64. hal_wearshoes_Init();
  65. hal_qma_Init();
  66. hal_charge_init();
  67. //APP
  68. app_detect_Init();
  69. app_client_Initialize();
  70. app_host_Initialize();
  71. app_overturn_Init();
  72. app_charge_Init();
  73. app_step_Init();
  74. app_game_Init();
  75. app_math_Init();
  76. app_ota_Init();
  77. app_connect_manage_Init();
  78. app_switchimu_Init();
  79. app_data_transfer_Init();
  80. app_safe_Init();
  81. #if LOSSPACK_ENANBLE
  82. app_losspack_Init();
  83. #endif
  84. #if !BleNameHoldOn_ENANBLE
  85. app_pair_chargerpin_Init();
  86. #endif
  87. }