git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2a99230
)
msvc: fix warnings by using all enum values in case statements
author
Shawn Hoffman
<godisgovernment@gmail.com>
Wed, 10 Apr 2024 14:15:40 +0000 (07:15 -0700)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Thu, 12 Jun 2025 19:52:50 +0000 (21:52 +0200)
src/ftdi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftdi.c
b/src/ftdi.c
index
534e3dd
..
b773303
100644
(file)
--- a/
src/ftdi.c
+++ b/
src/ftdi.c
@@
-2918,8
+2918,12
@@
static unsigned char type2bit(unsigned char type, enum ftdi_chip_type chip)
}
}
case TYPE_230X: /* FT230X is only UART */
+ case TYPE_AM:
+ case TYPE_BM:
+ case TYPE_4232H:
default: return 0;
}
+ /* fallback */
return 0;
}
@@
-4625,7
+4629,7
@@
int ftdi_write_eeprom_location(struct ftdi_context *ftdi, int eeprom_addr,
switch (ftdi->type)
{
case TYPE_BM:
- case TYPE_2232C:
+ case TYPE_2232C:
chip_type_location = 0x14;
break;
case TYPE_2232H:
@@
-4635,6
+4639,9
@@
int ftdi_write_eeprom_location(struct ftdi_context *ftdi, int eeprom_addr,
case TYPE_232H:
chip_type_location = 0x1e;
break;
+ case TYPE_AM:
+ case TYPE_R:
+ case TYPE_230X:
default:
ftdi_error_return(-4, "Device can't access unprotected area");
}