2 This project is free software: you can redistribute it and/or modify
3 it under the terms of the GNU General Public License as published by
4 the Free Software Foundation, either version 3 of the License, or
5 (at your option) any later version.
7 Multiprotocol is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
16 #if defined(TEST_CC2500_INO)
18 #include "iface_nrf250k.h"
20 #define TEST_INITIAL_WAIT 500
21 #define TEST_PACKET_PERIOD 10000
22 #define TEST_PAYLOAD_SIZE 10
23 #define TEST_RF_NUM_CHANNELS 3
25 uint16_t TEST_callback()
29 XN297L_WritePayload(packet, TEST_PAYLOAD_SIZE);
32 if(Channel_data[CH5]<CHANNEL_MIN_COMMAND)
33 hopping_frequency_no=0;
34 else if(Channel_data[CH5]>CHANNEL_MAX_COMMAND)
35 hopping_frequency_no=2;
37 hopping_frequency_no=1;
38 XN297L_Hopping(hopping_frequency_no);
39 CC2500_WriteReg(CC2500_3E_PATABLE,convert_channel_8b(CH6));
40 debugln("CH:%d, PWR:%d",hopping_frequency_no,convert_channel_8b(CH6));
43 return TEST_PACKET_PERIOD>>1;
50 hopping_frequency[0]=0;
51 hopping_frequency[1]=40;
52 hopping_frequency[2]=80;
54 XN297L_HoppingCalib(TEST_RF_NUM_CHANNELS); // Calibrate all channels
55 XN297L_SetTXAddr((uint8_t*)"RADIO", 5);
56 hopping_frequency_no = 0;
58 for(uint8_t i=0; i<TEST_PAYLOAD_SIZE; i++)