openwsn-fw-antiJamming/bsp/chips/at86rf215/radio.c
//===== RF admin
//channel spacing in KHz
//frequency_0 in kHz
//frequency_nb integer
RF admin
channel spacing in KHz
frequency_0 in kHz
frequency_nb integer
RF admin channel spacing in KHz frequency_0 in kHz frequency_nb integer
void radio_setFrequency(uint16_t channel_spacing, uint32_t frequency_0, uint16_t channel) {
    frequency_0 = (frequency_0/25);
    at86rf215_spiWriteReg(RG_RF09_CS, (uint8_t)(channel_spacing/25));
    at86rf215_spiWriteReg(RG_RF09_CCF0L, (uint8_t)(frequency_0%256));
    at86rf215_spiWriteReg(RG_RF09_CCF0H, (uint8_t)(frequency_0/256));
    at86rf215_spiWriteReg(RG_RF09_CNL, (uint8_t)(channel%256));
    at86rf215_spiWriteReg(RG_RF09_CNM, (uint8_t)(channel/256));
    radio_vars.state = RADIOSTATE_FREQUENCY_SET;
}
void radio_setFrequency ( uint16_t channel_spacing , uint32_t frequency_0 , uint16_t channel ) { frequency_0 = ( frequency_0 / 25 ) ; at86rf215_spiWriteReg ( RG_RF09_CS , ( uint8_t ) ( channel_spacing / 25 ) ) ; at86rf215_spiWriteReg ( RG_RF09_CCF0L , ( uint8_t ) ( frequency_0 % 256 ) ) ; at86rf215_spiWriteReg ( RG_RF09_CCF0H , ( uint8_t ) ( frequency_0 / 256 ) ) ; at86rf215_spiWriteReg ( RG_RF09_CNL , ( uint8_t ) ( channel % 256 ) ) ; at86rf215_spiWriteReg ( RG_RF09_CNM , ( uint8_t ) ( channel / 256 ) ) ; radio_vars . state = RADIOSTATE_FREQUENCY_SET ; }
RF admin
channel spacing in KHz
frequency_0 in kHz
frequency_nb integer
RF admin channel spacing in KHz frequency_0 in kHz frequency_nb integer
// change state