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 00021 #include <nrf24le1.h> 00022 #include <stdint.h> 00023 #include "hal_nrf.h" 00024 00025 uint8_t hal_nrf_rw(uint8_t value) 00026 { 00027 SPIRDAT = value; 00028 while(!(SPIRSTAT & (uint8_t)0x02U)) // wait for byte transfer finished 00029 { 00030 } 00031 return SPIRDAT; // return SPI read value 00032 }