| | |
| | | #include "mk_spi.h" |
| | | //#include "pan_port.h" |
| | | //#include "pan_param.h" |
| | | //#include "pan_rf.h" |
| | | #include "pan_rf.h" |
| | | #include <global_param.h> |
| | | static uint8_t tx_buf[10] = {0x55, 0x44, 0x33, 0x22, 0x11}; |
| | | static uint8_t rx_buf[10] = {0x00}; |
| | | extern void spi_transfer_callback(void *dev, uint32_t err_code); |
| | | extern uint32_t successful_cnt; |
| | | void Lora_init(void) |
| | | { |
| | | // rf_write_reg(0x04, 0x55); |
| | |
| | | // printf("LORA Init OK\r\n"); |
| | | } |
| | | } |
| | | uint8_t lora_start_poll_buff[4] = {}; |
| | | void Lora_uwb_wakeup(void) |
| | | { |
| | | rf_set_transmit_flag(RADIO_FLAG_IDLE); |
| | | rf_enter_continous_tx(); |
| | | memcpy(&lora_start_poll_buff[1],&g_com_map[DEV_ID],2); |
| | | if(rf_continous_tx_send_data(lora_start_poll_buff, 4) != OK) |
| | | { |
| | | //错误了 |
| | | while(1); |
| | | } |
| | | else |
| | | { |
| | | successful_cnt ++; |
| | | } |
| | | } |
| | | |
| | | //void LORA_mode_select(void) |
| | | //{ |
| | | // if(TX_RX_SELECT==1) |