Aurelien Jarno <aurelien@aurel32.net>
Chris Zeh <chris.w.zeh@gmail.com>
Clifford Wolf <clifford@clifford.at>
- Daniel Kirkham <d.kirkham@telstra.com>
+ Daniel Kirkham <dk2@kirkham.id.au>
David Challis <dchallis@qsimaging.com>
Emil <emil@datel.co.uk>
Evan Nemerson <evan@coeus-group.com>
output[0x08] = j;
// Addr 09: Max power consumption: max power = value * 2 mA
- output[0x09] = eeprom->max_power>>1;
+ output[0x09] = eeprom->max_power / MAX_POWER_MILLIAMP_PER_UNIT;
if (ftdi->type != TYPE_AM)
{
eeprom->remote_wakeup = buf[0x08] & 0x20;
// Addr 09: Max power consumption: max power = value * 2 mA
- eeprom->max_power = buf[0x09];
+ eeprom->max_power = MAX_POWER_MILLIAMP_PER_UNIT * buf[0x09];
// Addr 0A: Chip configuration
// Bit 7: 0 - reserved
if (eeprom->self_powered)
fprintf(stdout, "Self-Powered%s", (eeprom->remote_wakeup)?", USB Remote Wake Up\n":"\n");
else
- fprintf(stdout, "Bus Powered: %3d mA%s", eeprom->max_power * 2,
+ fprintf(stdout, "Bus Powered: %3d mA%s", eeprom->max_power,
(eeprom->remote_wakeup)?" USB Remote Wake Up\n":"\n");
if (eeprom->manufacturer)
fprintf(stdout, "Manufacturer: %s\n",eeprom->manufacturer);
/* Even on 93xx66 at max 256 bytes are used (AN_121)*/
#define FTDI_MAX_EEPROM_SIZE 256
+/** Max Power adjustment factor. */
+#define MAX_POWER_MILLIAMP_PER_UNIT 2
+
/**
\brief FTDI eeprom structure
*/