minix/commands/eepromread/eepromread.h
Thomas Cort 13054fd168 eepromread: support for reading from /dev/eeprom
eepromread could only read EEPROMs through the /dev/i2c interface.
Once the cat24c256 driver is started and claims/reserves the
device, it can no longer be read through the /dev/i2c interface.

This patch adds support for reading from EEPROMs through the
/dev/eeprom interface. For example, to read the on-board eeprom
on the BBB, one would do `eepromread -f /dev/eepromb1s50 -i`.

Change-Id: If08ce37231e593982eeb109bdd6d5458ad271108
2013-11-11 10:14:03 -05:00

13 lines
383 B
C

#ifndef __EEPROMREAD_H
#define __EEPROMREAD_H
enum device_types { I2C_DEVICE, EEPROM_DEVICE };
#define DEFAULT_DEVICE I2C_DEVICE
int eeprom_read(int fd, i2c_addr_t addr, uint16_t memaddr, void *buf,
size_t buflen, int flags, enum device_types device_type);
int board_info(int fd, i2c_addr_t address, int flags,
enum device_types device_type);
#endif /* __EEPROMREAD_H */