* avr910.c, avrpart.c, avrpart.h, doc/TODO: Look up devicecode and report device.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@399 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Jan-Hinnerk Reichert 2004-01-12 22:48:50 +00:00
parent c7442f9f91
commit 1dfa7127da
5 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2004-01-12 Jan-Hinnerk Reichert <hinni@despammed.com>
* avr910.c, avrpart.c, avrpart.h, doc/TODO:
Look up devicecode and report device.
2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com>
* avr910.c, pgm.c, pgm.h, config_gram.y, lexer.l: Add new configuration

View File

@ -174,6 +174,7 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
char type;
unsigned char c;
int dev_supported = 0;
AVRPART * part;
/* Get the programmer identifier. Programmer returns exactly 7 chars
_without_ the null.*/
@ -214,7 +215,9 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
avr910_recv(pgm, &c, 1);
if (c == 0)
break;
fprintf(stderr, " Device code: 0x%02x\n", c);
part = locate_part_by_avr910_devcode(part_list, c);
fprintf(stderr, " Device code: 0x%02x = %s\n", c, part ? part->desc : "(unknown)");
/* FIXME: Need to lookup devcode and report the device. */

View File

@ -418,6 +418,19 @@ AVRPART * locate_part(LISTID parts, char * partdesc)
return NULL;
}
AVRPART * locate_part_by_avr910_devcode(LISTID parts, int devcode)
{
LNODEID ln1;
AVRPART * p = NULL;
for (ln1=lfirst(parts); ln1; ln1=lnext(ln1)) {
p = ldata(ln1);
if (p->avr910_devcode == devcode)
return p;
}
return NULL;
}
void list_parts(FILE * f, char * prefix, LISTID parts)
{

View File

@ -135,6 +135,7 @@ void avr_mem_display(char * prefix, FILE * f, AVRMEM * m, int type,
AVRPART * avr_new_part(void);
AVRPART * avr_dup_part(AVRPART * d);
AVRPART * locate_part(LISTID parts, char * partdesc);
AVRPART * locate_part_by_avr910_devcode(LISTID parts, int devcode);
void list_parts(FILE * f, char * prefix, LISTID parts);
void avr_display(FILE * f, AVRPART * p, char * prefix, int verbose);

View File

@ -15,9 +15,6 @@
- FIXME: term.c: terminal_get_input(): strip newlines in non-readline input
code.
- FIXME: avr910.c: avr910_initialize(): Need to lookup devcode and report the
device.
- FIXME: avr910.c: avr910_cmd(): Insert version check here.
- FIXME: ser_posix.c: serial_close(): Should really restore the terminal to