]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/hw/spi/spi_api.h
Modified release_info.txt
[keystone-rtos/ibl.git] / src / hw / spi / spi_api.h
1 #ifndef _SPI_API_H
2 #define _SPI_API_H
3 /*****************************************************************************************************
4  * FILE PURPOSE: Define the boot SPI driver
5  *****************************************************************************************************
6  * DESCRIPTION: The SPI API is defined
7  *
8  *****************************************************************************************************/
9  
10 typedef struct spiConfig_s  {
12   UINT16 port;
13   UINT16 mode;
14   UINT16 addrWidth;
15   UINT16 npin;
16   UINT16 csel;
17   UINT16 clkdiv;
18   UINT16 c2tdelay;
19   
20 } spiConfig_t;
22 SINT16 hwSpiConfig (spiConfig_t *spiCfg);
23 SINT16 hwSpiRead (UINT32 addr, UINT16 sizeBytes, UINT8 *data);
24 void hwSpiEnableXfer (UINT32 port);
25 void hwSpiDisableXfer (UINT32 port);
27 /* Return values */
28 #define SPI_INVALID_ADDR_WIDTH  -1
29 #define SPI_INVALID_NPIN        -2
30 #define SPI_TIMEOUT             -3
31 #define SPI_NOT_ENOUGH_BYTES    -4
37 #endif /* _SPI_API_H */