DevEEPROM.cpp revision f0679a3d26514d6f85279a4018282ead9ff0f067
0N/A * DevEEPROM - Microware-compatible 64x16-bit 93C46 EEPROM Emulation. 0N/A * Copyright (C) 2007 Sun Microsystems, Inc. 0N/A * This file is part of VirtualBox Open Source Edition (OSE), as 0N/A * you can redistribute it and/or modify it under the terms of the GNU 0N/A * General Public License (GPL) as published by the Free Software 0N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 0N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 0N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa 0N/A * additional information or have any questions. 0N/A * Initialize EEPROM device. 0N/A * @param pu16Initial Initial EEPROM content (optional). The size of initial 0N/A * content must be sizeof(uint16_t)*EEPROM93C46::SIZE 0N/A * Writes one word to specified location if write is enabled. 0N/A * @param u32Addr Address to write at 0N/A * @param u16Value Value to store 0N/A * Reads one word at specified location. 0N/A * @returns True if read was successful. 0N/A * @param u32Addr Address to read from 0N/A * @param pu16Value Placeholder to store the value 0N/A * Fetch next word pointer by m_u16Addr. 0N/A * m_u16Addr is advanced and mask is reset to support sequential reads. 0N/A * @returns New state 0N/A * Write the value of m_u16Word to the location specified by m_u16Addr. 0N/A * @returns New state 0N/A * Overwrite the entire contents of EEPROM with the value of m_u16Word. 0N/A * @returns New state 0N/A * Decode opcode and address from 'opAddr' member. 0N/A * Decodes operation and executes it immediately if possible; otherwise, stores 0N/A * the decoded operation and address. 0N/A * @returns New state 0N/A case 1:
/* WRITE ALL */ 0N/A case 2:
/* ERASE ALL */ 0N/A /* Re-use opWriteAll */ 0N/A * Set bits in EEPROM 4-wire interface. 0N/A * @param u32Wires Values of DI, CS, SK. 0N/A * @remarks The value of DO bit in 'u32Wires' is ignored. 0N/A /* Positive edge of clock */ 0N/A * Read bits in EEPROM 4-wire interface. 0N/A * @returns Current values of DO, DI, CS, SK. 0N/A * @remarks Only DO is controlled by EEPROM, other bits are returned as they 0N/A * were written by 'write'.