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 00021 #include <stdint.h> 00022 #include "hal_nrf.h" 00023 #include "nrf24lu1p.h" 00024 00025 uint8_t hal_nrf_rw(uint8_t value) 00026 { 00027 RFDAT = value; 00028 RFSPIF = 0; // ! IMPORTANT ! Clear RF SPI ready flag 00029 // after data written to RFDAT.. 00030 while(!RFSPIF) {}; // wait for byte transfer finished 00031 return RFDAT; // return SPI read value 00032 } 00033 00034