/* The protection flags indicate access permissions as follow: */
unsigned long EEPROMBlockProtectSet(unsigned long ulBlock, unsigned long ulProtect)
/* The protection flags indicate access permissions as follow: */
unsigned long EEPROMBlockProtectSet(unsigned long ulBlock, unsigned long ulProtect)
{
    ASSERT(ulBlock < BLOCKS_FROM_EESIZE(HWREG(EEPROM_EESIZE)));
    HWREG(EEPROM_EEBLOCK) = ulBlock;
    HWREG(EEPROM_EEPROT) = ulProtect;
    while(HWREG(EEPROM_EEDONE) & EEPROM_EEDONE_WORKING)
    {
    }
    return(HWREG(EEPROM_EEDONE));
}