Data Structures | |
struct | _SPIDCB |
struct | _SPIICB |
Defines | |
#define | BUFOR_SIZE 300 |
Typedefs | |
typedef _SPIICB | SPIICB |
typedef _SPIDCB | SPIDCB |
Functions | |
int | SpiInit (NUTDEVICE *dev) |
int | SpiInput (NUTDEVICE *dev, u_char *buf, u_int size) |
int | SpiOutput (NUTDEVICE *dev, u_char *buf, u_int size) |
void | LockSpi (NUTDEVICE *dev, u_char deviceId) |
void | UnlockSpi (NUTDEVICE *dev, u_char deviceId) |
Variables | |
NUTDEVICE | devSpi0 |
|
Size of writing buffor |
|
Device control block for flash required for NUT device driver. |
|
Interfece control block for device flash required for NUT device driver. |
|
Locks spi device. This method block spi device for only one device with specified id and ensures that only one thread has access to spi. Function sets special spi parameters, for device. Use UnlockSpi to release lock.
|
|
Init a driver. Call it first.
|
|
Reads data from SPI device.
|
|
Write data to SPI device.
|
|
Unlock spi device. This method unblock spi device when spi was locked. See LockSpi. When spi device isn't blocked this method do nothing.
|
|
Driver control structure. |