Commit Graph

16 Commits

Author SHA1 Message Date
Marius Greuel 2bf9eca380 Add support for FTDI devices via D2XX API 2020-03-10 21:41:51 +02:00
joerg_wunsch 5c2c6eaa88 Join the former "public" header files (avr.h avrpart.h pindefs.h
serial.h fileio.h safemode.h update.h pgm_type.h config.h confwin.h
lists.h) into a single header that can be included by anyone wanting
to link against the library.

Adapt everything to cope with this situation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1311 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-05-19 10:01:59 +00:00
joerg_wunsch b835ec2d6e bug #39794: warnings when building avrdude 6.0rc1 under CentOS 6.4
* buspirate.c: Turn the "cmd" argument of the various methods into
a "const unsigned char *"; while doing this, declare all arrays being
passed as arguments to be pointers rather than arrays, as the latter
obfuscates the way arrays are being passed to a callee in C.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1196 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 20:22:53 +00:00
rliebscher 65892fa344 * configure.ac: reactivate check for TYPE_232H, which does not exist in libftdi < 0.20
* avrftdi*.*: changed include check for libftdi/libusb, deactivate 232H if not available
* ft245r.c: changed include check for libftdi/libusb

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1180 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 17:11:35 +00:00
rliebscher e087b21200 * configure.ac: if both found libftdi and libftdi1 use only libftdi1
* avrdude.conf.in: fixed buff pins of avrftdi programmers (low active buffer need now inverted numbers)
	* avrftdi*.*: accept also old libftdi (0.20 still works with it), added powerup to initialize
	* ft245r.c: accept libftdi1, code cleanup and make it more similar to avrfdti (os they might be merged someday)

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1175 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 18:55:19 +00:00
hweisbach fc7b83a267 avrftdi_tpi.[c|h]: integrate avr_tpi_[program_enable,chip_erase]()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1168 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:50:42 +00:00
hweisbach b1eab6f93c avr.c: Adds avr_tpi_program_enable
Generic function enabling external programming on TPI devices. This
function sets the required guard time (which is passed in as parameter),
checks the TPI identification register, writes SKEY command + SKEY, and
finally polls the NVMEN bit in TPISR.

avr.h: Add prototype definitions of avr_tpi_program_enable() and
avr_tpi_chip_erase().
avrftdi_tpi.c: Removes tpi_skey_cmd array, containing the SKEY command
and the SKEY bytes.
tpi.h: Adds tpi_skey_cmd array, containing the SKEY command and the SKEY
bytes, but in the reverse order of tpi_skey.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:49:26 +00:00
hweisbach c8d3302128 avrftdi: Use pgm->setpin instead of pgm->cookie->set_pin
avrftdi.c: remove set_pin init, add pgm->setpin init
avrftdi_private.h: remove avrftdi_t->set_pin member
avrftdi_tpi.c: change avrftdi_t->set_pin calls to pgm->setpin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1163 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:08 +00:00
hweisbach a2ab9c6039 avrftdi_tpi.c: Remove set_pin() to set MOSI high
This is not necessary any more, because the "frame" ends in logic 1, so
the pin is high anyway and the MPSSE keeps the pin value as long as it
is idle. Setting the pin low would cause the TPI physical layer in the
AVR part to detect a collision.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1159 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 13:01:20 +00:00
hweisbach 779538b9af avrftdi_tpi.c: Update I/O to pgm->cmd_tpi
All I/O of avrftdi_tpi is done in terms of pgm->cmd_tpi() calls instead
of calling avrftdi_tpi_[read,write]_byte() functions directly.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1158 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:58:15 +00:00
hweisbach 12ff2d6a20 Adds TPI-support for FTDI-based programmers with MPSSE
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1151 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:00 +00:00
hweisbach 8b4c54e37f avrftdi: Set guard time to fixed 2 bits.
avrftdi_private.h, avrftdi.c: remove pdata->guard_bits refernces, since
they are no longer needed
avrftdi_tpi.c: Use fixed guard time of 2 bits, this gives 16 bits per
frame. tpi_byte2frame() and tpi_frame2byte() functions are now
symmetrical and extraction of received data in avrftdi_read_byte is less
complicted. Write the new guard time to the TPI in
avrftdi_tpi_program_enable().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1150 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:52 +00:00
hweisbach d61242c19c avrftdi_tpi.c: Adds avrftdi_tpi_disable()
In this function the NVM enable bit in TPISR is written to zero, like
described in AVR918. The reset line is released in avrftdi_close().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1149 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:45 +00:00
hweisbach f949c94465 avrftdi_tpi.c: Simplify break command by sending 16 zero bits
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1148 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:37 +00:00
hweisbach fc58b5286b avrftdi_tpi.c: Move to new avrftdi log infrastructure
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1146 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:22 +00:00
hweisbach a29fc23148 Adds initial avrftdi TPI support.
Device identification is possible tested under OS X 10.6.8 with an
FT4232H and ATtiny10.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1145 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:15 +00:00