From: Uwe Bonnes Date: Thu, 9 Sep 2010 20:32:39 +0000 (+0200) Subject: EEPROM: Fix typos around high_cuttent_drive and make code comipile again. Will care... X-Git-Tag: v1.0rc1~133^2~106 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=3d7ba8719da16c784a3c6e13c5976810073ff8bb;hp=85394e6249329e13fd8530a5aeb72355c5340d62 EEPROM: Fix typos around high_cuttent_drive and make code comipile again. Will care for initializing and encoding later --- diff --git a/src/ftdi.c b/src/ftdi.c index 701cc65..8293cc3 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -2210,7 +2210,7 @@ void ftdi_eeprom_initdefaults(struct ftdi_context *ftdi) { eeprom->cbus_function[i] = 0; } - eeprom->high_current = 0; + eeprom->high_current_a = 0; eeprom->invert = 0; eeprom->size = FTDI_MAX_EEPROM_SIZE; @@ -2291,7 +2291,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi, unsigned char *output) if (ftdi->type != TYPE_R) { if (eeprom->invert) return -4; - if (eeprom->high_current) return -5; + if (eeprom->high_current_a) return -5; } size_check = eeprom->size; @@ -2506,8 +2506,8 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, eeprom_size = 0x80; eeprom = ftdi->eeprom; - eeprom_high_current_a = buf[0x00] & HIGH_CURRENT_DRIVE; - eeprom_high_current_b = buf[0x01] & HIGH_CURRENT_DRIVE; + eeprom->high_current_a = buf[0x00] & HIGH_CURRENT_DRIVE; + eeprom->high_current_b = buf[0x01] & HIGH_CURRENT_DRIVE; // Addr 02: Vendor ID