Bibliothèque pour les Émetteurs/Récepteur nRF24L01P pour les TélécoBots - IUT Nice 2019

Committer:
Boborski
Date:
Mon Jun 17 13:22:54 2019 +0000
Revision:
2:b4d810cfff38
Parent:
1:ea1f7c54f341
nRF24L01P

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Owen 0:8ae48233b4e4 1 /**
Owen 0:8ae48233b4e4 2 * @file nRF24L01P.h
Owen 0:8ae48233b4e4 3 *
Owen 0:8ae48233b4e4 4 * @author Owen Edwards
Owen 0:8ae48233b4e4 5 *
Owen 0:8ae48233b4e4 6 * @section LICENSE
Owen 0:8ae48233b4e4 7 *
Owen 0:8ae48233b4e4 8 * Copyright (c) 2010 Owen Edwards
Owen 0:8ae48233b4e4 9 *
Owen 0:8ae48233b4e4 10 * This program is free software: you can redistribute it and/or modify
Owen 0:8ae48233b4e4 11 * it under the terms of the GNU General Public License as published by
Owen 0:8ae48233b4e4 12 * the Free Software Foundation, either version 3 of the License, or
Owen 0:8ae48233b4e4 13 * (at your option) any later version.
Owen 0:8ae48233b4e4 14 *
Owen 0:8ae48233b4e4 15 * This program is distributed in the hope that it will be useful,
Owen 0:8ae48233b4e4 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Owen 0:8ae48233b4e4 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Owen 0:8ae48233b4e4 18 * GNU General Public License for more details.
Owen 0:8ae48233b4e4 19 *
Owen 0:8ae48233b4e4 20 * You should have received a copy of the GNU General Public License
Owen 0:8ae48233b4e4 21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
Owen 0:8ae48233b4e4 22 *
Owen 0:8ae48233b4e4 23 * The above copyright notice and this permission notice shall be included in
Owen 0:8ae48233b4e4 24 * all copies or substantial portions of the Software.
Owen 0:8ae48233b4e4 25 *
Owen 0:8ae48233b4e4 26 * @section DESCRIPTION
Owen 0:8ae48233b4e4 27 *
Owen 0:8ae48233b4e4 28 * nRF24L01+ Single Chip 2.4GHz Transceiver from Nordic Semiconductor.
Owen 0:8ae48233b4e4 29 *
Owen 0:8ae48233b4e4 30 * Datasheet:
Owen 0:8ae48233b4e4 31 *
Owen 0:8ae48233b4e4 32 * http://www.nordicsemi.no/files/Product/data_sheet/nRF24L01P_Product_Specification_1_0.pdf
Owen 0:8ae48233b4e4 33 */
Owen 0:8ae48233b4e4 34
Owen 0:8ae48233b4e4 35 #ifndef __NRF24L01P_H__
Owen 0:8ae48233b4e4 36 #define __NRF24L01P_H__
Owen 0:8ae48233b4e4 37
Owen 0:8ae48233b4e4 38 /**
Owen 0:8ae48233b4e4 39 * Includes
Owen 0:8ae48233b4e4 40 */
Owen 0:8ae48233b4e4 41 #include "mbed.h"
Owen 0:8ae48233b4e4 42
Owen 0:8ae48233b4e4 43 /**
Owen 0:8ae48233b4e4 44 * Defines
Owen 0:8ae48233b4e4 45 */
Owen 0:8ae48233b4e4 46 #define NRF24L01P_TX_PWR_ZERO_DB 0
Owen 0:8ae48233b4e4 47 #define NRF24L01P_TX_PWR_MINUS_6_DB -6
Owen 0:8ae48233b4e4 48 #define NRF24L01P_TX_PWR_MINUS_12_DB -12
Owen 0:8ae48233b4e4 49 #define NRF24L01P_TX_PWR_MINUS_18_DB -18
Owen 0:8ae48233b4e4 50
Owen 0:8ae48233b4e4 51 #define NRF24L01P_DATARATE_250_KBPS 250
Owen 0:8ae48233b4e4 52 #define NRF24L01P_DATARATE_1_MBPS 1000
Owen 0:8ae48233b4e4 53 #define NRF24L01P_DATARATE_2_MBPS 2000
Owen 0:8ae48233b4e4 54
Owen 0:8ae48233b4e4 55 #define NRF24L01P_CRC_NONE 0
Owen 0:8ae48233b4e4 56 #define NRF24L01P_CRC_8_BIT 8
Owen 0:8ae48233b4e4 57 #define NRF24L01P_CRC_16_BIT 16
Owen 0:8ae48233b4e4 58
Owen 0:8ae48233b4e4 59 #define NRF24L01P_MIN_RF_FREQUENCY 2400
Owen 0:8ae48233b4e4 60 #define NRF24L01P_MAX_RF_FREQUENCY 2525
Owen 0:8ae48233b4e4 61
Owen 0:8ae48233b4e4 62 #define NRF24L01P_PIPE_P0 0
Owen 0:8ae48233b4e4 63 #define NRF24L01P_PIPE_P1 1
Owen 0:8ae48233b4e4 64 #define NRF24L01P_PIPE_P2 2
Owen 0:8ae48233b4e4 65 #define NRF24L01P_PIPE_P3 3
Owen 0:8ae48233b4e4 66 #define NRF24L01P_PIPE_P4 4
Owen 0:8ae48233b4e4 67 #define NRF24L01P_PIPE_P5 5
Owen 0:8ae48233b4e4 68
Owen 0:8ae48233b4e4 69 /**
Owen 0:8ae48233b4e4 70 * Default setup for the nRF24L01+, based on the Sparkfun "Nordic Serial Interface Board"
Owen 0:8ae48233b4e4 71 * for evaluation (http://www.sparkfun.com/products/9019)
Owen 0:8ae48233b4e4 72 */
Boborski 2:b4d810cfff38 73
Boborski 2:b4d810cfff38 74 //Adresse à changer:
Boborski 1:ea1f7c54f341 75 #define DEFAULT_NRF24L01P_ADDRESS ((unsigned long long) 0xA5A5A5A5A5 )
Owen 0:8ae48233b4e4 76 #define DEFAULT_NRF24L01P_ADDRESS_WIDTH 5
Owen 0:8ae48233b4e4 77 #define DEFAULT_NRF24L01P_CRC NRF24L01P_CRC_8_BIT
Owen 0:8ae48233b4e4 78 #define DEFAULT_NRF24L01P_RF_FREQUENCY (NRF24L01P_MIN_RF_FREQUENCY + 2)
Owen 0:8ae48233b4e4 79 #define DEFAULT_NRF24L01P_DATARATE NRF24L01P_DATARATE_1_MBPS
Owen 0:8ae48233b4e4 80 #define DEFAULT_NRF24L01P_TX_PWR NRF24L01P_TX_PWR_ZERO_DB
Owen 0:8ae48233b4e4 81 #define DEFAULT_NRF24L01P_TRANSFER_SIZE 4
Owen 0:8ae48233b4e4 82
Owen 0:8ae48233b4e4 83 /**
Owen 0:8ae48233b4e4 84 * nRF24L01+ Single Chip 2.4GHz Transceiver from Nordic Semiconductor.
Owen 0:8ae48233b4e4 85 */
Owen 0:8ae48233b4e4 86 class nRF24L01P {
Owen 0:8ae48233b4e4 87
Owen 0:8ae48233b4e4 88 public:
Owen 0:8ae48233b4e4 89
Owen 0:8ae48233b4e4 90 /**
Owen 0:8ae48233b4e4 91 * Constructor.
Owen 0:8ae48233b4e4 92 *
Owen 0:8ae48233b4e4 93 * @param mosi mbed pin to use for MOSI line of SPI interface.
Owen 0:8ae48233b4e4 94 * @param miso mbed pin to use for MISO line of SPI interface.
Owen 0:8ae48233b4e4 95 * @param sck mbed pin to use for SCK line of SPI interface.
Owen 0:8ae48233b4e4 96 * @param csn mbed pin to use for not chip select line of SPI interface.
Owen 0:8ae48233b4e4 97 * @param ce mbed pin to use for the chip enable line.
Owen 0:8ae48233b4e4 98 * @param irq mbed pin to use for the interrupt request line.
Owen 0:8ae48233b4e4 99 */
Owen 0:8ae48233b4e4 100 nRF24L01P(PinName mosi, PinName miso, PinName sck, PinName csn, PinName ce, PinName irq = NC);
Owen 0:8ae48233b4e4 101
Owen 0:8ae48233b4e4 102 /**
Owen 0:8ae48233b4e4 103 * Set the RF frequency.
Owen 0:8ae48233b4e4 104 *
Owen 0:8ae48233b4e4 105 * @param frequency the frequency of RF transmission in MHz (2400..2525).
Owen 0:8ae48233b4e4 106 */
Owen 0:8ae48233b4e4 107 void setRfFrequency(int frequency = DEFAULT_NRF24L01P_RF_FREQUENCY);
Owen 0:8ae48233b4e4 108
Owen 0:8ae48233b4e4 109 /**
Owen 0:8ae48233b4e4 110 * Get the RF frequency.
Owen 0:8ae48233b4e4 111 *
Owen 0:8ae48233b4e4 112 * @return the frequency of RF transmission in MHz (2400..2525).
Owen 0:8ae48233b4e4 113 */
Owen 0:8ae48233b4e4 114 int getRfFrequency(void);
Owen 0:8ae48233b4e4 115
Owen 0:8ae48233b4e4 116 /**
Owen 0:8ae48233b4e4 117 * Set the RF output power.
Owen 0:8ae48233b4e4 118 *
Owen 0:8ae48233b4e4 119 * @param power the RF output power in dBm (0, -6, -12 or -18).
Owen 0:8ae48233b4e4 120 */
Owen 0:8ae48233b4e4 121 void setRfOutputPower(int power = DEFAULT_NRF24L01P_TX_PWR);
Owen 0:8ae48233b4e4 122
Owen 0:8ae48233b4e4 123 /**
Owen 0:8ae48233b4e4 124 * Get the RF output power.
Owen 0:8ae48233b4e4 125 *
Owen 0:8ae48233b4e4 126 * @return the RF output power in dBm (0, -6, -12 or -18).
Owen 0:8ae48233b4e4 127 */
Owen 0:8ae48233b4e4 128 int getRfOutputPower(void);
Owen 0:8ae48233b4e4 129
Owen 0:8ae48233b4e4 130 /**
Owen 0:8ae48233b4e4 131 * Set the Air data rate.
Owen 0:8ae48233b4e4 132 *
Owen 0:8ae48233b4e4 133 * @param rate the air data rate in kbps (250, 1M or 2M).
Owen 0:8ae48233b4e4 134 */
Owen 0:8ae48233b4e4 135 void setAirDataRate(int rate = DEFAULT_NRF24L01P_DATARATE);
Owen 0:8ae48233b4e4 136
Owen 0:8ae48233b4e4 137 /**
Owen 0:8ae48233b4e4 138 * Get the Air data rate.
Owen 0:8ae48233b4e4 139 *
Owen 0:8ae48233b4e4 140 * @return the air data rate in kbps (250, 1M or 2M).
Owen 0:8ae48233b4e4 141 */
Owen 0:8ae48233b4e4 142 int getAirDataRate(void);
Owen 0:8ae48233b4e4 143
Owen 0:8ae48233b4e4 144 /**
Owen 0:8ae48233b4e4 145 * Set the CRC width.
Owen 0:8ae48233b4e4 146 *
Owen 0:8ae48233b4e4 147 * @param width the number of bits for the CRC (0, 8 or 16).
Owen 0:8ae48233b4e4 148 */
Owen 0:8ae48233b4e4 149 void setCrcWidth(int width = DEFAULT_NRF24L01P_CRC);
Owen 0:8ae48233b4e4 150
Owen 0:8ae48233b4e4 151 /**
Owen 0:8ae48233b4e4 152 * Get the CRC width.
Owen 0:8ae48233b4e4 153 *
Owen 0:8ae48233b4e4 154 * @return the number of bits for the CRC (0, 8 or 16).
Owen 0:8ae48233b4e4 155 */
Owen 0:8ae48233b4e4 156 int getCrcWidth(void);
Owen 0:8ae48233b4e4 157
Owen 0:8ae48233b4e4 158 /**
Owen 0:8ae48233b4e4 159 * Set the Receive address.
Owen 0:8ae48233b4e4 160 *
Owen 0:8ae48233b4e4 161 * @param address address associated with the particular pipe
Owen 0:8ae48233b4e4 162 * @param width width of the address in bytes (3..5)
Owen 0:8ae48233b4e4 163 * @param pipe pipe to associate the address with (0..5, default 0)
Owen 0:8ae48233b4e4 164 *
Owen 0:8ae48233b4e4 165 * Note that Pipes 0 & 1 have 3, 4 or 5 byte addresses,
Owen 0:8ae48233b4e4 166 * while Pipes 2..5 only use the lowest byte (bits 7..0) of the
Owen 0:8ae48233b4e4 167 * address provided here, and use 2, 3 or 4 bytes from Pipe 1's address.
Owen 0:8ae48233b4e4 168 * The width parameter is ignored for Pipes 2..5.
Owen 0:8ae48233b4e4 169 */
Owen 0:8ae48233b4e4 170 void setRxAddress(unsigned long long address = DEFAULT_NRF24L01P_ADDRESS, int width = DEFAULT_NRF24L01P_ADDRESS_WIDTH, int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 171
Owen 0:8ae48233b4e4 172 void setRxAddress(unsigned long msb_address, unsigned long lsb_address, int width, int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 173
Owen 0:8ae48233b4e4 174 /**
Owen 0:8ae48233b4e4 175 * Set the Transmit address.
Owen 0:8ae48233b4e4 176 *
Owen 0:8ae48233b4e4 177 * @param address address for transmission
Owen 0:8ae48233b4e4 178 * @param width width of the address in bytes (3..5)
Owen 0:8ae48233b4e4 179 *
Owen 0:8ae48233b4e4 180 * Note that the address width is shared with the Receive pipes,
Owen 0:8ae48233b4e4 181 * so a change to that address width affect transmissions.
Owen 0:8ae48233b4e4 182 */
Owen 0:8ae48233b4e4 183 void setTxAddress(unsigned long long address = DEFAULT_NRF24L01P_ADDRESS, int width = DEFAULT_NRF24L01P_ADDRESS_WIDTH);
Owen 0:8ae48233b4e4 184
Owen 0:8ae48233b4e4 185 void setTxAddress(unsigned long msb_address, unsigned long lsb_address, int width);
Owen 0:8ae48233b4e4 186
Owen 0:8ae48233b4e4 187 /**
Owen 0:8ae48233b4e4 188 * Get the Receive address.
Owen 0:8ae48233b4e4 189 *
Owen 0:8ae48233b4e4 190 * @param pipe pipe to get the address from (0..5, default 0)
Owen 0:8ae48233b4e4 191 * @return the address associated with the particular pipe
Owen 0:8ae48233b4e4 192 */
Owen 0:8ae48233b4e4 193 unsigned long long getRxAddress(int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 194
Owen 0:8ae48233b4e4 195 /**
Owen 0:8ae48233b4e4 196 * Get the Transmit address.
Owen 0:8ae48233b4e4 197 *
Owen 0:8ae48233b4e4 198 * @return address address for transmission
Owen 0:8ae48233b4e4 199 */
Owen 0:8ae48233b4e4 200 unsigned long long getTxAddress(void);
Owen 0:8ae48233b4e4 201
Owen 0:8ae48233b4e4 202 /**
Owen 0:8ae48233b4e4 203 * Set the transfer size.
Owen 0:8ae48233b4e4 204 *
Owen 0:8ae48233b4e4 205 * @param size the size of the transfer, in bytes (1..32)
Owen 0:8ae48233b4e4 206 * @param pipe pipe for the transfer (0..5, default 0)
Owen 0:8ae48233b4e4 207 */
Owen 0:8ae48233b4e4 208 void setTransferSize(int size = DEFAULT_NRF24L01P_TRANSFER_SIZE, int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 209
Owen 0:8ae48233b4e4 210 /**
Owen 0:8ae48233b4e4 211 * Get the transfer size.
Owen 0:8ae48233b4e4 212 *
Owen 0:8ae48233b4e4 213 * @return the size of the transfer, in bytes (1..32).
Owen 0:8ae48233b4e4 214 */
Owen 0:8ae48233b4e4 215 int getTransferSize(int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 216
Owen 0:8ae48233b4e4 217
Owen 0:8ae48233b4e4 218 /**
Owen 0:8ae48233b4e4 219 * Get the RPD (Received Power Detector) state.
Owen 0:8ae48233b4e4 220 *
Owen 0:8ae48233b4e4 221 * @return true if the received power exceeded -64dBm
Owen 0:8ae48233b4e4 222 */
Owen 0:8ae48233b4e4 223 bool getRPD(void);
Owen 0:8ae48233b4e4 224
Owen 0:8ae48233b4e4 225 /**
Owen 0:8ae48233b4e4 226 * Put the nRF24L01+ into Receive mode
Owen 0:8ae48233b4e4 227 */
Owen 0:8ae48233b4e4 228 void setReceiveMode(void);
Owen 0:8ae48233b4e4 229
Owen 0:8ae48233b4e4 230 /**
Owen 0:8ae48233b4e4 231 * Put the nRF24L01+ into Transmit mode
Owen 0:8ae48233b4e4 232 */
Owen 0:8ae48233b4e4 233 void setTransmitMode(void);
Owen 0:8ae48233b4e4 234
Owen 0:8ae48233b4e4 235 /**
Owen 0:8ae48233b4e4 236 * Power up the nRF24L01+ into Standby mode
Owen 0:8ae48233b4e4 237 */
Owen 0:8ae48233b4e4 238 void powerUp(void);
Owen 0:8ae48233b4e4 239
Owen 0:8ae48233b4e4 240 /**
Owen 0:8ae48233b4e4 241 * Power down the nRF24L01+ into Power Down mode
Owen 0:8ae48233b4e4 242 */
Owen 0:8ae48233b4e4 243 void powerDown(void);
Owen 0:8ae48233b4e4 244
Owen 0:8ae48233b4e4 245 /**
Owen 0:8ae48233b4e4 246 * Enable the nRF24L01+ to Receive or Transmit (using the CE pin)
Owen 0:8ae48233b4e4 247 */
Owen 0:8ae48233b4e4 248 void enable(void);
Owen 0:8ae48233b4e4 249
Owen 0:8ae48233b4e4 250 /**
Owen 0:8ae48233b4e4 251 * Disable the nRF24L01+ to Receive or Transmit (using the CE pin)
Owen 0:8ae48233b4e4 252 */
Owen 0:8ae48233b4e4 253 void disable(void);
Owen 0:8ae48233b4e4 254
Owen 0:8ae48233b4e4 255 /**
Owen 0:8ae48233b4e4 256 * Transmit data
Owen 0:8ae48233b4e4 257 *
Owen 0:8ae48233b4e4 258 * @param pipe is ignored (included for consistency with file write routine)
Owen 0:8ae48233b4e4 259 * @param data pointer to an array of bytes to write
Owen 0:8ae48233b4e4 260 * @param count the number of bytes to send (1..32)
Owen 0:8ae48233b4e4 261 * @return the number of bytes actually written, or -1 for an error
Owen 0:8ae48233b4e4 262 */
Owen 0:8ae48233b4e4 263 int write(int pipe, char *data, int count);
Owen 0:8ae48233b4e4 264
Owen 0:8ae48233b4e4 265 /**
Owen 0:8ae48233b4e4 266 * Receive data
Owen 0:8ae48233b4e4 267 *
Owen 0:8ae48233b4e4 268 * @param pipe the receive pipe to get data from
Owen 0:8ae48233b4e4 269 * @param data pointer to an array of bytes to store the received data
Owen 0:8ae48233b4e4 270 * @param count the number of bytes to receive (1..32)
Owen 0:8ae48233b4e4 271 * @return the number of bytes actually received, 0 if none are received, or -1 for an error
Owen 0:8ae48233b4e4 272 */
Owen 0:8ae48233b4e4 273 int read(int pipe, char *data, int count);
Owen 0:8ae48233b4e4 274
Owen 0:8ae48233b4e4 275 /**
Owen 0:8ae48233b4e4 276 * Determine if there is data available to read
Owen 0:8ae48233b4e4 277 *
Owen 0:8ae48233b4e4 278 * @param pipe the receive pipe to check for data
Owen 0:8ae48233b4e4 279 * @return true if the is data waiting in the given pipe
Owen 0:8ae48233b4e4 280 */
Owen 0:8ae48233b4e4 281 bool readable(int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 282
Owen 0:8ae48233b4e4 283 /**
Owen 0:8ae48233b4e4 284 * Disable all receive pipes
Owen 0:8ae48233b4e4 285 *
Owen 0:8ae48233b4e4 286 * Note: receive pipes are enabled when their address is set.
Owen 0:8ae48233b4e4 287 */
Owen 0:8ae48233b4e4 288 void disableAllRxPipes(void);
Owen 0:8ae48233b4e4 289
Owen 0:8ae48233b4e4 290 /**
Owen 0:8ae48233b4e4 291 * Disable AutoAcknowledge function
Owen 0:8ae48233b4e4 292 */
Owen 0:8ae48233b4e4 293 void disableAutoAcknowledge(void);
Owen 0:8ae48233b4e4 294
Owen 0:8ae48233b4e4 295 /**
Owen 0:8ae48233b4e4 296 * Enable AutoAcknowledge function
Owen 0:8ae48233b4e4 297 *
Owen 0:8ae48233b4e4 298 * @param pipe the receive pipe
Owen 0:8ae48233b4e4 299 */
Owen 0:8ae48233b4e4 300 void enableAutoAcknowledge(int pipe = NRF24L01P_PIPE_P0);
Owen 0:8ae48233b4e4 301
Owen 0:8ae48233b4e4 302 /**
Owen 0:8ae48233b4e4 303 * Disable AutoRetransmit function
Owen 0:8ae48233b4e4 304 */
Owen 0:8ae48233b4e4 305 void disableAutoRetransmit(void);
Owen 0:8ae48233b4e4 306
Owen 0:8ae48233b4e4 307 /**
Owen 0:8ae48233b4e4 308 * Enable AutoRetransmit function
Owen 0:8ae48233b4e4 309 *
Owen 0:8ae48233b4e4 310 * @param delay the delay between restransmits, in uS (250uS..4000uS)
Owen 0:8ae48233b4e4 311 * @param count number of retransmits before generating an error (1..15)
Owen 0:8ae48233b4e4 312 */
Owen 0:8ae48233b4e4 313 void enableAutoRetransmit(int delay, int count);
Owen 0:8ae48233b4e4 314
Owen 0:8ae48233b4e4 315 private:
Owen 0:8ae48233b4e4 316
Owen 0:8ae48233b4e4 317 /**
Owen 0:8ae48233b4e4 318 * Get the contents of an addressable register.
Owen 0:8ae48233b4e4 319 *
Owen 0:8ae48233b4e4 320 * @param regAddress address of the register
Owen 0:8ae48233b4e4 321 * @return the contents of the register
Owen 0:8ae48233b4e4 322 */
Owen 0:8ae48233b4e4 323 int getRegister(int regAddress);
Owen 0:8ae48233b4e4 324
Owen 0:8ae48233b4e4 325 /**
Owen 0:8ae48233b4e4 326 * Set the contents of an addressable register.
Owen 0:8ae48233b4e4 327 *
Owen 0:8ae48233b4e4 328 * @param regAddress address of the register
Owen 0:8ae48233b4e4 329 * @param regData data to write to the register
Owen 0:8ae48233b4e4 330 */
Owen 0:8ae48233b4e4 331 void setRegister(int regAddress, int regData);
Owen 0:8ae48233b4e4 332
Owen 0:8ae48233b4e4 333 /**
Owen 0:8ae48233b4e4 334 * Get the contents of the status register.
Owen 0:8ae48233b4e4 335 *
Owen 0:8ae48233b4e4 336 * @return the contents of the status register
Owen 0:8ae48233b4e4 337 */
Owen 0:8ae48233b4e4 338 int getStatusRegister(void);
Owen 0:8ae48233b4e4 339
Owen 0:8ae48233b4e4 340 SPI spi_;
Owen 0:8ae48233b4e4 341 DigitalOut nCS_;
Owen 0:8ae48233b4e4 342 DigitalOut ce_;
Owen 0:8ae48233b4e4 343 InterruptIn nIRQ_;
Owen 0:8ae48233b4e4 344
Owen 0:8ae48233b4e4 345 int mode;
Owen 0:8ae48233b4e4 346
Owen 0:8ae48233b4e4 347 };
Owen 0:8ae48233b4e4 348
Owen 0:8ae48233b4e4 349 #endif /* __NRF24L01P_H__ */