/* Failure to call this function after a reset may lead to permanent data loss if the EEPROM is later written! */
unsigned long EEPROMInit(void)
/* Failure to call this function after a reset may lead to permanent data loss if the EEPROM is later written! */
unsigned long EEPROMInit(void)
{
    unsigned long ulStatus;
    SysCtlDelay(2);
    EEPROMWaitForDone();
    ulStatus = HWREG(EEPROM_EESUPP);
    if(ulStatus & (EEPROM_EESUPP_PRETRY | EEPROM_EESUPP_ERETRY))
    {
        SysCtlPeripheralReset(SYSCTL_PERIPH_EEPROM0);
        SysCtlDelay(2);
        EEPROMWaitForDone();
        ulStatus = HWREG(EEPROM_EESUPP);
        if(ulStatus & (EEPROM_EESUPP_PRETRY | EEPROM_EESUPP_ERETRY))
        {
            return(EEPROM_INIT_ERROR);
        }
        else
        {
            return(EEPROM_INIT_RETRY);
        }
    }
    return(EEPROM_INIT_OK);
}