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@1098 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
23326f0ebe
commit
5aaecc6ae7
|
@ -1,3 +1,8 @@
|
||||||
|
2012-07-29 Hannes Weisbach <hannes_weisbach@gmx.net>
|
||||||
|
|
||||||
|
* avrftdi.c: bugfixes (synchronisation) and maintenance (paged programming,
|
||||||
|
nicer output, separation of parameter checking and actual code)
|
||||||
|
|
||||||
2012-07-25 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2012-07-25 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
* jtagmkII.c (jtagmkII_memtype): return MTYPE_FLASH rather than
|
* jtagmkII.c (jtagmkII_memtype): return MTYPE_FLASH rather than
|
||||||
|
|
1168
avrdude/avrftdi.c
1168
avrdude/avrftdi.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue