• Main Page
  • Modules
  • Index
  • File List
  • Globals

hal/nrf24lu1p/hal_nrf_hw.h

Go to the documentation of this file.
00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
00002  *
00003  * The information contained herein is confidential property of Nordic 
00004  * Semiconductor ASA.Terms and conditions of usage are described in detail 
00005  * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 
00006  *
00007  * Licensees are granted free, non-transferable use of the information. NO
00008  * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
00009  * the file.
00010  *              
00011  * $LastChangedRevision: 133 $
00012  */
00013 
00023 #ifndef HAL_NRF_LU1_H__
00024 #define HAL_NRF_LU1_H__
00025 #include "nrf24lu1p.h"
00026 
00030 #define CSN_LOW() do { RFCSN = 0; } while(false)
00031 
00035 #define CSN_HIGH() do { RFCSN = 1; } while(false)
00036 
00040 #define CE_LOW() do { RFCE = 0; } while(false)
00041 
00045 #define CE_HIGH() do { RFCE = 1; } while(false)
00046 
00050 #define HAL_NRF_HW_SPI_WRITE(d) do{RFDAT = d; RFSPIF = 0;} while(false)
00051 
00055 #define HAL_NRF_HW_SPI_READ() RFDAT
00056   
00060 #define HAL_NRF_HW_SPI_BUSY (!RFSPIF)
00061 
00065 #define CE_PULSE() do { \
00066   uint8_t count; \
00067   count = 20; \
00068   CE_HIGH();  \
00069   while(count--){} \
00070   CE_LOW();  \
00071   } while(false)
00072 
00073 #endif // HAL_NRF_LU1_H__
00074 

Generated on Fri Apr 20 2012 14:11:45 for nRFGo SDK by  doxygen 1.7.2