|
iPXE
|
SPI bit-bashing interface. More...
Go to the source code of this file.
Data Structures | |
| struct | spi_bit_basher |
| A bit-bashing SPI bus. More... | |
Macros | |
| #define | SPI_BIT_SS(slave) |
| Determine bit index for a particular slave. | |
| #define | SPI_BIT_UDELAY 1 |
| Delay between SCLK transitions. | |
| #define | SPI_BIT_BIG_ENDIAN 0 |
| SPI bit basher treats data as big-endian. | |
| #define | SPI_BIT_LITTLE_ENDIAN 1 |
| SPI bit basher treats data as little-endian. | |
Enumerations | |
| enum | { SPI_BIT_SCLK = 0 , SPI_BIT_MOSI , SPI_BIT_MISO , SPI_BIT_SS0 } |
| Bit indices used for SPI bit-bashing interface. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| void | init_spi_bit_basher (struct spi_bit_basher *spibit) |
| Initialise SPI bit-bashing interface. | |
SPI bit-bashing interface.
Definition in file spi_bit.h.
| #define SPI_BIT_SS | ( | slave | ) |
Determine bit index for a particular slave.
| slave | Slave number |
| index | Bit index (i.e. SPI_BIT_SSN, where N=slave) |
Definition at line 51 of file spi_bit.h.
Referenced by spi_bit_set_slave_select().
| #define SPI_BIT_UDELAY 1 |
Delay between SCLK transitions.
Definition at line 54 of file spi_bit.h.
Referenced by spi_bit_delay().
| #define SPI_BIT_BIG_ENDIAN 0 |
SPI bit basher treats data as big-endian.
Definition at line 57 of file spi_bit.h.
Referenced by natsemi_init_eeprom(), spi_bit_rw(), and spi_bit_transfer().
| #define SPI_BIT_LITTLE_ENDIAN 1 |
SPI bit basher treats data as little-endian.
Definition at line 60 of file spi_bit.h.
Referenced by natsemi_init_eeprom().
| anonymous enum |
Bit indices used for SPI bit-bashing interface.
| Enumerator | |
|---|---|
| SPI_BIT_SCLK | Serial clock. |
| SPI_BIT_MOSI | Master Out Slave In. |
| SPI_BIT_MISO | Master In Slave Out. |
| SPI_BIT_SS0 | Slave 0 select. |
Definition at line 34 of file spi_bit.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
Initialise SPI bit-bashing interface.
| spibit | SPI bit-bashing interface |
Definition at line 236 of file spi_bit.c.
References assert, spi_bit_basher::basher, spi_bit_basher::bus, NULL, bit_basher::op, bit_basher_operations::read, spi_bus::rw, spi_bit_rw(), and bit_basher_operations::write.
Referenced by ifec_init_eeprom(), natsemi_init_eeprom(), realtek_init_eeprom(), and rtl818x_probe().