[Solved]~Reading Register 0x09 BIT0 on SPI Nordic!!

I have a Nordic FOB and a Nrf2401+ module that i made working with the Nordic FOB from sparkfun , the thing is that i need to read the 0x09 regiter's BIT 0 in order to get the value that is Boolean value of whether the module is in Frequency Range or not ,so i started the thread here >> http://arduino.cc/forum/index.php/topic,107775.0.html the guy helped me and i understood it also but he pointed to an EXCERPT from LIBRARY NrF2401+ module as follows:

Code:
bool RF24::testRPD(void)
{
  return ( read_register(RPD) & 1 ) ;
}

which i was not able to find in the Library's CPP or Header H file??!!

Is there anything im missing?

Also the following is the FULLY WORKING and TESTED code on the Arduino NrfL2401+ side :

// parts:
// Transceiver nRF24L01+ Module with Chip Antenna Sparkfun sku: WRL-00691
// Nordic FOB Sparkfun sku: WRL-08602
// Arduino Deiecimila
//

// based on Nordic-FOB-Tester-v10.c written by Nathan Seidle at Sparkfun.com in 6-19-2007
// based on article and code 'Interfacing a Serial EEPROM Using SPI' at Arduino.cc by Heather Dewey-Hagborg

// SPI registers defined in basic Arduino:
// SPCR SPI Control Register
// SPDR SPI Data Register
// SPSR SPI Status Register

/* Arduino SPI register info
Data registers simply hold bytes.
For example, the SPI data register (SPDR) holds the byte which is about
to be shifted out the MOSI line,
and the data which has just been shifted in the MISO line.

Status registers change their state based on various microcontroller conditions.
For example, the seventh bit of the SPI status register (SPSR) gets set to 1
when a value is shifted in or out of the SPI.

The SPI control register (SPCR) has 8 bits, each of which control a particular SPI setting.

SPCR
| 7    | 6    | 5    | 4    | 3    | 2    | 1    | 0    |
| SPIE | SPE  | DORD | MSTR | CPOL | CPHA | SPR1 | SPR0 |

SPIE - Enables the SPI interrupt when 1
SPE - Enables the SPI when 1
DORD - Sends data least Significant Bit First when 1, most Significant Bit first when 0
MSTR - Sets the Arduino in master mode when 1, slave mode when 0
CPOL - Sets the data clock to be idle when high if set to 1, idle when low if set to 0
CPHA - Samples data on the falling edge of the data clock when 1, rising edge when 0
SPR1 and SPR0 - Sets the SPI speed, 00 is fastest (4MHz) 11 is slowest (250KHz)

*/
#include "Nrf2401.h"

#define DATAOUT 11 //MOSI
#define DATAIN  12 //MISO 
#define SPICLOCK  13 //SCK
#define CHIPSELECT 10 //CS, also called SS slaveselect

#define NFR_CE 9 // nRF2401 sets the chip to RX or TX mode
#define NFR_IRQ 8 // active low interrupt from nRF2401

byte clr;  // temp to hold discardable SPI return data

byte data_array[4];  // holds data in packet received from Key FOB

byte incoming;  // holds status register of nfr2401

int button_presses; // holds count of number of times a button had been pressed on FOB [since battery replaced]


// routine to send and receive a byte on SPI

char spi_transfer(volatile char data)
{

  SPDR = data;                    // Start the transmission
  while (!(SPSR & (1<<SPIF)))     // Wait the end of the transmission
  {
  };

  return SPDR;                    // return the received byte
}

// main arduino setup routine

void setup()
{
  Serial.begin(9600);
  
  Serial.println("Configuring the nRF2401.");

  pinMode( DATAOUT, OUTPUT);
  pinMode( DATAIN, INPUT);
  pinMode( SPICLOCK, OUTPUT);
  pinMode( CHIPSELECT, OUTPUT);
  
  pinMode( NFR_CE, OUTPUT);
  pinMode( NFR_IRQ, INPUT);


  //interrupt enabled,spi enabled,msb 1st,master,clk low when idle,
  //sample on leading edge of clk,system clock/4 rate (fastest)

  SPCR = (1<<SPE)|(1<<MSTR);
  clr=SPSR;
  clr=SPDR;
  delay(10);


  digitalWrite(CHIPSELECT, HIGH); //disable SPI comm with device
  digitalWrite(NFR_CE, LOW); //chip disable the nRF2401  
  

  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device 
  spi_transfer(0x20); //enable RX irq, CRC enabled, be a receiver
  spi_transfer(0x39);
  digitalWrite(CHIPSELECT, HIGH); //disable SPI comm with device

  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x21);  // disable auto-acknowledge
  spi_transfer(0x00);
  digitalWrite(CHIPSELECT, HIGH); //disable SPI comm with device
    
  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x23);  // set address width to 5 bytes (default, not really needed)
  spi_transfer(0x03);
  digitalWrite(CHIPSELECT, HIGH); //disable SPI comm with device

  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x26);  //air data rate 1 Mbit, 0dBm, setup LNA
  spi_transfer(0x07);
  digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
  
  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x31);  // 4 byte receive payload
  spi_transfer(0x04);
  digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
  
  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x25);  // rf channel 2 (default, not really needed)
  spi_transfer(0x02);
  digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
  
  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x2a);  //set RX pipe 0 address
  spi_transfer(0xe7);
  spi_transfer(0xe7);
  spi_transfer(0xe7);
  spi_transfer(0xe7);
  digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
  
  digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device
  spi_transfer(0x20);  // RX interrupt, power up, be a receiver
  spi_transfer(0x3b);
  digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device

  Serial.println("Done setting up.");
  digitalWrite(NFR_CE, HIGH); //receiver enable the nRF2401 

}

// main arduino program loop

void loop()
{
  Serial.println("Startup up communications with nRF2401.");
  Serial.println("Waiting for message from Nordic Key FOB.");
  
  // loop forever
  while(1)
  {
    digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device 
    incoming = spi_transfer(0xff); // get nRF2401 status register contents
    digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
    // transmission received from FOB
    if (incoming & 0x40)
      {

        // get data from nRF2401
        digitalWrite(NFR_CE, LOW); //disable receiver in the nRF2401 
        digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device 
        spi_transfer(0x61);
        data_array[0] = spi_transfer(0xff);
        data_array[1] = spi_transfer(0xff);        
        data_array[2] = spi_transfer(0xff);
        data_array[3] = spi_transfer(0xff);
        digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
 
        digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device 
        spi_transfer(0xe2);  // flush RX FIFO
        digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device

        digitalWrite(CHIPSELECT, LOW); //enable comm with SPI device 
        spi_transfer(0x27);  // clear RF FIFO interrupt
        spi_transfer(0x40);
        digitalWrite(CHIPSELECT, HIGH); //disable comm with SPI device
        digitalWrite(NFR_CE, HIGH); //receiver enable the nRF2401 
                
        // figure out which key on FOB was pressed
        
        switch( data_array[0] )
        {
          case 0x17: Serial.print("Left button  "); break;
          case 0x1e: Serial.print("Bottom button"); break;
          case 0x1b: Serial.print("Right button "); break;
          case 0x1d: Serial.print("Top button   "); break;
          case 0x0f: Serial.print("Center button"); break;
          default: Serial.print(  "No button!   "); break;
        }
        // display the total number of times that a button had been pressed on the FOB
        // since battery in FOB replaced
        button_presses = (data_array[1] << 8) + data_array[2];
        Serial.print(" pressed ");
        Serial.print( button_presses, DEC );
        Serial.println(" times.");

        // wait a bit before checking for another key press packet, may need some adjusting.       
        delay(10);
      }
  }
}

EDIT:

I think this the register where i will find it SPCR SPI Control Register, is it correct?

got to know that this so called excerpt was from rf24 library https://github.com/maniacbug/RF24/archives/masterand not the one i was looking into ,actually gerg didntt tell me that he was reffering to rf24 library so i was looking onto one i was with at the starting point. now i will be looking into how i would use inthe sketch on arduino

now imm looking for how to utilise the following :

bool RF24::testRPD(void)
{
  return ( read_register(RPD) & 1 ) ;
}

read the above into the arduino sketch to.get the boolean value?

Got it Very Easy!

if (radio.testRPD()) {
     Serial.print("It's There");
   }