X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.c;h=88216bf2c4a157e20943177815d8df631ea89f23;hp=f5b70188f91fc1d4c329d891698ec74566ebeb94;hb=1050ad206d3ff01e5b5bac08a44b25ed0d9b5488;hpb=928bc100257e5d2bc18a35ede7597da1e9b92ee1 diff --git a/src/ftdi.c b/src/ftdi.c index f5b7018..88216bf 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -1328,7 +1328,7 @@ static int ftdi_to_clkbits_AM(int baudrate, unsigned long *encoded_divisor) AM Type chips have only four fractional subdivisors at value[15:14] for subdivisors 0, 0.5, 0.25, 0.125 */ -static int ftdi_to_clkbits(int baudrate, unsigned int clk, int clk_div, unsigned long *encoded_divisor) +static int ftdi_to_clkbits(int baudrate, int clk, int clk_div, unsigned long *encoded_divisor) { static const char frac_code[8] = {0, 3, 2, 4, 1, 5, 6, 7}; int best_baud = 0; @@ -2576,8 +2576,8 @@ int ftdi_set_error_char(struct ftdi_context *ftdi, \retval -2: No struct ftdi_eeprom \retval -3: No connected device or device not yet opened */ -int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, char * manufacturer, - char * product, char * serial) +int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, const char * manufacturer, + const char * product, const char * serial) { struct ftdi_eeprom *eeprom; @@ -3044,10 +3044,13 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) case TYPE_2232H: case TYPE_4232H: i += 2; + /* Fall through*/ case TYPE_R: i += 2; + /* Fall through*/ case TYPE_2232C: i += 2; + /* Fall through*/ case TYPE_AM: case TYPE_BM: i += 0x94; @@ -3418,7 +3421,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) set_ft232h_cbus(eeprom, output); output[0x1e] = eeprom->chip; - fprintf(stderr,"FIXME: Build FT232H specific EEPROM settings\n"); + /* FIXME: Build FT232H specific EEPROM settings */ break; case TYPE_230X: output[0x00] = 0x80; /* Actually, leave the default value */ @@ -3438,15 +3441,20 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) { case TYPE_230X: free_start += 2; + /* Fall through*/ case TYPE_232H: free_start += 6; + /* Fall through*/ case TYPE_2232H: case TYPE_4232H: free_start += 2; + /* Fall through*/ case TYPE_R: free_start += 2; + /* Fall through*/ case TYPE_2232C: free_start++; + /* Fall through*/ case TYPE_AM: case TYPE_BM: free_start += 0x14;