#ifndef __MAIN_H #define __MAIN_H #include "nrf_delay.h" #include "twi_master.h" #define DEX_NUM 0 enum _cmd{ CMD_HEART = 0, CMD_MOTION,//主机上报给link——pc用 CMD_UPDATA,//主机上报给link——pc用 }; enum _CMD_MOTION{ MOTION_STOP = 0, MOTION_RUN, MOTION_JUMP, MOTION_DOWN, MOTION_LEFT, MOTION_RIGHT, MOTION_FRONT, MOTION_BACK, NUMBERS_OF_MOTION, }; enum _CMD_UPDATE{ UPDATE_NONE = 0, UPDATE_RUN, UPDATE_BASEINFO, NUMBERS_OF_UPDATE, }; void send_to_ble_nus(uint8_t index,uint8_t cmd,uint8_t* dat,uint8_t datLen); int Send_bytes_to_Ble(unsigned char *bytes,int len); void advertising_start(void); void uart_init(void); #endif