EZUSB_WaitForEEPROMWrite

Question: What is the purpose of the  wait routine (EZUSB_WaitForEEPROMWrite)  while  doing a write or a read  on the I2c bus. Why are I2C interrupts disabled in the  EZUSB_WaitForEEPROMWrite routine.

 

Answer:

The EZUSB_WaitForEEPROMWrite was implemented because the EEPROM requires a certain amount of time to conduct an internal write cycle once data has been received.  During this time it will not acknowledge a subsequent command.This routine implemented the "acknowledge polling" discussed in the datasheets of the EEPROMs we typically use.  It is not significant to other I2C devices.