Commit Graph

14 Commits

Author SHA1 Message Date
Rene Liebscher 926269f39f bug #30559 Ft232 bit-bang support, see comment #30
* ft245r.c: added semaphore workaround for MacOS X,
	            added pthread_testcancel in reader thread

* configure.ac: added check for TYPE_232H in libftdi (not in libftdi < 0.20)
* avrftdi.c: do not use TYPE_232H if not declared

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1101 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-08-15 17:31:11 +00:00
Hannes Weisbach 15ab375553 Fixes 'label at end of compound statement' error introdcued in r1099
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1100 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-08-13 19:31:38 +00:00
Hannes Weisbach cee2c0cd39 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
2012-08-13 19:03:41 +00:00
Hannes Weisbach bcd3ba87f3 Adds bugfixes and maintenance for avrftdi
Bugfixes:
-remove ftdi_usb_purge_buffers(), since it does not flush, but clear buffers
-fix bad polling in avrftdi_flash_write() where it was possible to poll a 0xff
 value. 

Maintenance:
-use #defines from libftdi for MPSSE commands where applicable
-reformat E() and E_VOID() macros
-remove TYPE_* macros
-clean up private structure (remove pin_inversion, type and ftype)
-adds ftdi_pin_name() to turn a (FTDI) pin number to a human readable string
-adds avrftdi_print to encapsulate "if(verbose > c) fprintf()"-idiom
-nicer / better understandable (I hope) output
-removes pin_limit() and adds a member in the private data structure.
 TYPE_* macros can be removed; decision is made from (struct ftdi_context).type
-add_pin(s)() functions reworked. parameters are validated first, if everything 
 is alright, pin_value is modified. pin_inversion mask is not needed; use
 PIN_INVERTED instead
-change set_pin(s)(), so that it gets the pin value used by avrdude (and not a
 bit mask). This way, PIN_INVERTED is usable and pin_inversion is not needed.
 Plus, the interface is consistent with the add_pin() signature. Also move
 parameter validation to the start of the function. I also commented out the
 warning, that a pin is not defined, because it is annoying.
-clean up avrftdi_open(): first parameter validation, then USB lookup, interface
 initialization then pin setup
-avrftdi_eeprom_read/write() and avrftdi_flash_read/write(): convert to new
 calling scheme, where every paged_* function is called once for every page



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1098 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-07-29 12:29:39 +00:00
Rene Liebscher 165d526d98 patch #7718: Merge global data of avrftdi in a private data structure
* avrftdi.[ch]: moved global data into private data structure, moved
    private defines from header file into source file


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1068 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-11 19:55:22 +00:00
Rene Liebscher e28f48d296 patch #7720 Bug in EEPROM write
* avrftdi.c: fixed wrong buffer address initialization in paged_write

* fileio.c: added #include <stdint.h>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1067 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-06 19:41:36 +00:00
Rene Liebscher 10c078e7f3 patch #7717 avrftdi_flash_write is broken
* avrftdi.c: fixed wrong buffer address initialization in paged_write
bug #35296 Extraneous newlines in output.
* main.c: fixed output of newlines at 100% progress


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1065 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-04 16:43:37 +00:00
Rene Liebscher c1095de822 Parser does not need to know all programmer types now, new programmers
will update only the table in pgm_type.c.
  * config_gram.y, lexer.l: removed programmer type keywords,
    use now locate_programmer_type() function
  * pgm_type.[ch]: added new files for table of programmer types
  * main.c: allow list of programmer types by -c ?type
  * avrdude.conf.in: changed all type keywords to quoted strings
  * doc/avrdude.texi: changed description of type definition, list
    of valid types is now included from generated file
  * doc/Makefile.am: generate list of programmer types for doc
  * all programmers [hc]: add xxx_desc string for description of programmer


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1051 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-31 17:03:43 +00:00
Joerg Wunsch 9250b467f7 libusb-win32 recently changed the name of their header file from usb.h
to lusb0_usb.h (for whatever reason).  Autoprobe for the filename
during configure, and include whatever is appropriate.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1043 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-20 09:39:56 +00:00
Rene Liebscher f39e538c6b bug #35261 avrftdi uses wrong interface in avrftdi_paged_(write|load)
* avrftdi.c: Fixed interface and implementation of avrftdi_paged_(write|load)
patch #7672 adding support for O-Link (FTDI based JTAG) as programmer
* avrdude.conf.in: added o-link entry


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1039 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-10 18:19:40 +00:00
Rene Liebscher d34978a124 Fixed following findings reported by cppcheck
* avr910.c:625 (error) Possible null pointer dereference: cmd - otherwise it is redundant to check if cmd is null at line 624
	* avr910.c:626 (error) Possible null pointer dereference: cmd - otherwise it is redundant to check if cmd is null at line 624
	* avr910.c:168 (information) The scope of the variable 'devtype_1st' can be reduced
	* avr910.c:169 (information) The scope of the variable 'dev_supported' can be reduced
	* avrftdi.c:647 (error) Using sizeof for array given as function argument returns the size of pointer.
	* stk500v2.c:3347 (error) Memory leak: b
	* stk500v2.c:3452 (error) Memory leak: b
	* usbasp.c:554 (error) Using sizeof for array given as function argument returns the size of pointer.
	* usbasp.c:485 (information) The scope of the variable 'dly' can be reduced

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1035 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-08 17:09:40 +00:00
Joerg Wunsch 57010bf9ba Remove stray printf()s by fprintf(stderr).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1015 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-15 20:08:15 +00:00
Joerg Wunsch d742827da1 Mega-commit to bring in memory tagging.
Each memory image byte is now tagged as it's being read from a file.
Only bytes read from a file will be written or verified (modulo page
granularity requirements).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1007 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-14 21:49:42 +00:00
Joerg Wunsch 46c7bf38ec Submitted by Doug Springer, based on work by
Wolfgang Moser, Ville Voipio, Hannes Weisbach
patch #7486: Patch to add FT2232C/D, FT2232H, FT4232H,
usbvid, usbpid, usbdev for USB support - Based on #7062
* avrftdi.c: New file.
* avrftdi.h: (Ditto.)
* configure.ac: Add check for libftdi.
* config_gram.y: Add AVRFTDI and per-programmer USB string
keywords.
* lexer.l: (Ditto.)
* avrdude.conf.in: Add avrftdi and 2232HIO programmers.
* pgm.h: Add USB parameters.
* Makefile.am: Add avrftdi.c and avrftdi.h.
* AUTHORS: Mention the new authors.
* avrdude.1: Document the changes.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@979 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-25 16:12:30 +00:00