spi_device Struct Reference

An SPI device. More...

#include <spi.h>


Data Fields

struct nvs_device nvs
 NVS device.
struct spi_busbus
 SPI bus to which device is attached.
unsigned int slave
 Slave number.
unsigned int command_len
 Command length, in bits.
unsigned int address_len
 Address length, in bits.
unsigned int munge_address: 1
 Address is munged.


Detailed Description

An SPI device.

This data structure represents a physical SPI device attached to an SPI bus.

Definition at line 86 of file spi.h.


Field Documentation

struct nvs_device spi_device::nvs [read]

struct spi_bus* spi_device::bus [read]

unsigned int spi_device::slave

Slave number.

Definition at line 92 of file spi.h.

Referenced by spi_bit_rw().

Command length, in bits.

Definition at line 94 of file spi.h.

Referenced by spi_bit_rw().

Address length, in bits.

Definition at line 96 of file spi.h.

Referenced by falcon_spi_rw(), ifec_init_eeprom(), spi_bit_rw(), and threewire_detect_address_len().

Address is munged.

Some devices with 9-bit addresses (e.g. AT25040A EEPROM) use bit 3 of the command byte as address bit A8, rather than having a two-byte address. If this flag is set, then commands should be munged in this way.

Definition at line 104 of file spi.h.

Referenced by spi_read(), and spi_write().


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

Generated on Tue Apr 6 20:02:09 2010 for gPXE by  doxygen 1.5.7.1