This porting file provides the adaptation layer for the host SPI interface.
More...
|
|
uint32_t | bytesToWord32s (uint32_t bytesLen) |
| |
| int | SPI_ReadSync (uint8_t *data, uint32_t length) |
| | Read SPI data as master. More...
|
| |
| int | SPI_WriteSync (uint8_t *data, uint32_t length) |
| | Write SPI data as master. More...
|
| |
| void | spiInit () |
| | Initialize and open the SPI module. More...
|
| |
This porting file provides the adaptation layer for the host SPI interface.
§ SPI_ReadSync()
| int SPI_ReadSync |
( |
uint8_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
Read SPI data as master.
- Parameters
-
| data | - buffer for output data |
| length | - length in bytes to read |
- Returns
- 0: success, -1: failed
- Note
- Warning
§ SPI_WriteSync()
| int SPI_WriteSync |
( |
uint8_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
Write SPI data as master.
- Parameters
-
| data | - input buffer |
| length | - length in bytes to read |
- Returns
- 0: success, -1: failed
- Note
- Warning
§ spiInit()
Initialize and open the SPI module.
- Parameters
-
| data | - input buffer |
| length | - length in bytes to read |
- Returns
- 0: success, -1: failed
- Note
- If initializing all the MCU drivers at the beginning of the application, this function can stay empty. This function is called in Wlan_Start and will stay initialized even if Wlan_Stop is called.
- The SPI interface must have the following parameters:
- master
- 4 pin mode SPI
- chip select active low
- polarity 0 phase 0
- max frequency 40000000Hz
- data block 32bits
- Warning