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

hal/nrf24le1/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: 2513 $
00012  */
00013 
00024 #ifndef HAL_NRF_LE1_H__
00025 #define HAL_NRF_LE1_H__
00026 
00027 #include <nrf24le1.h>
00028 
00032 #define CSN_LOW() do {RFCSN = 0U; } while(false)
00033 
00037 #define CSN_HIGH() do {RFCSN = 1U; } while(false)
00038 
00042 #define CE_LOW() do {RFCE = 0U;} while(false)
00043 
00047 #define CE_HIGH() do {RFCE = 1U;} while(false)
00048 
00052 #define HAL_NRF_HW_SPI_WRITE(d) do{SPIRDAT = (d);} while(false)
00053 
00057 #define HAL_NRF_HW_SPI_READ() SPIRDAT
00058 
00062 #define HAL_NRF_HW_SPI_BUSY (!(SPIRSTAT & 0x02U))
00063 
00067 #define CE_PULSE() do { \
00068   uint8_t count; \
00069   count = 20U; \
00070   CE_HIGH();  \
00071     while(count--) {} \
00072   CE_LOW();  \
00073   } while(false)
00074 
00075 #endif // HAL_NRF_LE1_H__
00076 

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