Nut/OS  4.10.3
API Reference
_NUTSPIBUS Struct Reference

SPI bus structure. More...

#include <spibus.h>

Collaboration diagram for _NUTSPIBUS:

Data Fields

HANDLE bus_mutex
 Bus lock queue.
HANDLE bus_ready
 Bus wait ready queue.
uintptr_t bus_base
 Bus base address.
IRQ_HANDLERbus_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.

Detailed Description

SPI bus structure.

Definition at line 79 of file spibus.h.


Field Documentation

Bus interrupt handler.

Definition at line 94 of file spibus.h.

Referenced by At91SpiBusNodeInit(), Avr32SpiBusNodeInit(), and AvrSpiBus0NodeInit().

Initialize bus controller.

This routine is called during device registration.

Definition at line 100 of file spibus.h.

Referenced by NutRegisterSpiDevice(), UFlashAttach(), and UFlashFormat().

Allocate the bus.

Locks the bus and activates the chip select.

Definition at line 106 of file spibus.h.

Referenced by At45dNodeStatus(), and At45dNodeTransfer().

Release the bus.

Deactivates the chip select and unlocks the bus.

Definition at line 112 of file spibus.h.

Referenced by At45dNodeStatus(), At45dNodeTransfer(), and SpiMmcIOCtl().

int(* _NUTSPIBUS::bus_transfer)(NUTSPINODE *, CONST void *, void *, int)

Transfer data.

Definition at line 116 of file spibus.h.

Referenced by At45dNodeStatus(), At45dNodeTransfer(), and SpiMmcIOCtl().

Wait for transfer ready.

Definition at line 120 of file spibus.h.

Referenced by At45dNodeStatus().

Set node's SPI mode.

Definition at line 124 of file spibus.h.

Set node's clock rate.

Definition at line 128 of file spibus.h.

Set node's data bit size.

Definition at line 132 of file spibus.h.


The documentation for this struct was generated from the following file: