Port of the nRF24l01+ library of these dudes. Not GPLed, so yeah, you can use it. Copyright (c) 2007 Stefan Engelke <mbox@stefanengelke.de> Some parts copyright (c) 2012 Eric Brundick <spirilis [at] linux dot com>
nRF24L01.h
00001 /* nRF24L01.h 00002 * Register definitions for manipulating the Nordic Semiconductor 00003 * nRF24L01+ RF transceiver chipsets. 00004 * 00005 00006 Copyright (c) 2007 Stefan Engelke <mbox@stefanengelke.de> 00007 Some parts copyright (c) 2012 Eric Brundick <spirilis [at] linux dot com> 00008 00009 Permission is hereby granted, free of charge, to any person 00010 obtaining a copy of this software and associated documentation 00011 files (the "Software"), to deal in the Software without 00012 restriction, including without limitation the rights to use, copy, 00013 modify, merge, publish, distribute, sublicense, and/or sell copies 00014 of the Software, and to permit persons to whom the Software is 00015 furnished to do so, subject to the following conditions: 00016 00017 The above copyright notice and this permission notice shall be 00018 included in all copies or substantial portions of the Software. 00019 00020 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00021 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00022 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00023 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 00024 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00025 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00026 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00027 DEALINGS IN THE SOFTWARE. 00028 */ 00029 #ifndef _NRF24L01_H 00030 #define _NRF24L01_H 00031 00032 /* Register Map */ 00033 #define RF24_CONFIG 0x00 00034 #define RF24_EN_AA 0x01 00035 #define RF24_EN_RXADDR 0x02 00036 #define RF24_SETUP_AW 0x03 00037 #define RF24_SETUP_RETR 0x04 00038 #define RF24_RF_CH 0x05 00039 #define RF24_RF_SETUP 0x06 00040 #define RF24_STATUS 0x07 00041 #define RF24_OBSERVE_TX 0x08 00042 #define RF24_CD 0x09 00043 #define RF24_RPD 0x09 00044 #define RF24_RX_ADDR_P0 0x0A 00045 #define RF24_RX_ADDR_P1 0x0B 00046 #define RF24_RX_ADDR_P2 0x0C 00047 #define RF24_RX_ADDR_P3 0x0D 00048 #define RF24_RX_ADDR_P4 0x0E 00049 #define RF24_RX_ADDR_P5 0x0F 00050 #define RF24_TX_ADDR 0x10 00051 #define RF24_RX_PW_P0 0x11 00052 #define RF24_RX_PW_P1 0x12 00053 #define RF24_RX_PW_P2 0x13 00054 #define RF24_RX_PW_P3 0x14 00055 #define RF24_RX_PW_P4 0x15 00056 #define RF24_RX_PW_P5 0x16 00057 #define RF24_FIFO_STATUS 0x17 00058 #define RF24_DYNPD 0x1C 00059 #define RF24_FEATURE 0x1D 00060 00061 /* Register Bits */ 00062 #define RF24_MASK_RX_DR BIT6 00063 #define RF24_MASK_TX_DS BIT5 00064 #define RF24_MASK_MAX_RT BIT4 00065 #define RF24_EN_CRC BIT3 00066 #define RF24_CRCO BIT2 00067 #define RF24_PWR_UP BIT1 00068 #define RF24_PRIM_RX BIT0 00069 #define RF24_ENAA_P5 BIT5 00070 #define RF24_ENAA_P4 BIT4 00071 #define RF24_ENAA_P3 BIT3 00072 #define RF24_ENAA_P2 BIT2 00073 #define RF24_ENAA_P1 BIT1 00074 #define RF24_ENAA_P0 BIT0 00075 #define RF24_ERX_P5 BIT5 00076 #define RF24_ERX_P4 BIT4 00077 #define RF24_ERX_P3 BIT3 00078 #define RF24_ERX_P2 BIT2 00079 #define RF24_ERX_P1 BIT1 00080 #define RF24_ERX_P0 BIT0 00081 #define RF24_AW BIT0 00082 #define RF24_ARD BIT4 00083 #define RF24_ARC BIT0 00084 #define RF24_PLL_LOCK BIT4 00085 #define RF24_CONT_WAVE BIT7 00086 #define RF24_RF_DR BIT3 00087 #define RF24_RF_DR_LOW BIT5 00088 #define RF24_RF_DR_HIGH BIT3 00089 #define RF24_RF_PWR BIT1 00090 #define RF24_LNA_HCURR BIT0 00091 #define RF24_RX_DR BIT6 00092 #define RF24_TX_DS BIT5 00093 #define RF24_MAX_RT BIT4 00094 #define RF24_RX_P_NO BIT1 00095 #define RF24_TX_FULL BIT0 00096 #define RF24_PLOS_CNT BIT4 00097 #define RF24_ARC_CNT BIT0 00098 #define RF24_TX_REUSE BIT6 00099 #define RF24_FIFO_FULL BIT5 00100 #define RF24_TX_EMPTY BIT4 00101 #define RF24_RX_FULL BIT1 00102 #define RF24_RX_EMPTY BIT0 00103 #define RF24_EN_DPL BIT2 00104 #define RF24_EN_ACK_PAY BIT1 00105 #define RF24_EN_DYN_ACK BIT0 00106 00107 /* Instructions */ 00108 #define RF24_R_REGISTER 0x00 00109 #define RF24_W_REGISTER 0x20 00110 #define RF24_REGISTER_MASK 0x1F 00111 #define RF24_R_RX_PAYLOAD 0x61 00112 #define RF24_W_TX_PAYLOAD 0xA0 00113 #define RF24_FLUSH_TX 0xE1 00114 #define RF24_FLUSH_RX 0xE2 00115 #define RF24_REUSE_TX_PL 0xE3 00116 #define RF24_R_RX_PL_WID 0x60 00117 #define RF24_W_ACK_PAYLOAD 0xA8 00118 #define RF24_W_TX_PAYLOAD_NOACK 0xB0 00119 #define RF24_NOP 0xFF 00120 00121 #endif
Generated on Fri Jul 15 2022 01:38:37 by 1.7.2