#ifndef __main_h__ #define __main_h__ /**************************** 系统头文件 ********************************/ #include #include #include #include #include #include "sdk_common.h" #include "app_error.h" #include "app_uart.h" #include "ble_db_discovery.h" #include "app_timer.h" #include "app_util.h" #include "bsp_btn_ble.h" #include "ble.h" #include "ble_gap.h" #include "ble_hci.h" #include "nrf_sdh.h" #include "nrf_sdh_ble.h" #include "nrf_sdh_soc.h" #include "ble_nus_c.h" #include "nrf_ble_gatt.h" #include "nrf_pwr_mgmt.h" #include "nrf_ble_scan.h" #include "nrf_log.h" #include "nrf_log_ctrl.h" #include "nrf_log_default_backends.h" #include "SEGGER_RTT.h" #include "ble_dfu.h" #include "nrf_dfu_ble_svci_bond_sharing.h" #include "nrf_svci_async_function.h" #include "nrf_svci_async_handler.h" #include "nrf_power.h" #include "peer_manager.h" #include "peer_manager_handler.h" /**************************** 自定义头文件 ********************************/ #include "usr_config.h" //#pragma pack(1) //1字节对齐 //typedef struct _IMU_H{ // int16_t acc[3]; // int16_t gyr[3]; // int16_t mag[3]; // uint16_t press; // int16_t temperature; // uint16_t ts; //}IMU_H_t; //typedef struct _IMU_S{ // int32_t pos[3]; // int16_t att[3]; // int16_t acc[3]; // uint16_t press; // uint8_t zupt; // uint8_t rssi; // uint16_t ts; //}IMU_S_t; //typedef struct _IMU_DAT{ // IMU_H_t h; // IMU_S_t s; //}IMU_DAT_t; //#pragma pack() //1字节对齐成对用 void process_motion(int16_t* _acc,int16_t* _gry,int16_t* _mag,uint16_t _press,uint8_t _rssi); //__weak 函数 可重新定义 void send_protocol(uint8_t index,uint8_t cmd,uint8_t* p,uint8_t datLen); void gpio_mt_run(uint32_t tim); #endif