* avr910.c, pgm.c, pgm.h, config_gram.y, lexer.l: Add new configuration parameter baudrate to support avr910-programmers with non-standard baudrates
* avrdude.conf.in, doc/avrdude.texi: Added "baudrate" to documentation. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@398 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
f77891017e
commit
c7442f9f91
|
@ -1,3 +1,10 @@
|
||||||
|
2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com>
|
||||||
|
|
||||||
|
* avr910.c, pgm.c, pgm.h, config_gram.y, lexer.l: Add new configuration
|
||||||
|
parameter baudrate to support avr910-programmers with non-standard
|
||||||
|
baudrates
|
||||||
|
* avrdude.conf.in, doc/avrdude.texi: Added "baudrate" to documentation.
|
||||||
|
|
||||||
2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com>
|
2004-01-03 Jan-Hinnerk Reichert <hinni@despammed.com>
|
||||||
|
|
||||||
avr910.c: Removed debugging stuff that is no longer needed.
|
avr910.c: Removed debugging stuff that is no longer needed.
|
||||||
|
|
|
@ -307,8 +307,15 @@ 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)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* If baudrate was not specified use 19.200 Baud
|
||||||
|
*/
|
||||||
|
if(pgm->baudrate == 0) {
|
||||||
|
pgm->baudrate = 19200;
|
||||||
|
}
|
||||||
|
|
||||||
strcpy(pgm->port, port);
|
strcpy(pgm->port, port);
|
||||||
pgm->fd = serial_open(port, 19200);
|
pgm->fd = serial_open(port, pgm->baudrate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* drain any extraneous input
|
* drain any extraneous input
|
||||||
|
|
|
@ -13,18 +13,19 @@
|
||||||
# Possible entry formats are:
|
# Possible entry formats are:
|
||||||
#
|
#
|
||||||
# programmer
|
# programmer
|
||||||
# id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
|
# id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
|
||||||
# desc = <description> ; # quoted string
|
# desc = <description> ; # quoted string
|
||||||
# type = par | stk500 | avr910; # programmer type
|
# type = par | stk500 | avr910; # programmer type
|
||||||
# vcc = <num1> [, <num2> ... ] ; # pin number(s)
|
# baudrate = <num> ; # baudrate for avr910-programmer
|
||||||
# reset = <num> ; # pin number
|
# vcc = <num1> [, <num2> ... ] ; # pin number(s)
|
||||||
# sck = <num> ; # pin number
|
# reset = <num> ; # pin number
|
||||||
# mosi = <num> ; # pin number
|
# sck = <num> ; # pin number
|
||||||
# miso = <num> ; # pin number
|
# mosi = <num> ; # pin number
|
||||||
# errled = <num> ; # pin number
|
# miso = <num> ; # pin number
|
||||||
# rdyled = <num> ; # pin number
|
# errled = <num> ; # pin number
|
||||||
# pgmled = <num> ; # pin number
|
# rdyled = <num> ; # pin number
|
||||||
# vfyled = <num> ; # pin number
|
# pgmled = <num> ; # pin number
|
||||||
|
# vfyled = <num> ; # pin number
|
||||||
# ;
|
# ;
|
||||||
#
|
#
|
||||||
# part
|
# part
|
||||||
|
|
|
@ -65,6 +65,7 @@ static int parse_cmdbits(OPCODE * op);
|
||||||
%token K_PAGE_SIZE
|
%token K_PAGE_SIZE
|
||||||
%token K_PAGED
|
%token K_PAGED
|
||||||
|
|
||||||
|
%token K_BAUDRATE
|
||||||
%token K_BS2
|
%token K_BS2
|
||||||
%token K_BUFF
|
%token K_BUFF
|
||||||
%token K_CHIP_ERASE_DELAY
|
%token K_CHIP_ERASE_DELAY
|
||||||
|
@ -358,6 +359,12 @@ prog_parm :
|
||||||
}
|
}
|
||||||
} |
|
} |
|
||||||
|
|
||||||
|
K_BAUDRATE TKN_EQUAL TKN_NUMBER {
|
||||||
|
{
|
||||||
|
current_prog->baudrate = $3->value.number;
|
||||||
|
}
|
||||||
|
} |
|
||||||
|
|
||||||
K_RESET TKN_EQUAL TKN_NUMBER { free_token($1);
|
K_RESET TKN_EQUAL TKN_NUMBER { free_token($1);
|
||||||
assign_pin(PIN_AVR_RESET, $3); } |
|
assign_pin(PIN_AVR_RESET, $3); } |
|
||||||
K_SCK TKN_EQUAL TKN_NUMBER { free_token($1);
|
K_SCK TKN_EQUAL TKN_NUMBER { free_token($1);
|
||||||
|
|
|
@ -940,17 +940,18 @@ The format of the programmer definition is as follows:
|
||||||
@example
|
@example
|
||||||
programmer
|
programmer
|
||||||
id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
|
id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
|
||||||
desc = <description> ; # quoted string
|
desc = <description> ; # quoted string
|
||||||
type = par | stk500 ; # programmer type
|
type = par | stk500 ; # programmer type
|
||||||
vcc = <num1> [, <num2> ... ] ; # pin number(s)
|
baudrate = <num> ; # baudrate for avr910
|
||||||
reset = <num> ; # pin number
|
vcc = <num1> [, <num2> ... ] ; # pin number(s)
|
||||||
sck = <num> ; # pin number
|
reset = <num> ; # pin number
|
||||||
mosi = <num> ; # pin number
|
sck = <num> ; # pin number
|
||||||
miso = <num> ; # pin number
|
mosi = <num> ; # pin number
|
||||||
errled = <num> ; # pin number
|
miso = <num> ; # pin number
|
||||||
rdyled = <num> ; # pin number
|
errled = <num> ; # pin number
|
||||||
pgmled = <num> ; # pin number
|
rdyled = <num> ; # pin number
|
||||||
vfyled = <num> ; # pin number
|
pgmled = <num> ; # pin number
|
||||||
|
vfyled = <num> ; # pin number
|
||||||
;
|
;
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@ SIGN [+-]
|
||||||
|
|
||||||
bank_size { yylval=NULL; return K_PAGE_SIZE; }
|
bank_size { yylval=NULL; return K_PAGE_SIZE; }
|
||||||
banked { yylval=NULL; return K_PAGED; }
|
banked { yylval=NULL; return K_PAGED; }
|
||||||
|
baudrate { yylval=NULL; return K_BAUDRATE; }
|
||||||
bs2 { yylval=NULL; return K_BS2; }
|
bs2 { yylval=NULL; return K_BS2; }
|
||||||
buff { yylval=NULL; return K_BUFF; }
|
buff { yylval=NULL; return K_BUFF; }
|
||||||
chip_erase_delay { yylval=NULL; return K_CHIP_ERASE_DELAY; }
|
chip_erase_delay { yylval=NULL; return K_CHIP_ERASE_DELAY; }
|
||||||
|
|
|
@ -57,6 +57,7 @@ PROGRAMMER * pgm_new(void)
|
||||||
pgm->type[0] = 0;
|
pgm->type[0] = 0;
|
||||||
pgm->config_file[0] = 0;
|
pgm->config_file[0] = 0;
|
||||||
pgm->lineno = 0;
|
pgm->lineno = 0;
|
||||||
|
pgm->baudrate = 0;
|
||||||
|
|
||||||
for (i=0; i<N_PINS; i++)
|
for (i=0; i<N_PINS; i++)
|
||||||
pgm->pinno[i] = 0;
|
pgm->pinno[i] = 0;
|
||||||
|
|
|
@ -42,6 +42,7 @@ typedef struct programmer_t {
|
||||||
char port[PGM_PORTLEN];
|
char port[PGM_PORTLEN];
|
||||||
unsigned int pinno[N_PINS];
|
unsigned int pinno[N_PINS];
|
||||||
int ppidata;
|
int ppidata;
|
||||||
|
int baudrate;
|
||||||
int fd;
|
int fd;
|
||||||
int page_size; /* page size if the programmer supports paged write/load */
|
int page_size; /* page size if the programmer supports paged write/load */
|
||||||
int (*rdy_led) (struct programmer_t * pgm, int value);
|
int (*rdy_led) (struct programmer_t * pgm, int value);
|
||||||
|
|
Loading…
Reference in New Issue