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
This commit is contained in:
rliebscher 2012-02-06 19:41:36 +00:00
parent b5bef35538
commit 01359e24bb
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2012-02-06 Rene Liebscher <R.Liebscher@gmx.de>
patch #7720 Bug in EEPROM write
* avrftdi.c: fixed wrong buffer address initialization in paged_write
* fileio.c: added #include <stdint.h>
2012-02-05 Rene Liebscher <R.Liebscher@gmx.de> 2012-02-05 Rene Liebscher <R.Liebscher@gmx.de>
bug #30559 Ft232 bit-bang support bug #30559 Ft232 bit-bang support

View File

@ -736,7 +736,7 @@ static int avrftdi_eeprom_write(PROGRAMMER *pgm, AVRPART *p, AVRMEM *m,
unsigned int page_size, unsigned int addr, unsigned int len) unsigned int page_size, unsigned int addr, unsigned int len)
{ {
unsigned char cmd[4]; unsigned char cmd[4];
unsigned char *data = m->buf; unsigned char *data = &m->buf[addr];
unsigned int add; unsigned int add;
avr_set_bits(m->op[AVR_OP_WRITE], cmd); avr_set_bits(m->op[AVR_OP_WRITE], cmd);

View File

@ -27,6 +27,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
#include <stdint.h>
#ifdef HAVE_LIBELF #ifdef HAVE_LIBELF
#include <libelf.h> #include <libelf.h>