Nut/OS  5.0.5
API Reference
spibus_at91.c File Reference
#include <cfg/spi.h>
#include <sys/timer.h>
#include <sys/nutdebug.h>
#include <stdlib.h>
#include <memdebug.h>
#include <dev/spibus_at91.h>
Include dependency graph for spibus_at91.c:

Defines

#define SPI_DOUBLE_BUFFER_MIN_TRANSFER_SIZE   4

Functions

int At91SpiSetup (NUTSPINODE *node)
 Update SPI shadow registers.
int At91SpiBusNodeInit (NUTSPINODE *node)
 Initialize an SPI bus node.

Define Documentation

#define SPI_DOUBLE_BUFFER_MIN_TRANSFER_SIZE   4

Function Documentation

int At91SpiBusNodeInit ( NUTSPINODE node)

Initialize an SPI bus node.

This routine is called for each SPI node, which is registered via NutRegisterSpiDevice().

Parameters:
nodeSpecifies the SPI bus node.
Returns:
0 on success or -1 if there is no valid chip select.

References At91Spi0ChipSelect(), At91Spi1ChipSelect(), _AT91SPIREG::at91spi_csr, _AT91SPIREG::at91spi_mr, At91SpiBus0Interrupt(), At91SpiBus1Interrupt(), At91SpiSetup(), _NUTSPIBUS::bus_base, _NUTSPIBUS::bus_ready, _NUTSPIBUS::bus_sig, malloc(), _NUTSPINODE::node_bus, _NUTSPINODE::node_cs, _NUTSPINODE::node_mode, _NUTSPINODE::node_stat, NULL, NUTASSERT, NutIrqEnable(), NutRegisterIrqHandler(), outr, rc, SPI1_BASE, SPI_IDR_OFF, SPI_MODE_CSHIGH, SPI_MODFDIS, SPI_MSTR, SPI_PCS_0, SPI_PCS_1, SPI_PCS_2, and SPI_PCS_3.

Here is the call graph for this function: