|
iPXE
|
Three-wire serial devices. More...
#include <stddef.h>#include <string.h>#include <assert.h>#include <unistd.h>#include <ipxe/threewire.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| int | threewire_read (struct nvs_device *nvs, unsigned int address, void *data, size_t len) |
| Read data from three-wire device. More... | |
| int | threewire_write (struct nvs_device *nvs, unsigned int address, const void *data, size_t len) |
| Write data to three-wire device. More... | |
| int | threewire_detect_address_len (struct spi_device *device) |
| Autodetect device address length. More... | |
Three-wire serial devices.
Definition in file threewire.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| int threewire_read | ( | struct nvs_device * | nvs, |
| unsigned int | address, | ||
| void * | data, | ||
| size_t | len | ||
| ) |
Read data from three-wire device.
| nvs | NVS device |
| address | Address from which to read |
| data | Data buffer |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 47 of file threewire.c.
References address, assert(), bus, data, DBGC, len, NULL, spi_device::nvs, rc, SPI_MODE_THREEWIRE, strerror(), and THREEWIRE_READ.
Referenced by threewire_detect_address_len().
| int threewire_write | ( | struct nvs_device * | nvs, |
| unsigned int | address, | ||
| const void * | data, | ||
| size_t | len | ||
| ) |
Write data to three-wire device.
| nvs | NVS device |
| address | Address from which to read |
| data | Data buffer |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 77 of file threewire.c.
References address, assert(), bus, data, DBGC, len, mdelay(), NULL, spi_device::nvs, rc, SPI_MODE_THREEWIRE, strerror(), THREEWIRE_EWEN, THREEWIRE_EWEN_ADDRESS, THREEWIRE_WRITE, and THREEWIRE_WRITE_MDELAY.
| int threewire_detect_address_len | ( | struct spi_device * | device | ) |
Autodetect device address length.
| device | SPI device |
| rc | Return status code |
Definition at line 119 of file threewire.c.
References DBGC, NULL, rc, SPI_AUTODETECT_ADDRESS_LEN, strerror(), threewire_read(), and nvs_device::word_len_log2.
Referenced by ifec_init_eeprom().
1.8.15