pradeep shekhar
/
Beacon_BAE_intergration_test_3
General testings
Fork of BEACON_CODE_NEW by
Revision 8:6af757921576, committed 2015-10-04
- Comitter:
- shekhar
- Date:
- Sun Oct 04 22:31:44 2015 +0000
- Parent:
- 7:b2ca2b908e5d
- Child:
- 9:aeeb97970484
- Commit message:
- Removed packet-handler, changes made according to ConOps-BCN-2.0,
Changed in this revision
--- a/beacon.h Sun Oct 04 14:52:03 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -#include "mbed.h" - -#define TIMES 20 -#define RX_DATA 60 //in bytes -#define TX_DATA 200 //in bytes - -void writereg(uint8_t reg,uint8_t val); -uint8_t readreg(uint8_t reg); -void clearTxBuf(); -void clearRxBuf(); -int setFrequency(float,float); -void init(); - -#define RF22_MAX_MESSAGE_LEN 255 -// These values we set for FIFO thresholds -#define RF22_TXFFAEM_THRESHOLD 4 -#define RF22_RXFFAFULL_THRESHOLD 55 - -// Register names -#define RF22_REG_00_DEVICE_TYPE 0x00 -#define RF22_REG_02_DEVICE_STATUS 0x02 -#define RF22_REG_03_INTERRUPT_STATUS1 0x03 -#define RF22_REG_04_INTERRUPT_STATUS2 0x04 -#define RF22_REG_07_OPERATING_MODE1 0x07 -#define RF22_REG_08_OPERATING_MODE2 0x08 -#define RF22_REG_09_OSCILLATOR_LOAD_CAPACITANCE 0x09 -#define RF22_REG_0B_GPIO_CONFIGURATION0 0x0b -#define RF22_REG_0C_GPIO_CONFIGURATION1 0x0c -#define RF22_REG_0D_GPIO_CONFIGURATION2 0x0d -#define RF22_REG_1C_IF_FILTER_BANDWIDTH 0x1c -#define RF22_REG_1F_CLOCK_RECOVERY_GEARSHIFT_OVERRIDE 0x1f -#define RF22_REG_20_CLOCK_RECOVERY_OVERSAMPLING_RATE 0x20 -#define RF22_REG_21_CLOCK_RECOVERY_OFFSET2 0x21 -#define RF22_REG_22_CLOCK_RECOVERY_OFFSET1 0x22 -#define RF22_REG_23_CLOCK_RECOVERY_OFFSET0 0x23 -#define RF22_REG_24_CLOCK_RECOVERY_TIMING_LOOP_GAIN1 0x24 -#define RF22_REG_25_CLOCK_RECOVERY_TIMING_LOOP_GAIN0 0x25 -#define RF22_REG_26_RSSI 0x26 -#define RF22_REG_27_RSSI_THRESHOLD 0x27 -#define RF22_REG_28_ANTENNA_DIVERSITY1 0x28 -#define RF22_REG_29_ANTENNA_DIVERSITY2 0x29 -#define RF22_REG_2A_AFC_LIMITER 0x2a -#define RF22_REG_2B_AFC_CORRECTION_READ 0x2b -#define RF22_REG_2C_OOK_COUNTER_VALUE_1 0x2c -#define RF22_REG_2D_OOK_COUNTER_VALUE_2 0x2d -#define RF22_REG_2E_SLICER_PEAK_HOLD 0x2e -#define RF22_REG_30_DATA_ACCESS_CONTROL 0x30 -#define RF22_REG_31_EZMAC_STATUS 0x31 -#define RF22_REG_32_HEADER_CONTROL1 0x32 -#define RF22_REG_33_HEADER_CONTROL2 0x33 -#define RF22_REG_34_PREAMBLE_LENGTH 0x34 -#define RF22_REG_35_PREAMBLE_DETECTION_CONTROL1 0x35 -#define RF22_REG_36_SYNC_WORD3 0x36 -#define RF22_REG_37_SYNC_WORD2 0x37 -#define RF22_REG_38_SYNC_WORD1 0x38 -#define RF22_REG_39_SYNC_WORD0 0x39 -#define RF22_REG_3A_TRANSMIT_HEADER3 0x3a -#define RF22_REG_3B_TRANSMIT_HEADER2 0x3b -#define RF22_REG_3C_TRANSMIT_HEADER1 0x3c -#define RF22_REG_3D_TRANSMIT_HEADER0 0x3d -#define RF22_REG_3E_PACKET_LENGTH 0x3e -#define RF22_REG_3F_CHECK_HEADER3 0x3f -#define RF22_REG_40_CHECK_HEADER2 0x40 -#define RF22_REG_41_CHECK_HEADER1 0x41 -#define RF22_REG_42_CHECK_HEADER0 0x42 -#define RF22_REG_43_HEADER_ENABLE3 0x43 -#define RF22_REG_44_HEADER_ENABLE2 0x44 -#define RF22_REG_45_HEADER_ENABLE1 0x45 -#define RF22_REG_46_HEADER_ENABLE0 0x46 -#define RF22_REG_47_RECEIVED_HEADER3 0x47 -#define RF22_REG_48_RECEIVED_HEADER2 0x48 -#define RF22_REG_49_RECEIVED_HEADER1 0x49 -#define RF22_REG_4A_RECEIVED_HEADER0 0x4a -#define RF22_REG_4B_RECEIVED_PACKET_LENGTH 0x4b -#define RF22_REG_58 0x58 -#define RF22_REG_60_CHANNEL_FILTER_COEFFICIENT_ADDRESS 0x60 -#define RF22_REG_61_CHANNEL_FILTER_COEFFICIENT_VALUE 0x61 -#define RF22_REG_62_CRYSTAL_OSCILLATOR_POR_CONTROL 0x62 -#define RF22_REG_63_RC_OSCILLATOR_COARSE_CALIBRATION 0x63 -#define RF22_REG_64_RC_OSCILLATOR_FINE_CALIBRATION 0x64 -#define RF22_REG_65_LDO_CONTROL_OVERRIDE 0x65 -#define RF22_REG_66_LDO_LEVEL_SETTINGS 0x66 -#define RF22_REG_67_DELTA_SIGMA_ADC_TUNING1 0x67 -#define RF22_REG_68_DELTA_SIGMA_ADC_TUNING2 0x68 -#define RF22_REG_69_AGC_OVERRIDE1 0x69 -#define RF22_REG_6A_AGC_OVERRIDE2 0x6a -#define RF22_REG_6B_GFSK_FIR_FILTER_COEFFICIENT_ADDRESS 0x6b -#define RF22_REG_6C_GFSK_FIR_FILTER_COEFFICIENT_VALUE 0x6c -#define RF22_REG_6D_TX_POWER 0x6d -#define RF22_REG_6E_TX_DATA_RATE1 0x6e -#define RF22_REG_6F_TX_DATA_RATE0 0x6f -#define RF22_REG_70_MODULATION_CONTROL1 0x70 -#define RF22_REG_71_MODULATION_CONTROL2 0x71 -#define RF22_REG_72_FREQUENCY_DEVIATION 0x72 -#define RF22_REG_73_FREQUENCY_OFFSET1 0x73 -#define RF22_REG_74_FREQUENCY_OFFSET2 0x74 -#define RF22_REG_75_FREQUENCY_BAND_SELECT 0x75 -#define RF22_REG_76_NOMINAL_CARRIER_FREQUENCY1 0x76 -#define RF22_REG_77_NOMINAL_CARRIER_FREQUENCY0 0x77 -#define RF22_REG_79_FREQUENCY_HOPPING_CHANNEL_SELECT 0x79 -#define RF22_REG_7A_FREQUENCY_HOPPING_STEP_SIZE 0x7a -#define RF22_REG_7C_TX_FIFO_CONTROL1 0x7c -#define RF22_REG_7D_TX_FIFO_CONTROL2 0x7d -#define RF22_REG_7E_RX_FIFO_CONTROL 0x7e -#define RF22_REG_7F_FIFO_ACCESS 0x7f \ No newline at end of file
--- a/main.cpp Sun Oct 04 14:52:03 2015 +0000 +++ b/main.cpp Sun Oct 04 22:31:44 2015 +0000 @@ -28,10 +28,13 @@ { if(BCN_TX_EN == 1 && skip_Iteration == false) { + //Measure and store BCN temperature in BCN_TS_BUFFER + BCN_TS_BUFFER = ((check_Temperature())*0.5) - 64; + //Get BCN_HK data from BCN HW(SPI) //Store BCN_HK data in BCN_HK_BUFFER if(BCN_TX_STANDBY == 1 && skip_Iteration == false) { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_TX_STANDBY); + Set_BCN_TX_STATUS(BCN_TX_STANDBY); BCN_TX_MAIN_STATUS = 0; skip_Iteration = true; // break; @@ -52,14 +55,14 @@ //include LONG_BCN_TX also if(Check_ACK_RECEIVED() == 1 && skip_Iteration == false) { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_TX_SB_SI_SUCCESS); + Set_BCN_TX_STATUS(BCN_TX_SUCCESS); BCN_TX_MAIN_STATUS = 0; // break; skip_Iteration = true; } else if(Check_ACK_RECEIVED() == 0 && skip_Iteration == false) { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_TX_FAILURE); + Set_BCN_TX_STATUS(BCN_TX_FAILURE); BCN_TX_MAIN_STATUS = 0; // break; skip_Iteration = true; @@ -72,17 +75,18 @@ if(LOW_POWER_COUNTER == 3 && skip_Iteration == false) { SHORT_BCN_TX(); + LONG_BCN_TX(); //include LONG_BCN_TX also if(Check_ACK_RECEIVED() == 1 && skip_Iteration == false) { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_TX_SB_LI_SUCCESS); + Set_BCN_TX_STATUS(BCN_TX_SUCCESS); BCN_TX_MAIN_STATUS = 0; // break; skip_Iteration = true; } else if(Check_ACK_RECEIVED() != 1 && skip_Iteration == false) { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_TX_FAILURE); + Set_BCN_TX_STATUS(BCN_TX_FAILURE); BCN_TX_MAIN_STATUS = 0; // break; skip_Iteration = true; @@ -99,7 +103,7 @@ } else if(BCN_TX_EN != 1 && skip_Iteration == false) { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_TX_DISABLED); + Set_BCN_TX_STATUS(BCN_TX_DISABLED); BCN_TX_MAIN_STATUS = 0; // break; skip_Iteration = true; @@ -107,7 +111,7 @@ } else { - Set_BCN_TX_MAIN_STATE_STATUS(BCN_RF_SILENCE); //Window of RF Silence: None of the Txs should be on. + Set_BCN_TX_STATUS(BCN_RF_SILENCE); //Window of RF Silence: None of the Txs should be on. BCN_TX_MAIN_STATUS = 0; skip_Iteration = true; // break; @@ -115,9 +119,9 @@ skip_Iteration = false; } -void Set_BCN_TX_MAIN_STATE_STATUS(uint8_t STATUS) +void Set_BCN_TX_STATUS(uint8_t STATUS) { - BCN_TX_MAIN_STATE_STATUS = STATUS; + BCN_TX_STATUS = STATUS; } int check_POWER_LEVEL() @@ -444,40 +448,32 @@ //wait(1); //change the time later spi.format(8,0); spi.frequency(10000000); //10MHz SCLK + + //should either have a flag for invalid SPI or discard this for actual case or add reset if (readreg(RF22_REG_00_DEVICE_TYPE) == 0x08) pc.printf("spi connection valid\r\n"); else pc.printf("error in spi connection\r\n"); //reset() + + writereg(RF22_REG_07_OPERATING_MODE1,0x80); //sw_reset wait(1); //takes time to reset clearTxBuf(); - clearRxBuf(); + + clearRxBuf();//may not be required + //txfifoalmostempty writereg(RF22_REG_7D_TX_FIFO_CONTROL2,10); - //rxfifoalmostfull - writereg(RF22_REG_7E_RX_FIFO_CONTROL,20); + //Packet-engine registers - writereg(RF22_REG_30_DATA_ACCESS_CONTROL,0x8E); //RF22_REG_30_DATA_ACCESS_CONTROL, RF22_ENPACRX | RF22_ENPACTX | RF22_ENCRC | RF22_CRC_CRC_16_IBM + writereg(RF22_REG_30_DATA_ACCESS_CONTROL,0x00); //RF22_REG_30_DATA_ACCESS_CONTROL, RF22_ENPACRX | RF22_ENPACTX | RF22_ENCRC | RF22_CRC_CRC_16_IBM //&0x77 = diasable packet rx-tx handling - writereg(RF22_REG_32_HEADER_CONTROL1,0x88); //RF22_REG_32_HEADER_CONTROL1, RF22_BCEN_HEADER3 | RF22_HDCH_HEADER3 - writereg(RF22_REG_33_HEADER_CONTROL2,0x42); //RF22_REG_33_HEADER_CONTROL2, RF22_HDLEN_4 | RF22_SYNCLEN_2 - writereg(RF22_REG_34_PREAMBLE_LENGTH,8); //RF22_REG_34_PREAMBLE_LENGTH, nibbles); preamble length = 8; - writereg(RF22_REG_36_SYNC_WORD3,0x2D); //syncword3=2D - writereg(RF22_REG_37_SYNC_WORD2,0xD4); //syncword2=D4 - writereg(RF22_REG_3F_CHECK_HEADER3,0); //RF22_REG_3F_CHECK_HEADER3, RF22_DEFAULT_NODE_ADDRESS - writereg(RF22_REG_3A_TRANSMIT_HEADER3,0xab); //header_to - writereg(RF22_REG_3B_TRANSMIT_HEADER2,0xbc); //header_from - writereg(RF22_REG_3C_TRANSMIT_HEADER1,0xcd); //header_ids - writereg(RF22_REG_3D_TRANSMIT_HEADER0,0xde); //header_flags - writereg(RF22_REG_3F_CHECK_HEADER3,0xab); - writereg(RF22_REG_40_CHECK_HEADER2,0xbc); - writereg(RF22_REG_41_CHECK_HEADER1,0xcd); - writereg(RF22_REG_42_CHECK_HEADER0,0xde); - - //RSSI threshold for clear channel indicator - writereg(RF22_REG_27_RSSI_THRESHOLD,0xA5); //55 for -80dBm, 2D for -100dBm, 7D for -60dBm, A5 for -40dBm, CD for -20 dBm + + writereg(RF22_REG_33_HEADER_CONTROL2,0x08); //RF22_REG_33_HEADER_CONTROL2, RF22_HDLEN_4 | RF22_SYNCLEN_2 + writereg(RF22_REG_34_PREAMBLE_LENGTH,0x00); //RF22_REG_34_PREAMBLE_LENGTH, nibbles); preamble length = 8; + //may be redundant since packethandler is disabled writereg(RF22_REG_0B_GPIO_CONFIGURATION0,0x15); // TX state ?? writereg(RF22_REG_0C_GPIO_CONFIGURATION1,0x12); // RX state ?? @@ -488,6 +484,7 @@ setFrequency(435.0, 0.05); + //This may not be required if((readreg(RF22_REG_02_DEVICE_STATUS)& 0x08)!= 0x00) pc.printf("frequency not set properly\r\n"); //frequency set @@ -509,14 +506,22 @@ writereg(RF22_REG_2E_SLICER_PEAK_HOLD,0x2A); //?? writereg(RF22_REG_58,0x80); writereg(RF22_REG_69_AGC_OVERRIDE1,0x60); - //writereg(RF22_REG_6E_TX_DATA_RATE_0.125_1,0x09); - //writereg(RF22_REG_6F_TX_DATA_RATE_0.125_0,0xd5); - writereg(RF22_REG_70_MODULATION_CONTROL1,0x2c); + + + //writereg(RF22_REG_6E_TX_DATA_RATE_0.125_1,0x09);//written later + //writereg(RF22_REG_6F_TX_DATA_RATE_0.125_0,0xd5);//written later + + writereg(RF22_REG_70_MODULATION_CONTROL1,0x20);//changed from 0x2c to 0x20 since machester is not required writereg(RF22_REG_71_MODULATION_CONTROL2,0x21);//ook = 0x21 //fsk = 0x22 - writereg(RF22_REG_72_FREQUENCY_DEVIATION,0x50); + + //writereg(RF22_REG_72_FREQUENCY_DEVIATION,0x50); + //required for OOK??? + //set tx power writereg(RF22_REG_6D_TX_POWER,0x07); //20dbm - //writereg(RF22_REG_3E_PACKET_LENGTH,SHORT_TX_DATA); //short packet length + //why 0x06?? 0x07 is for max//is the previous bits required? + + //writereg(RF22_REG_3E_PACKET_LENGTH,SHORT_TX_DATA); //short packet length //written later } bool Check_ACK_RECEIVED() { @@ -530,8 +535,8 @@ else { pc.printf("Packet not sent\r\n"); - //return 0; actual value - return 1; //to make this function work in any condition + return 0; actual value + //return 1; //to make this function work in any condition //Why?? } } @@ -542,31 +547,48 @@ int main() { - int temp, final_temp; - P_BCN_INIT(); + //int temp, final_temp; + + P_BCN_INIT(); + t.start(); - while (t.read() < RF_SILENCE_TIME){ //transmission won't start until 5 seconds //change made: temp check during RF Silence window - temp = check_Temperature(); - final_temp = (float)temp*0.5 - 64; - pc.printf("Temperature: %d\r\n", final_temp); - wait(900); //15 minutes - } + + while (t.read() < RF_SILENCE_TIME); + //{ //transmission won't start until 5 seconds //change made: temp check during RF Silence window + //temp = check_Temperature(); + //final_temp = (float)temp*0.5 - 64; + //pc.printf("Temperature: %d\r\n", final_temp); + //wait(900); //15 minutes + //} P_BCN_FEN(); pc.printf("Entering BCN_TX_MAIN\r\n"); - loop.attach(&P_BCN_TX_MAIN, 30); - + loop.attach(&P_BCN_TX_MAIN, 30.0); + pc.printf("Exited Main Successfully :) \r\n"); t.stop(); // temp = check_Temperature(); // final_temp = (float)temp*0.5 - 64; // pc.printf("%d\r\n", final_temp); + + //while(1) +// { +// temp = check_Temperature(); +// final_temp = (float)temp*0.5 - 64; +// pc.printf("Temperature: %d\r\n", final_temp); +// wait(900); //15 minutes +// } while(1) { - temp = check_Temperature(); - final_temp = (float)temp*0.5 - 64; - pc.printf("Temperature: %d\r\n", final_temp); - wait(900); //15 minutes + //display statuses or wait + + //BCN_INIT_STATUS + //BCN_TX_MAIN_STATUS + //BCN_TX_STATUS + //BCN_TX_EN + //BCN_FEN + //BCN_STANDBY } return 1; + } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tx.h Sun Oct 04 22:31:44 2015 +0000 @@ -0,0 +1,142 @@ +#include "mbed.h" + + +//STATES +#define BCN_RF_SILENCE 0 +#define BCN_TX_DISABLED 1 +#define BCN_TX_STANDBY 2 +#define BCN_TX_FAILURE 3 +//#define BCN_TX_SB_SI_SUCCESS 4 +//#define BCN_TX_SB_LI_SUCCESS 5 +#define BCN_TX_SUCCESS 4 + +//Size of tx data +#define SHORT_TX_DATA 60 //in bytes +#define LONG_TX_DATA 180 //in bytes + +//#define RF_SILENCE_TIME 5 //in seconds //shouldn't this be 35 mins in actual scenario +#define RF_SILENCE_TIME 35*60 + +//GLOBAL VARIABLES +uint8_t BCN_INIT_STATUS; +uint8_t BCN_TX_MAIN_STATUS; +uint8_t BCN_TX_STATUS; +uint8_t BCN_TX_EN = 1; //hardcoding for now //check where is this variable toggled?? +uint8_t BCN_FEN = 0; //This variable is also toggled in P_BCN_FEN process. +uint8_t BCN_STANDBY = 0; //hardcoding for now //check where is this variable toggled?? +uint8_t LOW_POWER_COUNTER; //toggled in a function +uint8_t BCN_TS_BUFFER; // For Temperature + +//FUNCTION PROTOTYPING +void P_BCN_INIT(); +void P_BCN_FEN(); +void P_BCN_TX_MAIN(); +void Set_BCN_TX_MAIN_STATE_STATUS(uint8_t STATUS); +int check_POWER_LEVEL(); +int check_Temperature(); +void SHORT_BCN_TX(); +void Init_BEACON_HW(); +void writereg(uint8_t reg,uint8_t val); +uint8_t readreg(uint8_t reg); +void clearTxBuf(); +void clearRxBuf(); +int setFrequency(float,float); +bool Check_ACK_RECEIVED(); +void INC_BCN_LOW_POWER_COUNTER(); + +#define RF22_MAX_MESSAGE_LEN 255 + +//These values we set for FIFO thresholds +#define RF22_TXFFAEM_THRESHOLD 4 +#define RF22_RXFFAFULL_THRESHOLD 55 + +//Registers +#define RF22_REG_00_DEVICE_TYPE 0x00 +#define RF22_REG_02_DEVICE_STATUS 0x02 +#define RF22_REG_03_INTERRUPT_STATUS1 0x03 +#define RF22_REG_04_INTERRUPT_STATUS2 0x04 +#define RF22_REG_07_OPERATING_MODE1 0x07 +#define RF22_REG_08_OPERATING_MODE2 0x08 +#define RF22_REG_09_OSCILLATOR_LOAD_CAPACITANCE 0x09 +#define RF22_REG_0B_GPIO_CONFIGURATION0 0x0b +#define RF22_REG_0C_GPIO_CONFIGURATION1 0x0c +#define RF22_REG_0D_GPIO_CONFIGURATION2 0x0d +#define RF22_REG_0F_ADC_CONFIGURATION 0x0f +#define RF22_REG_11_ADC_Value 0x11 +#define RF22_REG_12_Temperature_Sensor_Calibration 0x12 +#define RF22_REG_1C_IF_FILTER_BANDWIDTH 0x1c +#define RF22_REG_1F_CLOCK_RECOVERY_GEARSHIFT_OVERRIDE 0x1f +#define RF22_REG_20_CLOCK_RECOVERY_OVERSAMPLING_RATE 0x20 +#define RF22_REG_21_CLOCK_RECOVERY_OFFSET2 0x21 +#define RF22_REG_22_CLOCK_RECOVERY_OFFSET1 0x22 +#define RF22_REG_23_CLOCK_RECOVERY_OFFSET0 0x23 +#define RF22_REG_24_CLOCK_RECOVERY_TIMING_LOOP_GAIN1 0x24 +#define RF22_REG_25_CLOCK_RECOVERY_TIMING_LOOP_GAIN0 0x25 +#define RF22_REG_26_RSSI 0x26 +#define RF22_REG_27_RSSI_THRESHOLD 0x27 +#define RF22_REG_28_ANTENNA_DIVERSITY1 0x28 +#define RF22_REG_29_ANTENNA_DIVERSITY2 0x29 +#define RF22_REG_2A_AFC_LIMITER 0x2a +#define RF22_REG_2B_AFC_CORRECTION_READ 0x2b +#define RF22_REG_2C_OOK_COUNTER_VALUE_1 0x2c +#define RF22_REG_2D_OOK_COUNTER_VALUE_2 0x2d +#define RF22_REG_2E_SLICER_PEAK_HOLD 0x2e +#define RF22_REG_30_DATA_ACCESS_CONTROL 0x30 +#define RF22_REG_31_EZMAC_STATUS 0x31 +#define RF22_REG_32_HEADER_CONTROL1 0x32 +#define RF22_REG_33_HEADER_CONTROL2 0x33 +#define RF22_REG_34_PREAMBLE_LENGTH 0x34 +#define RF22_REG_35_PREAMBLE_DETECTION_CONTROL1 0x35 +#define RF22_REG_36_SYNC_WORD3 0x36 +#define RF22_REG_37_SYNC_WORD2 0x37 +#define RF22_REG_38_SYNC_WORD1 0x38 +#define RF22_REG_39_SYNC_WORD0 0x39 +#define RF22_REG_3A_TRANSMIT_HEADER3 0x3a +#define RF22_REG_3B_TRANSMIT_HEADER2 0x3b +#define RF22_REG_3C_TRANSMIT_HEADER1 0x3c +#define RF22_REG_3D_TRANSMIT_HEADER0 0x3d +#define RF22_REG_3E_PACKET_LENGTH 0x3e +#define RF22_REG_3F_CHECK_HEADER3 0x3f +#define RF22_REG_40_CHECK_HEADER2 0x40 +#define RF22_REG_41_CHECK_HEADER1 0x41 +#define RF22_REG_42_CHECK_HEADER0 0x42 +#define RF22_REG_43_HEADER_ENABLE3 0x43 +#define RF22_REG_44_HEADER_ENABLE2 0x44 +#define RF22_REG_45_HEADER_ENABLE1 0x45 +#define RF22_REG_46_HEADER_ENABLE0 0x46 +#define RF22_REG_47_RECEIVED_HEADER3 0x47 +#define RF22_REG_48_RECEIVED_HEADER2 0x48 +#define RF22_REG_49_RECEIVED_HEADER1 0x49 +#define RF22_REG_4A_RECEIVED_HEADER0 0x4a +#define RF22_REG_4B_RECEIVED_PACKET_LENGTH 0x4b +#define RF22_REG_58 0x58 +#define RF22_REG_60_CHANNEL_FILTER_COEFFICIENT_ADDRESS 0x60 +#define RF22_REG_61_CHANNEL_FILTER_COEFFICIENT_VALUE 0x61 +#define RF22_REG_62_CRYSTAL_OSCILLATOR_POR_CONTROL 0x62 +#define RF22_REG_63_RC_OSCILLATOR_COARSE_CALIBRATION 0x63 +#define RF22_REG_64_RC_OSCILLATOR_FINE_CALIBRATION 0x64 +#define RF22_REG_65_LDO_CONTROL_OVERRIDE 0x65 +#define RF22_REG_66_LDO_LEVEL_SETTINGS 0x66 +#define RF22_REG_67_DELTA_SIGMA_ADC_TUNING1 0x67 +#define RF22_REG_68_DELTA_SIGMA_ADC_TUNING2 0x68 +#define RF22_REG_69_AGC_OVERRIDE1 0x69 +#define RF22_REG_6A_AGC_OVERRIDE2 0x6a +#define RF22_REG_6B_GFSK_FIR_FILTER_COEFFICIENT_ADDRESS 0x6b +#define RF22_REG_6C_GFSK_FIR_FILTER_COEFFICIENT_VALUE 0x6c +#define RF22_REG_6D_TX_POWER 0x6d +#define RF22_REG_6E_TX_DATA_RATE 0x6e +#define RF22_REG_6F_TX_DATA_RATE 0x6f +#define RF22_REG_70_MODULATION_CONTROL1 0x70 +#define RF22_REG_71_MODULATION_CONTROL2 0x71 +#define RF22_REG_72_FREQUENCY_DEVIATION 0x72 +#define RF22_REG_73_FREQUENCY_OFFSET1 0x73 +#define RF22_REG_74_FREQUENCY_OFFSET2 0x74 +#define RF22_REG_75_FREQUENCY_BAND_SELECT 0x75 +#define RF22_REG_76_NOMINAL_CARRIER_FREQUENCY1 0x76 +#define RF22_REG_77_NOMINAL_CARRIER_FREQUENCY0 0x77 +#define RF22_REG_79_FREQUENCY_HOPPING_CHANNEL_SELECT 0x79 +#define RF22_REG_7A_FREQUENCY_HOPPING_STEP_SIZE 0x7a +#define RF22_REG_7C_TX_FIFO_CONTROL1 0x7c +#define RF22_REG_7D_TX_FIFO_CONTROL2 0x7d +#define RF22_REG_7E_RX_FIFO_CONTROL 0x7e +#define RF22_REG_7F_FIFO_ACCESS 0x7f \ No newline at end of file