WIZlib Library API  ver 1.0
WIZlib Library API User Menual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions

Platform independent SPI driver. More...

Collaboration diagram for SPI Driver:

Enumerations

enum  wizpf_spi { WIZ_SPI1 = 0, WIZ_SPI2 = 1, WIZ_SPI3 = 2 }
 Indicate the SPI index number. More...
 

Functions

int8 wizspi_init (wizpf_spi spi)
 Initialize SPI Peripheral Device. More...
 
void wizspi_cs (wizpf_spi spi, uint8 val)
 Set/Clear SPI CS Pin. More...
 
uint8 wizspi_byte (wizpf_spi spi, uint8 byte)
 Send/Receive 1 Byte through SPI. More...
 

Detailed Description

Platform independent SPI driver.

Enumeration Type Documentation

enum wizpf_spi

Indicate the SPI index number.

Enumerator
WIZ_SPI1 

Indicate the 1st SPI.

WIZ_SPI2 

Indicate the 2nd SPI.

WIZ_SPI3 

Indicate the 3rd SPI.

Definition at line 22 of file wizspi.h.

Function Documentation

uint8 wizspi_byte ( wizpf_spi  spi,
uint8  byte 
)

Send/Receive 1 Byte through SPI.

Parameters
spiSPI index number (wizpf_spi)
byte1 Byte to send
Returns
Received 1 Byte

Definition at line 127 of file wizspi.c.

void wizspi_cs ( wizpf_spi  spi,
uint8  val 
)

Set/Clear SPI CS Pin.

Parameters
spiSPI index number (wizpf_spi)
valVAL_LOW: Active(set low)
VAL_HIGH: Inactive(set high)

Definition at line 93 of file wizspi.c.

int8 wizspi_init ( wizpf_spi  spi)

Initialize SPI Peripheral Device.

Parameters
spiSPI index number (wizpf_spi)
Returns
RET_OK: Success
RET_NOK: Error

Definition at line 27 of file wizspi.c.

Here is the caller graph for this function: