SPI bus structure. More...
#include <spibus.h>
Data Fields | |
HANDLE | bus_mutex |
Bus lock queue. | |
HANDLE | bus_ready |
Bus wait ready queue. | |
uintptr_t | bus_base |
Bus base address. | |
IRQ_HANDLER * | bus_sig |
Bus interrupt handler. | |
int(* | bus_initnode )(NUTSPINODE *) |
Initialize bus controller. | |
int(* | bus_alloc )(NUTSPINODE *, uint32_t) |
Allocate the bus. | |
int(* | bus_release )(NUTSPINODE *) |
Release the bus. | |
int(* | bus_transfer )(NUTSPINODE *, const void *, void *, int) |
Transfer data. | |
int(* | bus_wait )(NUTSPINODE *, uint32_t) |
Wait for transfer ready. | |
uint_fast16_t(* | bus_set_mode )(NUTSPINODE *, uint_fast16_t) |
Set node's SPI mode. | |
uint_fast32_t(* | bus_set_rate )(NUTSPINODE *, uint_fast32_t) |
Set node's clock rate. | |
uint_fast8_t(* | bus_set_bits )(NUTSPINODE *, uint_fast8_t) |
Set node's data bit size. |
SPI bus structure.
Bus lock queue.
Referenced by At91SpiBus0Deselect(), At91SpiBus0Select(), Avr32SpiBus0Deselect(), Avr32SpiBus0Select(), Avr32SpiBus1Deselect(), Avr32SpiBus1Select(), AvrSpiBus0Deselect(), AvrSpiBus0Select(), GpioSpiBus0Deselect(), GpioSpiBus0Select(), NplSpiBusDeselect(), NplSpiBusSelect(), NutRegisterSpiDevice(), Stm32Usart3BusDeselect(), Stm32Usart3BusSelect(), UFlashAttach(), and UFlashFormat().
Bus wait ready queue.
Referenced by At91SpiBus0Transfer(), At91SpiBusNodeInit(), Avr32SpiBus0Transfer(), Avr32SpiBus1Transfer(), Avr32SpiBusNodeInit(), and Avr32SpiBusWait().
Bus base address.
Referenced by At91SpiBus0Transfer(), At91SpiBusNodeInit(), At91SpiSetup(), Avr32SpiBus0Transfer(), Avr32SpiBus1Transfer(), Avr32SpiBusNodeInit(), Avr32SpiBusWait(), Avr32SpiSetup(), Stm32Usart3BusSelect(), Stm32UsartBusTransfer(), and Stm32UsartSpiSetup().
Bus interrupt handler.
Referenced by At91SpiBusNodeInit(), Avr32SpiBusNodeInit(), and AvrSpiBus0NodeInit().
int(* _NUTSPIBUS::bus_initnode)(NUTSPINODE *) |
Initialize bus controller.
This routine is called during device registration.
Referenced by NutRegisterSpiDevice(), UFlashAttach(), and UFlashFormat().
int(* _NUTSPIBUS::bus_alloc)(NUTSPINODE *, uint32_t) |
Allocate the bus.
Locks the bus and activates the chip select.
Referenced by At45dNodeStatus(), and At45dNodeTransfer().
int(* _NUTSPIBUS::bus_release)(NUTSPINODE *) |
Release the bus.
Deactivates the chip select and unlocks the bus.
Referenced by At45dNodeStatus(), At45dNodeTransfer(), SpiMmcBlockWrite(), and SpiMmcIOCtl().
int(* _NUTSPIBUS::bus_transfer)(NUTSPINODE *, const void *, void *, int) |
Transfer data.
Referenced by At45dNodeStatus(), At45dNodeTransfer(), SpiMmcBlockWrite(), and SpiMmcIOCtl().
int(* _NUTSPIBUS::bus_wait)(NUTSPINODE *, uint32_t) |
Wait for transfer ready.
Referenced by At45dNodeStatus().
Set node's SPI mode.
Set node's clock rate.
Set node's data bit size.