57 #define SPI_MODE_MASTER 0x00000000 58 #define SPI_MODE_SLAVE 0x00000004 63 #define SPI_SUB_MODE_0 0x00000000 64 #define SPI_SUB_MODE_1 0x00000001 65 #define SPI_SUB_MODE_2 0x00000002 66 #define SPI_SUB_MODE_3 0x00000003 72 #define SPI_SW_CTRL_CS 0x01000000 73 #define SPI_HW_CTRL_CS 0x00000000 74 #define SPI_3PIN_MODE 0x02000000 75 #define SPI_4PIN_MODE 0x00000000 76 #define SPI_TURBO_ON 0x00080000 77 #define SPI_TURBO_OFF 0x00000000 78 #define SPI_CS_ACTIVEHIGH 0x00000000 79 #define SPI_CS_ACTIVELOW 0x00000040 80 #define SPI_WL_8 0x00000380 81 #define SPI_WL_16 0x00000780 82 #define SPI_WL_32 0x00000F80 87 #define SPI_TX_FIFO 0x08000000 88 #define SPI_RX_FIFO 0x10000000 93 #define SPI_RX_DMA 0x00008000 94 #define SPI_TX_DMA 0x00004000 100 #define SPI_INT_DMATX 0x20000000 101 #define SPI_INT_DMARX 0x10000000 102 #define SPI_INT_EOW 0x00020000 103 #define SPI_INT_WKS 0x00010000 104 #define SPI_INT_RX_OVRFLOW 0x00000008 105 #define SPI_INT_RX_FULL 0x00000004 106 #define SPI_INT_TX_UDRFLOW 0x00000002 107 #define SPI_INT_TX_EMPTY 0x00000001 112 #define SPI_CS_ENABLE 0x00000001 113 #define SPI_CS_DISABLE 0x00000002 120 extern void SPIEnable(
unsigned long ulBase);
122 extern void SPIReset(
unsigned long ulBase);
124 unsigned long ulBitRate,
unsigned long ulMode,
125 unsigned long ulSubMode,
unsigned long ulConfig);
127 unsigned long * pulData);
128 extern void SPIDataGet(
unsigned long ulBase,
unsigned long *pulData);
130 unsigned long ulData);
131 extern void SPIDataPut(
unsigned long ulBase,
unsigned long ulData);
132 extern void SPIFIFOEnable(
unsigned long ulBase,
unsigned long ulFlags);
133 extern void SPIFIFODisable(
unsigned long ulBase,
unsigned long ulFlags);
134 extern void SPIFIFOLevelSet(
unsigned long ulBase,
unsigned long ulTxLevel,
135 unsigned long ulRxLevel);
136 extern void SPIFIFOLevelGet(
unsigned long ulBase,
unsigned long *pulTxLevel,
137 unsigned long *pulRxLevel);
138 extern void SPIWordCountSet(
unsigned long ulBase,
unsigned long ulWordCount);
139 extern void SPIIntRegister(
unsigned long ulBase,
void(*pfnHandler)(
void));
141 extern void SPIIntEnable(
unsigned long ulBase,
unsigned long ulIntFlags);
142 extern void SPIIntDisable(
unsigned long ulBase,
unsigned long ulIntFlags);
143 extern unsigned long SPIIntStatus(
unsigned long ulBase, tBoolean bMasked);
144 extern void SPIIntClear(
unsigned long ulBase,
unsigned long ulIntFlags);
145 extern void SPIDmaEnable(
unsigned long ulBase,
unsigned long ulFlags);
146 extern void SPIDmaDisable(
unsigned long ulBase,
unsigned long ulFlags);
149 extern long SPITransfer(
unsigned long ulBase,
unsigned char *ucDout,
150 unsigned char *ucDin,
unsigned long ulSize,
151 unsigned long ulFlags);
void SPIIntRegister(unsigned long ulBase, void(*pfnHandler)(void))
Definition: spi.c:1122
void SPICSDisable(unsigned long ulBase)
Definition: spi.c:1432
void SPIFIFODisable(unsigned long ulBase, unsigned long ulFlags)
Definition: spi.c:997
void SPIDataPut(unsigned long ulBase, unsigned long ulData)
Definition: spi.c:938
void SPIFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, unsigned long ulRxLevel)
Definition: spi.c:1019
void SPIDisable(unsigned long ulBase)
Definition: spi.c:583
unsigned long SPIIntStatus(unsigned long ulBase, tBoolean bMasked)
Definition: spi.c:1297
void SPIEnable(unsigned long ulBase)
Definition: spi.c:562
void SPIWordCountSet(unsigned long ulBase, unsigned long ulWordCount)
Definition: spi.c:1086
long SPIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData)
Definition: spi.c:836
void SPICSEnable(unsigned long ulBase)
Definition: spi.c:1411
long SPIDataPutNonBlocking(unsigned long ulBase, unsigned long ulData)
Definition: spi.c:902
void SPIConfigSetExpClk(unsigned long ulBase, unsigned long ulSPIClk, unsigned long ulBitRate, unsigned long ulMode, unsigned long ulSubMode, unsigned long ulConfig)
Definition: spi.c:742
void SPIDmaEnable(unsigned long ulBase, unsigned long ulFlags)
Definition: spi.c:611
void SPIIntUnregister(unsigned long ulBase)
Definition: spi.c:1160
void SPIDataGet(unsigned long ulBase, unsigned long *pulData)
Definition: spi.c:873
void SPIFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, unsigned long *pulRxLevel)
Definition: spi.c:1056
void SPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags)
Definition: spi.c:1252
void SPIFIFOEnable(unsigned long ulBase, unsigned long ulFlags)
Definition: spi.c:971
void SPIDmaDisable(unsigned long ulBase, unsigned long ulFlags)
Definition: spi.c:638
void SPIIntClear(unsigned long ulBase, unsigned long ulIntFlags)
Definition: spi.c:1370
long SPITransfer(unsigned long ulBase, unsigned char *ucDout, unsigned char *ucDin, unsigned long ulSize, unsigned long ulFlags)
Definition: spi.c:1470
void SPIIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
Definition: spi.c:1205
void SPIReset(unsigned long ulBase)
Definition: spi.c:658