40 #include <boost/thread/mutex.hpp> 45 struct EepromStatusReg;
46 struct WG0XSpiEepromCmd;
bool waitForEepromReady(EthercatCom *com, WGMailbox *mbx)
Waits for EEPROM to become ready.
boost::mutex mutex_
Only one eeprom transaction can occur at a time.
bool sendSpiEepromCmd(EthercatCom *com, WGMailbox *mbx, const WG0XSpiEepromCmd &cmd)
Sends command to SPI EEPROM state machine.
static const unsigned NUM_EEPROM_PAGES
bool readSpiEepromCmd(EthercatCom *com, WGMailbox *mbx, WG0XSpiEepromCmd &cmd)
Reads SPI state machine command register.
bool writeEepromPage(EthercatCom *com, WGMailbox *mbx, unsigned page, const void *data, unsigned length)
Write data to single eeprom page.
bool readEepromPage(EthercatCom *com, WGMailbox *mbx, unsigned page, void *data, unsigned length)
Read data from single eeprom page.
static const unsigned MAX_EEPROM_PAGE_SIZE
bool readEepromStatusReg(EthercatCom *com, WGMailbox *mbx, EepromStatusReg ®)
Reads EEPROM status register.
bool waitForSpiEepromReady(EthercatCom *com, WGMailbox *mbx)
Waits for SPI eeprom state machine to be idle.