Merge pull request #1101 from MCUdude/avr109-fix
Fix avr109 extended address
This commit is contained in:
commit
59a191ee2c
|
@ -405,6 +405,7 @@ static void butterfly_display(const PROGRAMMER *pgm, const char *p) {
|
|||
|
||||
|
||||
static void butterfly_set_addr(const PROGRAMMER *pgm, unsigned long addr) {
|
||||
if( addr < 0x10000 ) {
|
||||
char cmd[3];
|
||||
|
||||
cmd[0] = 'A';
|
||||
|
@ -413,6 +414,17 @@ static void butterfly_set_addr(const PROGRAMMER *pgm, unsigned long addr) {
|
|||
|
||||
butterfly_send(pgm, cmd, sizeof(cmd));
|
||||
butterfly_vfy_cmd_sent(pgm, "set addr");
|
||||
} else {
|
||||
char cmd[4];
|
||||
|
||||
cmd[0] = 'H';
|
||||
cmd[1] = (addr >> 16) & 0xff;
|
||||
cmd[2] = (addr >> 8) & 0xff;
|
||||
cmd[3] = addr & 0xff;
|
||||
|
||||
butterfly_send(pgm, cmd, sizeof(cmd));
|
||||
butterfly_vfy_cmd_sent(pgm, "set extaddr");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue