Library for the nRF2401A Transceiver

Dependents:   nRF2401A_Hello_World nRF2401A_Wireless_Accelerometer_joypad nRF2401A_Gameduino_Invaders

Revision:
6:ad8242a1379a
Parent:
5:18ce8a56b248
Child:
7:22f69cf045d9
--- a/nRF2401A.h	Sat Oct 19 11:10:47 2013 +0000
+++ b/nRF2401A.h	Sat Oct 19 11:29:23 2013 +0000
@@ -53,11 +53,11 @@
  * #include "mbed.h"
  * #include "nRF2401A.h"
  * 
- * /* comment these out depending on the job of the mbed. If your only using one mbed leave both uncommented. */
+ * // comment these out depending on the job of the mbed. If your only using one mbed leave both uncommented. 
  * //#define TX
  * #define RX
  * 
- * /* If using the FRDM-KL25Z uncomment this line */
+ * // If using the FRDM-KL25Z uncomment this line 
  * //#define FRDMKL25Z
  * 
  * Serial pc(USBTX, USBRX);
@@ -91,7 +91,7 @@
  *     pc.printf("Hello nRF2401A\n\r");
  *     
  * #ifdef TX  
- *     /* initialise the nRF2401A with payload size, address, CRC, bit rate and channel */   
+ *     // initialise the nRF2401A with payload size, address, CRC, bit rate and channel
  *     rf1.setDataPayloadLength(4 << 3)
  *        .setAddress(0x0, 0x0, 0xa6, 0xa6, 0xa6, 3 << 3)
  *        .setCRCMode(nRF2401A::NO_CRC)
@@ -101,14 +101,14 @@
  *     rf1.printControlPacket(pc);
  *     rf1.flushControlPacket();
  *     
- *     /* initialise variables to use for tranmission */
+ *     // initialise variables to use for tranmission
  *     nRF2401A::address_t rf2_addr = {0x0, 0x0, 0x53, 0x53, 0x53};
  *     uint8_t msg[] = {0x01, 0x01, 0x01, 0x01};
  *     uint32_t *msg32 = (uint32_t *) msg;
  * #endif
  * 
  * #ifdef RX   
- *     /* initialise the nRF2401A with payload size, address, CRC, bit rate and channel */   
+ *     // initialise the nRF2401A with payload size, address, CRC, bit rate and channel 
  *     rf2.setDataPayloadLength(4 << 3)
  *        .setAddress(0x0, 0x0, 0x53, 0x53, 0x53, 3 << 3)
  *        .setCRCMode(nRF2401A::NO_CRC)
@@ -118,7 +118,7 @@
  *     rf2.printControlPacket(pc);
  *     rf2.flushControlPacket();   
  *     
- *     /* attach receive callback */
+ *     // attach receive callback 
  *     rf2.attachRXHandler(&nRF2401A_rx, 0);
  * #endif
  *       
@@ -129,7 +129,7 @@
  *         myled = 0;
  *         wait(0.25);  
  *         
- *         /* send the message to the nRF2401A */         
+ *         send the message to the nRF2401A         
  *         rf1.sendMsg(rf2_addr, 3 << 3, msg, 4 << 3);
  *         *msg32 += 1;
  *         
@@ -141,15 +141,15 @@
  * #ifdef RX  
  *         if (rx_recieved)
  *         {      
- *             /* send the read buffer directly to the serial port */
+ *             // send the read buffer directly to the serial port 
  *             rf2.printDataPacket(pc);
  *             
- *             /* send a single byte from the read buffer to the serial port */
+ *             // send a single byte from the read buffer to the serial port 
  *             uint8_t rx_msg = 0;
  *             rf2.readMsg_byte(&rx_msg,  0 );
  *             pc.printf("\n\r%d\n\r", rx_msg);
  *             
- *             /* read the read buffer , then send to the serial port */
+ *             // read the read buffer , then send to the serial port 
  *             uint8_t rx_buffer[32] = {0};
  *             rf2.readMsg( &rx_buffer[0], 32);
  *             for(int i = 0; i < sizeof(rx_buffer); i++)
@@ -158,7 +158,7 @@
  *             }
  *             pc.printf("\r\n");
  *             
- *             /* clear flags and flash the led */
+ *             // clear flags and flash the led 
  *             rx_recieved = false;
  *             myled = !myled;
  *         }