void NRF24L01_SetContCarrier(rt_bool_t contCarrier) { radioConf.contCarrier = contCarrier?1:0; RADIO_DIS_CE(); NRF24L01_UpdateRfSetup(); if(contCarrier) RADIO_EN_CE(); }
void nrfSetEnable(bool enable) { if (enable==TRUE) { RADIO_EN_CE(); } else { RADIO_DIS_CE(); } }
void radioSetContCarrier(bool contCarrier) { radioConf.contCarrier = contCarrier?1:0; RADIO_DIS_CE(); radioUpdateRfSetup(); if(contCarrier) RADIO_EN_CE(); }
//Set the radio channel. void NRF24L01_SetChannel(char channel) { //Test the input if(channel<0 || channel>125) return; //Change the channel RADIO_DIS_CE(); NRF24L01_WriteReg(REG_RF_CH, channel); //CE is continously activated if in continous carrier mode if(radioConf.contCarrier) RADIO_EN_CE(); }
void radioSetMode(enum radioMode_e mode) { switch (mode) { case RADIO_MODE_PTX: // Energize the radio in PTX mode. Interrupts disable radioWriteReg(REG_CONFIG, 0x7E); break; case RADIO_MODE_PRX: // Energize the radio in PRX mode. Interrupts disable radioWriteReg(REG_CONFIG, 0x7F); // start receiving RADIO_EN_CE(); break; } }