iPXE
|
An SPI bus. More...
#include <spi.h>
Data Fields | |
unsigned int | mode |
SPI interface mode. More... | |
int(* | rw )(struct spi_bus *bus, struct spi_device *device, unsigned int command, int address, const void *data_out, void *data_in, size_t len) |
Read/write data via SPI bus. More... | |
An SPI bus.
This data structure represents an SPI bus controller capable of issuing commands to attached SPI devices.
unsigned int spi_bus::mode |
SPI interface mode.
This is the bitwise OR of zero or more of SPI_MODE_CPHA
and SPI_MODE_CPOL
. It is also the number conventionally used to describe the SPI interface mode. For example, SPI mode 1 is the mode in which CPOL=0 and CPHA=1, which therefore corresponds to a mode value of (0|SPI_MODE_CPHA) which, happily, equals 1.
Definition at line 136 of file spi.h.
Referenced by natsemi_init_eeprom(), realtek_init_eeprom(), and spi_bit_set_slave_select().
int( * spi_bus::rw) (struct spi_bus *bus, struct spi_device *device, unsigned int command, int address, const void *data_out, void *data_in, size_t len) |
Read/write data via SPI bus.
bus | SPI bus |
device | SPI device |
command | Command |
address | Address to read/write (<0 for no address) |
data_out | TX data buffer (or NULL) |
data_in | RX data buffer (or NULL) |
len | Length of data buffer(s) |
This issues the specified command and optional address to the SPI device, then reads and/or writes data to/from the data buffers.
Definition at line 152 of file spi.h.
Referenced by falcon_probe_spi(), and init_spi_bit_basher().