avr910.c: Removed debugging stuff that is no longer needed.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@397 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Jan-Hinnerk Reichert 2004-01-03 18:18:57 +00:00
parent 83b9e342d3
commit ccd374d056
2 changed files with 4 additions and 57 deletions

View File

@ -1,3 +1,7 @@
2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com>
avr910.c: Removed debugging stuff that is no longer needed.
2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com> 2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com>
doc/TODO: Removed two items. doc/TODO: Removed two items.

View File

@ -41,36 +41,21 @@ extern int do_cycles;
static char has_auto_incr_addr; static char has_auto_incr_addr;
/* These two defines are only for debugging. Will remove them once it starts
working. */
#define show_func_info() \
fprintf(stderr, "%s: line %d: called %s()\n", \
__FILE__, __LINE__, __FUNCTION__)
#define no_show_func_info()
static int avr910_send(PROGRAMMER * pgm, char * buf, size_t len) static int avr910_send(PROGRAMMER * pgm, char * buf, size_t len)
{ {
no_show_func_info();
return serial_send(pgm->fd, buf, len); return serial_send(pgm->fd, buf, len);
} }
static int avr910_recv(PROGRAMMER * pgm, char * buf, size_t len) static int avr910_recv(PROGRAMMER * pgm, char * buf, size_t len)
{ {
no_show_func_info();
return serial_recv(pgm->fd, buf, len); return serial_recv(pgm->fd, buf, len);
} }
static int avr910_drain(PROGRAMMER * pgm, int display) static int avr910_drain(PROGRAMMER * pgm, int display)
{ {
no_show_func_info();
return serial_drain(pgm->fd, display); return serial_drain(pgm->fd, display);
} }
@ -90,8 +75,6 @@ static void avr910_vfy_cmd_sent(PROGRAMMER * pgm, char * errmsg)
static int avr910_rdy_led(PROGRAMMER * pgm, int value) static int avr910_rdy_led(PROGRAMMER * pgm, int value)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return 0; return 0;
@ -100,8 +83,6 @@ static int avr910_rdy_led(PROGRAMMER * pgm, int value)
static int avr910_err_led(PROGRAMMER * pgm, int value) static int avr910_err_led(PROGRAMMER * pgm, int value)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return 0; return 0;
@ -110,8 +91,6 @@ static int avr910_err_led(PROGRAMMER * pgm, int value)
static int avr910_pgm_led(PROGRAMMER * pgm, int value) static int avr910_pgm_led(PROGRAMMER * pgm, int value)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return 0; return 0;
@ -120,8 +99,6 @@ static int avr910_pgm_led(PROGRAMMER * pgm, int value)
static int avr910_vfy_led(PROGRAMMER * pgm, int value) static int avr910_vfy_led(PROGRAMMER * pgm, int value)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return 0; return 0;
@ -133,8 +110,6 @@ static int avr910_vfy_led(PROGRAMMER * pgm, int value)
*/ */
static int avr910_chip_erase(PROGRAMMER * pgm, AVRPART * p) static int avr910_chip_erase(PROGRAMMER * pgm, AVRPART * p)
{ {
no_show_func_info();
avr910_send(pgm, "e", 1); avr910_send(pgm, "e", 1);
avr910_vfy_cmd_sent(pgm, "chip erase"); avr910_vfy_cmd_sent(pgm, "chip erase");
@ -161,8 +136,6 @@ static void avr910_leave_prog_mode(PROGRAMMER * pgm)
*/ */
static int avr910_program_enable(PROGRAMMER * pgm, AVRPART * p) static int avr910_program_enable(PROGRAMMER * pgm, AVRPART * p)
{ {
no_show_func_info();
return -1; return -1;
} }
@ -172,8 +145,6 @@ static int avr910_program_enable(PROGRAMMER * pgm, AVRPART * p)
*/ */
static void avr910_powerup(PROGRAMMER * pgm) static void avr910_powerup(PROGRAMMER * pgm)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return; return;
@ -185,8 +156,6 @@ static void avr910_powerup(PROGRAMMER * pgm)
*/ */
static void avr910_powerdown(PROGRAMMER * pgm) static void avr910_powerdown(PROGRAMMER * pgm)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return; return;
@ -206,8 +175,6 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
unsigned char c; unsigned char c;
int dev_supported = 0; int dev_supported = 0;
no_show_func_info();
/* Get the programmer identifier. Programmer returns exactly 7 chars /* Get the programmer identifier. Programmer returns exactly 7 chars
_without_ the null.*/ _without_ the null.*/
@ -279,8 +246,6 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
static int avr910_save(PROGRAMMER * pgm) static int avr910_save(PROGRAMMER * pgm)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return 0; return 0;
@ -289,8 +254,6 @@ static int avr910_save(PROGRAMMER * pgm)
static void avr910_restore(PROGRAMMER * pgm) static void avr910_restore(PROGRAMMER * pgm)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return; return;
@ -299,8 +262,6 @@ static void avr910_restore(PROGRAMMER * pgm)
static void avr910_disable(PROGRAMMER * pgm) static void avr910_disable(PROGRAMMER * pgm)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return; return;
@ -309,8 +270,6 @@ static void avr910_disable(PROGRAMMER * pgm)
static void avr910_enable(PROGRAMMER * pgm) static void avr910_enable(PROGRAMMER * pgm)
{ {
no_show_func_info();
/* Do nothing. */ /* Do nothing. */
return; return;
@ -326,8 +285,6 @@ static int avr910_cmd(PROGRAMMER * pgm, unsigned char cmd[4],
{ {
unsigned char buf[5]; unsigned char buf[5];
no_show_func_info();
/* FIXME: Insert version check here */ /* FIXME: Insert version check here */
buf[0] = '.'; /* New Universal Command */ buf[0] = '.'; /* New Universal Command */
@ -350,8 +307,6 @@ static int avr910_cmd(PROGRAMMER * pgm, unsigned char cmd[4],
static void avr910_open(PROGRAMMER * pgm, char * port) static void avr910_open(PROGRAMMER * pgm, char * port)
{ {
no_show_func_info();
strcpy(pgm->port, port); strcpy(pgm->port, port);
pgm->fd = serial_open(port, 19200); pgm->fd = serial_open(port, 19200);
@ -363,8 +318,6 @@ static void avr910_open(PROGRAMMER * pgm, char * port)
static void avr910_close(PROGRAMMER * pgm) static void avr910_close(PROGRAMMER * pgm)
{ {
no_show_func_info();
avr910_leave_prog_mode(pgm); avr910_leave_prog_mode(pgm);
serial_close(pgm->fd); serial_close(pgm->fd);
@ -374,8 +327,6 @@ static void avr910_close(PROGRAMMER * pgm)
static void avr910_display(PROGRAMMER * pgm, char * p) static void avr910_display(PROGRAMMER * pgm, char * p)
{ {
no_show_func_info();
return; return;
} }
@ -412,8 +363,6 @@ static int avr910_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
{ {
unsigned char cmd[2]; unsigned char cmd[2];
no_show_func_info();
if (strcmp(m->desc, "flash") == 0) { if (strcmp(m->desc, "flash") == 0) {
if (addr & 0x01) { if (addr & 0x01) {
cmd[0] = 'C'; /* Write Program Mem high byte */ cmd[0] = 'C'; /* Write Program Mem high byte */
@ -492,8 +441,6 @@ static int avr910_read_byte_eeprom(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
static int avr910_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, static int avr910_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned long addr, unsigned char * value) unsigned long addr, unsigned char * value)
{ {
no_show_func_info();
if (strcmp(m->desc, "flash") == 0) { if (strcmp(m->desc, "flash") == 0) {
return avr910_read_byte_flash(pgm, p, m, addr, value); return avr910_read_byte_flash(pgm, p, m, addr, value);
} }
@ -662,8 +609,6 @@ static int avr910_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
static int avr910_read_sig_bytes(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m) static int avr910_read_sig_bytes(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m)
{ {
no_show_func_info();
if (m->size < 3) { if (m->size < 3) {
fprintf(stderr, "%s: memsize too small for sig byte read", progname); fprintf(stderr, "%s: memsize too small for sig byte read", progname);
return -1; return -1;
@ -678,8 +623,6 @@ static int avr910_read_sig_bytes(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m)
void avr910_initpgm(PROGRAMMER * pgm) void avr910_initpgm(PROGRAMMER * pgm)
{ {
no_show_func_info();
strcpy(pgm->type, "avr910"); strcpy(pgm->type, "avr910");
/* /*