usr - 副本.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #include "usr.h"
  2. #include "system.h"
  3. #include "bsp_time.h"
  4. #include "nrf_delay.h"
  5. //Add your code here...
  6. #include "twi_master.h"
  7. #include "hal_ble_client.h"
  8. #include "hal_ble_host.h"
  9. #include "hal_mt.h"
  10. #include "hal_battery.h"
  11. #include "hal_led.h"
  12. #include "app_overturn.h"
  13. #include "app_charge.h"
  14. #include "app_power.h"
  15. #include "app_client.h"
  16. #include "app_host.h"
  17. #include "app_game.h"
  18. #include "hal_ble_uart0.h"
  19. #include "app_config.h"
  20. #include "app_ota.h"
  21. #include "app_connect_manage.h"
  22. #include "app_organ.h"
  23. #include "ble_comm.h"
  24. #include "ble_gap.h"
  25. #include "exception.h"
  26. #include "bsp_pwm.h"
  27. #include "bsp_wdt.h"
  28. #include "bsp_adc.h"
  29. #include "tool.h"
  30. #include "app_ImuCalibration.h"
  31. #include "hal_wearshoes.h"
  32. #include "app_math.h"
  33. #include "app_losspack.h"
  34. #include "app_pair.h"
  35. #include "app_switchimu.h"
  36. #include "app_self_checking.h"
  37. #include "exception.h"
  38. #include "tool.h"
  39. #include "app_data_transfer.h"
  40. #include "hal_scan_manage.h"
  41. #include "app_safe.h"
  42. #include "bll_imu.h"
  43. #include "app_flash.h"
  44. #include "app_step.h"
  45. #include "hal_qma.h"
  46. #include "app_detectIsHost.h"
  47. __weak void usr1_Init(void)
  48. {
  49. slave_init(BLE_Client_Push);
  50. // host_init(BLE_Host_Push);
  51. }
  52. void PRE_Init(void)
  53. {
  54. // watchdog_init();
  55. // feed_watchdog();
  56. // PWR_Init();
  57. LED_Init();
  58. // MT_Init();
  59. // Flash_Initialize();
  60. // Exception_Init();
  61. usr1_Init();
  62. }
  63. void USR_Init(void)
  64. {
  65. //Add your code here...
  66. TIME_Init();
  67. // UART0_unInit(PIN_TXD_BLE,PIN_RXD_BLE);
  68. LED_Close_Enforce();
  69. bll_imu_close();
  70. drv_qma_power_off();
  71. // PWR_Off();
  72. // nrf_gpio_pin_write(PIN_MT_EN,0);
  73. // ADC_Initialize();
  74. //
  75. // hal_battery_init();
  76. // BLE_Client_Initialize();
  77. // BLE_Host_Initialize();
  78. // hal_wearshoes_Init();
  79. // hal_ble_scan_Init();
  80. // hal_qma_Init();
  81. // //APP
  82. // app_detect_Init();
  83. //
  84. // app_client_Initialize();
  85. // app_host_Initialize();
  86. // app_overturn_Init();
  87. // app_charge_Init();
  88. // app_step_Init();
  89. // app_game_Init();
  90. // app_math_Init();
  91. //
  92. // app_ota_Init();
  93. // app_connect_manage_Init();
  94. // app_switchimu_Init();
  95. // app_data_transfer_Init();
  96. // app_safe_Init();
  97. //
  98. // #if LOSSPACK_ENANBLE
  99. // app_losspack_Init();
  100. // #endif
  101. //
  102. // #if !BleNameHoldOn_ENANBLE
  103. // app_pair_Init();
  104. // #endif
  105. //
  106. //// app_self_checking_Init();
  107. //
  108. // Tool_Init();
  109. }