RF24 v1
nRF24L01.h
00001 /*
00002     Copyright (c) 2007 Stefan Engelke <mbox@stefanengelke.de>
00003 
00004     Permission is hereby granted, free of charge, to any person 
00005     obtaining a copy of this software and associated documentation 
00006     files (the "Software"), to deal in the Software without 
00007     restriction, including without limitation the rights to use, copy, 
00008     modify, merge, publish, distribute, sublicense, and/or sell copies 
00009     of the Software, and to permit persons to whom the Software is 
00010     furnished to do so, subject to the following conditions:
00011 
00012     The above copyright notice and this permission notice shall be 
00013     included in all copies or substantial portions of the Software.
00014 
00015     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
00016     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
00017     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
00018     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
00019     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
00020     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
00021     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
00022     DEALINGS IN THE SOFTWARE.
00023 */
00024 
00025 /* Memory Map */
00026 #define CONFIG      0x00
00027 #define EN_AA       0x01
00028 #define EN_RXADDR   0x02
00029 #define SETUP_AW    0x03
00030 #define SETUP_RETR  0x04
00031 #define RF_CH       0x05
00032 #define RF_SETUP    0x06
00033 #define STATUS      0x07
00034 #define OBSERVE_TX  0x08
00035 #define CD          0x09
00036 #define RX_ADDR_P0  0x0A
00037 #define RX_ADDR_P1  0x0B
00038 #define RX_ADDR_P2  0x0C
00039 #define RX_ADDR_P3  0x0D
00040 #define RX_ADDR_P4  0x0E
00041 #define RX_ADDR_P5  0x0F
00042 #define TX_ADDR     0x10
00043 #define RX_PW_P0    0x11
00044 #define RX_PW_P1    0x12
00045 #define RX_PW_P2    0x13
00046 #define RX_PW_P3    0x14
00047 #define RX_PW_P4    0x15
00048 #define RX_PW_P5    0x16
00049 #define FIFO_STATUS 0x17
00050 #define DYNPD       0x1C
00051 #define FEATURE     0x1D
00052 
00053 /* Bit Mnemonics */
00054 #define MASK_RX_DR  6
00055 #define MASK_TX_DS  5
00056 #define MASK_MAX_RT 4
00057 #define EN_CRC      3
00058 #define CRCO        2
00059 #define PWR_UP      1
00060 #define PRIM_RX     0
00061 #define ENAA_P5     5
00062 #define ENAA_P4     4
00063 #define ENAA_P3     3
00064 #define ENAA_P2     2
00065 #define ENAA_P1     1
00066 #define ENAA_P0     0
00067 #define ERX_P5      5
00068 #define ERX_P4      4
00069 #define ERX_P3      3
00070 #define ERX_P2      2
00071 #define ERX_P1      1
00072 #define ERX_P0      0
00073 #define AW          0
00074 #define ARD         4
00075 #define ARC         0
00076 #define PLL_LOCK    4
00077 #define RF_DR       3
00078 #define RF_PWR      6
00079 #define RX_DR       6
00080 #define TX_DS       5
00081 #define MAX_RT      4
00082 #define RX_P_NO     1
00083 #define TX_FULL     0
00084 #define PLOS_CNT    4
00085 #define ARC_CNT     0
00086 #define TX_REUSE    6
00087 #define FIFO_FULL   5
00088 #define TX_EMPTY    4
00089 #define RX_FULL     1
00090 #define RX_EMPTY    0
00091 #define DPL_P5      5
00092 #define DPL_P4      4
00093 #define DPL_P3      3
00094 #define DPL_P2      2
00095 #define DPL_P1      1
00096 #define DPL_P0      0
00097 #define EN_DPL      2
00098 #define EN_ACK_PAY  1
00099 #define EN_DYN_ACK  0
00100 
00101 /* Instruction Mnemonics */
00102 #define R_REGISTER    0x00
00103 #define W_REGISTER    0x20
00104 #define REGISTER_MASK 0x1F
00105 #define ACTIVATE      0x50
00106 #define R_RX_PL_WID   0x60
00107 #define R_RX_PAYLOAD  0x61
00108 #define W_TX_PAYLOAD  0xA0
00109 #define W_ACK_PAYLOAD 0xA8
00110 #define FLUSH_TX      0xE1
00111 #define FLUSH_RX      0xE2
00112 #define REUSE_TX_PL   0xE3
00113 #define NOP           0xFF
00114 
00115 /* Non-P omissions */
00116 #define LNA_HCURR   0
00117 
00118 /* P model memory Map */
00119 #define RPD         0x09
00120 
00121 /* P model bit Mnemonics */
00122 #define RF_DR_LOW   5
00123 #define RF_DR_HIGH  3
00124 #define RF_PWR_LOW  1
00125 #define RF_PWR_HIGH 2
 All Classes Files Functions Enumerations