/* * Description: Turn bits off in eeprom * * Parameters: * In: * dwIoBase - I/O base address * byContntOffset - address of EEPROM * byBits - bits to turn off * Out: * none * */ void SROMvRegBitsOff (DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byBits) { BYTE byOrgData; byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset); SROMbWriteEmbedded(dwIoBase, byContntOffset,(BYTE)(byOrgData & (~byBits))); }
/* * Description: Turn bits off in eeprom * * Parameters: * In: * dwIoBase - I/O base address * byContntOffset - address of EEPROM * byBits - bits to turn off * Out: * none * */ void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits) { unsigned char byOrgData; byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset); SROMbWriteEmbedded(dwIoBase, byContntOffset,(unsigned char)(byOrgData & (~byBits))); }
/* * Description: Write Ethernet Address from buffer to eeprom * * Parameters: * In: * dwIoBase - I/O base address * pbyEtherAddress - Ethernet Address buffer * Out: * none * * Return Value: none * */ void SROMvWriteEtherAddress (DWORD_PTR dwIoBase, PBYTE pbyEtherAddress) { BYTE ii; // ii = Rom Address for (ii = 0; ii < U_ETHER_ADDR_LEN; ii++) { SROMbWriteEmbedded(dwIoBase, ii, *pbyEtherAddress); pbyEtherAddress++; } }
/* * Description: Write all contents of buffer to eeprom * * Parameters: * In: * dwIoBase - I/O base address * pbyEepromRegs - EEPROM content Buffer * Out: * none * * Return Value: none * */ void SROMvWriteAllContents (DWORD_PTR dwIoBase, PBYTE pbyEepromRegs) { int ii; // ii = Rom Address for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) { SROMbWriteEmbedded(dwIoBase,(BYTE) ii, *pbyEepromRegs); pbyEepromRegs++; } }
/* * Description: Write Ethernet Address from buffer to eeprom * * Parameters: * In: * dwIoBase - I/O base address * pbyEtherAddress - Ethernet Address buffer * Out: * none * * Return Value: none * */ void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress) { unsigned char ii; /* ii = Rom Address */ for (ii = 0; ii < ETH_ALEN; ii++) { SROMbWriteEmbedded(dwIoBase, ii, *pbyEtherAddress); pbyEtherAddress++; } }
/* * Description: Write all contents of buffer to eeprom * * Parameters: * In: * dwIoBase - I/O base address * pbyEepromRegs - EEPROM content Buffer * Out: * none * * Return Value: none * */ void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs) { int ii; /* ii = Rom Address */ for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) { SROMbWriteEmbedded(dwIoBase,(unsigned char) ii, *pbyEepromRegs); pbyEepromRegs++; } }
void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress) { BYTE ii; /* ii = Rom Address */ for (ii = 0; ii < ETH_ALEN; ii++) { SROMbWriteEmbedded(dwIoBase, ii, *pbyEtherAddress); pbyEtherAddress++; } }