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

hal/nrf24lu1p/hal_spi.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 
00036 #ifndef HAL_SPI_H__
00037 #define HAL_SPI_H__
00038 
00039 #include <stdint.h>
00040 #include <stdbool.h>
00041 
00045 typedef enum
00046 {
00047     SPI_CLK_DIV2,        
00048     SPI_CLK_DIV4,        
00049     SPI_CLK_DIV8,        
00050     SPI_CLK_DIV16,       
00051     SPI_CLK_DIV32,       
00052     SPI_CLK_DIV64,       
00053     SPI_CLK_DIV128       
00054 } hal_spi_clkdivider_t;  
00055 
00059 typedef enum {
00060    HAL_SPI_LSB_MSB,      
00061    HAL_SPI_MSB_LSB       
00062 } hal_spi_byte_order_t;
00063     
00067 typedef enum {           
00068    HAL_SPI_MODE_0,       
00069    HAL_SPI_MODE_1,       
00070    HAL_SPI_MODE_2,       
00071    HAL_SPI_MODE_3        
00072 } hal_spi_mode_t;
00073 
00074 
00077 void hal_spi_master_init(hal_spi_clkdivider_t ck, hal_spi_mode_t mode, hal_spi_byte_order_t bo);
00078 
00086 uint8_t hal_spi_master_read_write(uint8_t pLoad);
00087 
00088 
00089 #endif // HAL_SPI_H__
00090 

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