Elisa3
nRF24L01.h
Go to the documentation of this file.
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     $Id$
00025 */
00026 
00027 /* Memory Map */
00028 #define CONFIG      0x00
00029 #define EN_AA       0x01
00030 #define EN_RXADDR   0x02
00031 #define SETUP_AW    0x03
00032 #define SETUP_RETR  0x04
00033 #define RF_CH       0x05
00034 #define RF_SETUP    0x06
00035 #define STATUS      0x07
00036 #define OBSERVE_TX  0x08
00037 #define CD          0x09
00038 #define RX_ADDR_P0  0x0A
00039 #define RX_ADDR_P1  0x0B
00040 #define RX_ADDR_P2  0x0C
00041 #define RX_ADDR_P3  0x0D
00042 #define RX_ADDR_P4  0x0E
00043 #define RX_ADDR_P5  0x0F
00044 #define TX_ADDR     0x10
00045 #define RX_PW_P0    0x11
00046 #define RX_PW_P1    0x12
00047 #define RX_PW_P2    0x13
00048 #define RX_PW_P3    0x14
00049 #define RX_PW_P4    0x15
00050 #define RX_PW_P5    0x16
00051 #define FIFO_STATUS 0x17
00052 #define NRF_FEATURE     0x1D
00053 #define NRF_DYNPD       0x1C
00054 
00055 /* Bit Mnemonics */
00056 #define MASK_RX_DR  6
00057 #define MASK_TX_DS  5
00058 #define MASK_MAX_RT 4
00059 #define EN_CRC      3
00060 #define CRCO        2
00061 #define PWR_UP      1
00062 #define PRIM_RX     0
00063 #define ENAA_P5     5
00064 #define ENAA_P4     4
00065 #define ENAA_P3     3
00066 #define ENAA_P2     2
00067 #define ENAA_P1     1
00068 #define ENAA_P0     0
00069 #define ERX_P5      5
00070 #define ERX_P4      4
00071 #define ERX_P3      3
00072 #define ERX_P2      2
00073 #define ERX_P1      1
00074 #define ERX_P0      0
00075 #define AW          0
00076 #define ARD         4
00077 #define ARC         0
00078 #define PLL_LOCK    4
00079 #define RF_DR       3
00080 #define RF_PWR      1
00081 #define LNA_HCURR   0        
00082 #define RX_DR       6
00083 #define TX_DS       5
00084 #define MAX_RT      4
00085 #define RX_P_NO     1
00086 #define TX_FULL     0
00087 #define PLOS_CNT    4
00088 #define ARC_CNT     0
00089 #define TX_REUSE    6
00090 #define FIFO_FULL   5
00091 #define TX_EMPTY    4
00092 #define RX_FULL     1
00093 #define RX_EMPTY    0
00094 
00095 /* Instruction Mnemonics */
00096 #define R_REGISTER    0x00
00097 #define W_REGISTER    0x20
00098 #define REGISTER_MASK 0x1F
00099 #define R_RX_PAYLOAD  0x61
00100 #define W_TX_PAYLOAD  0xA0
00101 #define FLUSH_TX      0xE1
00102 #define FLUSH_RX      0xE2
00103 #define REUSE_TX_PL   0xE3
00104 #define NOP           0xFF
00105 #define NRF_ACTIVATE                    0x50
00106 #define NRF_W_TX_PLOAD_NOACK    0xB0    
00107 #define NRF_W_ACK_PAYLOAD_P0    0xA8    
00108 #define NRF_R_RX_PL_WID                 0x60
 All Files Functions Variables Defines