| | |
| | | // rf_delay_ms(1000); |
| | | // if(rf_continous_tx_send_data(tx_test_buf, TX_LEN) != OK) |
| | | // { |
| | | //// DDL_Printf("tx fail \r\n"); |
| | | //// rf_enter_continous_rx(); |
| | | // } |
| | | // else |
| | | // { |
| | | // error_cnt ++; |
| | | //// DDL_Printf("Tx cnt %d\r\n", cnt ); |
| | | // } |
| | | } |
| | | if(rf_get_recv_flag() == RADIO_FLAG_RXDONE) |
| | |
| | | // { |
| | | // printf("0x%02x ", RxDoneParams.Payload[i]); |
| | | // } |
| | | // DDL_Printf("\r\n"); |
| | | error_cnt ++; |
| | | // DDL_Printf("###Rx cnt %d##\r\n", cnt); |
| | | } |
| | | if((rf_get_recv_flag() == RADIO_FLAG_RXTIMEOUT) || (rf_get_recv_flag() == RADIO_FLAG_RXERR)) |
| | | { |
| | | rf_set_recv_flag(RADIO_FLAG_IDLE); |
| | | // DDL_Printf("Rxerr\r\n"); |
| | | } |
| | | } |
| | | void Board_LORA_NVIC_Init(GPIO_IRQ_HANDLER_T irq_handler) //LORA 中断配置 |
| | |
| | | if(rf_continous_tx_send_data(tx_test_buf, TX_LEN) != 0) |
| | | { |
| | | error_cnt++; |
| | | // printf("LORA Init Fail"); |
| | | } |
| | | else |
| | | { |
| | | successful_cnt ++; |
| | | // printf("LORA Init OK\r\n"); |
| | | } |
| | | // while (rf_get_transmit_flag() == RADIO_FLAG_IDLE) ; |
| | | // |
| | |
| | | // rf_set_transmit_flag(RADIO_FLAG_TXDONE); |
| | | if(rf_continous_tx_send_data(tx_test_buf, TX_LEN) != OK) |
| | | { |
| | | // DDL_Printf("tx fail \r\n"); |
| | | // rf_enter_continous_rx(); |
| | | } |
| | | else |
| | | { |
| | | successful_cnt ++; |
| | | // DDL_Printf("Tx cnt %d\r\n", cnt ); |
| | | } |
| | | // while (rf_get_transmit_flag() == RADIO_FLAG_IDLE) ; |
| | | // |