nrf24l01/nrf24.c
// Set transceiver operational mode
// input:
//   mode - operational mode, one of nRF24_MODE_xx values
Set transceiver operational mode
input:
mode - operational mode, one of nRF24_MODE_xx values
Set transceiver operational mode input : mode - operational mode one of nRF24_MODE_xx values
void nRF24_SetOperationalMode(uint8_t mode) {
	uint8_t reg;
	reg  = nRF24_ReadReg(nRF24_REG_CONFIG);
	reg &= ~nRF24_CONFIG_PRIM_RX;
	reg |= (mode & nRF24_CONFIG_PRIM_RX);
	nRF24_WriteReg(nRF24_REG_CONFIG, reg);
}
void nRF24_SetOperationalMode ( uint8_t mode ) { uint8_t reg ; reg = nRF24_ReadReg ( nRF24_REG_CONFIG ) ; reg &= ~ nRF24_CONFIG_PRIM_RX ; reg |= ( mode & nRF24_CONFIG_PRIM_RX ) ; nRF24_WriteReg ( nRF24_REG_CONFIG , reg ) ; }
Set transceiver operational mode
input:
mode - operational mode, one of nRF24_MODE_xx values
Set transceiver operational mode input : mode - operational mode one of nRF24_MODE_xx values
// Configure PRIM_RX bit of the CONFIG register