Revision ebabb67a hw/eeprom93xx.c

b/hw/eeprom93xx.c
75 75
    uint8_t  tick;
76 76
    uint8_t  address;
77 77
    uint8_t  command;
78
    uint8_t  writeable;
78
    uint8_t  writable;
79 79

  
80 80
    uint8_t eecs;
81 81
    uint8_t eesk;
......
130 130
        VMSTATE_UINT8(tick, eeprom_t),
131 131
        VMSTATE_UINT8(address, eeprom_t),
132 132
        VMSTATE_UINT8(command, eeprom_t),
133
        VMSTATE_UINT8(writeable, eeprom_t),
133
        VMSTATE_UINT8(writable, eeprom_t),
134 134

  
135 135
        VMSTATE_UINT8(eecs, eeprom_t),
136 136
        VMSTATE_UINT8(eesk, eeprom_t),
......
165 165
        address = 0x0;
166 166
    } else if (eeprom->eecs && ! eecs) {
167 167
        /* End chip select cycle. This triggers write / erase. */
168
        if (eeprom->writeable) {
168
        if (eeprom->writable) {
169 169
            uint8_t subcommand = address >> (eeprom->addrbits - 2);
170 170
            if (command == 0 && subcommand == 2) {
171 171
                /* Erase all. */
......
232 232
                    switch (address >> (eeprom->addrbits - 2)) {
233 233
                        case 0:
234 234
                            logout("write disable command\n");
235
                            eeprom->writeable = 0;
235
                            eeprom->writable = 0;
236 236
                            break;
237 237
                        case 1:
238 238
                            logout("write all command\n");
......
242 242
                            break;
243 243
                        case 3:
244 244
                            logout("write enable command\n");
245
                            eeprom->writeable = 1;
245
                            eeprom->writable = 1;
246 246
                            break;
247 247
                    }
248 248
                } else {

Also available in: Unified diff