From 7a9f68233226c069f8114fb2ab266dc14e90b259 Mon Sep 17 00:00:00 2001 From: hweisbach Date: Mon, 13 Aug 2012 19:03:41 +0000 Subject: [PATCH] Fixes pin_limit error in avrftdic. -Error was a result of a mixup between 2232C/D and 2232H git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1099 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 5 +++++ avrftdi.c | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f3930aa..d9b66c44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-08-13 Hannes Weisbach + + * avrftdi.c: fixes pin_limit for different FTDI devices (there was a mixup + between 2232C and 2232H) + 2012-07-29 Hannes Weisbach * avrftdi.c: bugfixes (synchronisation) and maintenance (paged programming, diff --git a/avrftdi.c b/avrftdi.c index 2d32e2bf..c285fc69 100644 --- a/avrftdi.c +++ b/avrftdi.c @@ -764,15 +764,24 @@ static int avrftdi_open(PROGRAMMER * pgm, char *port) /* set pin limit depending on chip type */ switch(pdata->ftdic->type) { +#if 0 + //TODO: issue an error - no MPSSE. hint the user to syncbb? + case TYPE_AM: + case TYPE_BM: + case TYPE_R: +#endif case TYPE_2232C: - pdata->pin_limit = 15; - break; - case TYPE_2232H: pdata->pin_limit = 11; break; + case TYPE_2232H: + case TYPE_232H: + pdata->pin_limit = 15; + break; case TYPE_4232H: - default: pdata->pin_limit = 7; + break; + default: + //TODO: error/unsupported device } /* add SCK, MOSI and RESET as output pins - MISO needs no configuration */