Go to the source code of this file.
Functions | |
int | At91SpiSetup (NUTSPINODE *node) |
Update SPI shadow registers. | |
int | At91SpiBusNodeInit (NUTSPINODE *node) |
Initialize an SPI bus node. | |
int | At91SpiBusWait (NUTSPINODE *node, uint32_t tmo) |
Wait until all SPI bus transfers are done. |
* $Id: spibus_at91.c 2468 2009-02-17 09:30:38Z haraldkipp $ *
Definition in file spibus_at91.c.
int At91SpiSetup | ( | NUTSPINODE * | node | ) |
Update SPI shadow registers.
node | Specifies the SPI bus node. |
Definition at line 72 of file spibus_at91.c.
References NUT_HWCLK_PERIPHERAL, NUTASSERT, NutClockGet, SPI_BITS, SPI_BITS_LSB, SPI_CPOL, SPI_CSAAT, SPI_LLB, SPI_MODE_CPHA, SPI_MODE_CPOL, SPI_MODE_CSKEEP, SPI_MODE_FAULT, SPI_MODE_LOOPBACK, SPI_MODE_UPDATE, SPI_MODFDIS, SPI_NCPHA, SPI_SCBR, and SPI_SCBR_LSB.
Referenced by At91SpiBus0Select(), and At91SpiBusNodeInit().
int At91SpiBusNodeInit | ( | NUTSPINODE * | node | ) |
Initialize an SPI bus node.
This routine is called for each SPI node, which is registered via NutRegisterSpiDevice().
node | Specifies the SPI bus node. |
Definition at line 137 of file spibus_at91.c.
References At91Spi0ChipSelect(), At91Spi1ChipSelect(), At91SpiBus0Interrupt(), At91SpiBus1Interrupt(), At91SpiSetup(), malloc, NUTASSERT, NutIrqEnable(), NutRegisterIrqHandler(), outr, 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.
int At91SpiBusWait | ( | NUTSPINODE * | node, | |
uint32_t | tmo | |||
) |
Wait until all SPI bus transfers are done.
node | Specifies the SPI bus node. | |
tmo | Timeout in milliseconds. To disable timeout, set this parameter to NUT_WAIT_INFINITE. |
Definition at line 343 of file spibus_at91.c.
References inr, NutEventWait(), SPI_RXBUFF, and SPI_SR_OFF.
Referenced by At91SpiBus0Deselect().