/* Polls the status of the Write In Progress (WIP) flag in the EEPROM's status register and loop until write operation has completed.  */
uint32_t sEE_WaitEepromStandbyState(void)
/* Polls the status of the Write In Progress (WIP) flag in the EEPROM's status register and loop until write operation has completed.  */
uint32_t sEE_WaitEepromStandbyState(void)
{
  uint8_t sEEstatus = 0;
  sEE_CS_LOW();
  sEE_SendByte(sEE_CMD_RDSR);
  do
  {
    sEEstatus = sEE_SendByte(sEE_DUMMY_BYTE);
  }
  while ((sEEstatus & sEE_WIP_FLAG) == SET);
  sEE_CS_HIGH();
  return 0;
}