nrf24l01.h

Go to the documentation of this file.
00001 /*
00002  * File:        nrf24l01.h
00003  * Purpose:     Prototype of nRF24L01 handler functions
00004  * Author:      Peter Ivanov, Olimex Ltd.
00005  * Modified by:
00006  * Created:     2007-10-14 11:29:32
00007  * Last modify: 2007-10-21 11:21:07 ivanovp {Time-stamp}
00008  * Copyright:   (C) Peter Ivanov, 2007
00009  * Licence:     GPL
00010  */
00011 /**
00012  * \file nrf24l01.h
00013  * \brief Prototypes and defines for nRF24L01 handler functions.
00014  * \author Peter Ivanov, Olimex Ltd.
00015  */
00016 
00017 #ifndef __INCLUDE_NRF24L01_H
00018 #define __INCLUDE_NRF24L01_H
00019 #include "common.h"
00020 
00021 void NRF_init (void);
00022 void NRF_send (uint8_t byte);
00023 void NRF_prepareForReceive ();
00024 bool_t NRF_receive (uint8_t *const byte);
00025 
00026 //CONSTANTS
00027 #define NRF_NOP         0xff
00028 #define R_REGISTER      0x00
00029 #define W_REGISTER      0x01
00030 #define R_RX_PAYLOAD    0x61
00031 #define W_TX_PAYLOAD    0xA0
00032 #define FLUSH_TX        0xE1
00033 #define FLUSH_RX        0xE2
00034 #define REUSE_TX_PL     0xE3
00035 
00036 #define RX_ADDR_P0      0x0A
00037 #define RX_ADDR_P1      0x0B
00038 #define TX_ADDR         0x10
00039 #define RX_PW_P0        0x11
00040 #define RX_PW_P1        0x12
00041 #define FIFO_STATUS     0x17
00042 
00043 #define MAX_RT          0x10
00044 
00045 #define CONFIG_REG_ADDR 0x00
00046 #define STATUS_ADDR     0x07
00047 
00048 #define FLUSH_TX        0xE1
00049 #define TX_FULL         0x01
00050 #define RX_DR           0x40
00051 #define TX_DS           0x20
00052 
00053 #define IRQ()           (!(P1IN & BIT7)) // negative logic
00054 
00055 #define RX_TX_TIME      100000
00056 #define BUT_TIME        10000
00057 
00058 #endif // __INCLUDE_NRF24L01_H

Generated on Thu Dec 27 14:21:51 2007 for Sample MSP430-449STK2 project by  doxygen 1.5.1