/********************** 头文件 *************************/ #include "bsp_esb.h" /********************** 变量区 *************************/ static nrf_esb_payload_t tx_payload = NRF_ESB_CREATE_PAYLOAD(0, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00); static nrf_esb_payload_t rx_payload; int8_t s_rssi; volatile uint16_t s_press_buf[3]; volatile uint16_t s_press_dex = 0; volatile uint16_t s_press = 0; volatile int16_t s_pos[3]; volatile int16_t s_att[3]; volatile int16_t s_zupt; extern int time_stamp; extern void load_pm_other(unsigned char* buf); /********************** 函数声明区 *************************/ extern void send_motion_to_phone(uint8_t motion,uint16_t ts); void nrf_esb_event_handler(nrf_esb_evt_t const * p_event) { switch (p_event->evt_id) { case NRF_ESB_EVENT_TX_SUCCESS: // printf("T"); break; case NRF_ESB_EVENT_TX_FAILED: // printf("F"); // (void) nrf_esb_flush_tx(); // (void) nrf_esb_start_tx(); break; case NRF_ESB_EVENT_RX_RECEIVED: if (nrf_esb_read_rx_payload(&rx_payload) == NRF_SUCCESS) { // app_uart_put('S'); // printf("S"); // nrf_gpio_pin_toggle(26); // for(int i=0;iESP_MAX_DATA_LEN) return NRF_ERROR_DATA_SIZE; for(i=0;i