mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-21 08:36:29 +03:00
Reformat spacing/comments in src/urclock.c
This commit is contained in:
@@ -390,7 +390,7 @@ static uint16_t rjmp_opcode(int dist, int flashsize) {
|
||||
|
||||
|
||||
// rjmp opcode from reset to bootloader start; same as above if bl start is in top half of flash
|
||||
static uint16_t rjmp_bwd_blstart(int blstart, int flashsize) { // flashsize must be power of 2
|
||||
static uint16_t rjmp_bwd_blstart(int blstart, int flashsize) { // Flashsize must be power of 2
|
||||
return 0xc000 | (((uint16_t)((blstart-flashsize-2)/2)) & 0xfff); // Urboot uses this formula
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ static int set_reset(const PROGRAMMER *pgm, unsigned char *jmptoboot, int vecsz)
|
||||
|
||||
// Called after the input file has been read for writing or verifying flash
|
||||
static int urclock_flash_readhook(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *flm,
|
||||
const char *fname, int size) { // size is max memory address + 1
|
||||
const char *fname, int size) { // Size is max memory address + 1
|
||||
|
||||
int nmdata, maxsize, firstbeg, firstlen;
|
||||
const int vecsz = ur.uP.flashsize <= 8192? 2: 4; // Small parts use rjmp, large a 4-byte jmp
|
||||
@@ -990,7 +990,7 @@ static int urclock_res_check(const PROGRAMMER *pgm, const char *funcname, int ig
|
||||
}
|
||||
|
||||
|
||||
// set ur.uP from mcuid, potentially overwritten by p
|
||||
// Set ur.uP from mcuid, potentially overwritten by p
|
||||
static void set_uP(const PROGRAMMER *pgm, const AVRPART *p, int mcuid, int mcuid_wins) {
|
||||
int idx_m = -1, idx_p = -1;
|
||||
|
||||
@@ -1150,7 +1150,7 @@ static void guessblstart(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||
while(bi < sz) {
|
||||
if(ur_readEF(pgm, p, b128, ur.uP.flashsize-bi-128, 128, 'F') < 0)
|
||||
return;
|
||||
for(int ti=127; ti >= 0; ti--) // read in backwards
|
||||
for(int ti=127; ti >= 0; ti--) // Read in backwards
|
||||
buf[bi++] = b128[ti];
|
||||
}
|
||||
|
||||
@@ -1315,7 +1315,7 @@ static int ur_initstruct(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||
}
|
||||
|
||||
if(ur.boothigh) {
|
||||
if((int8_t) ur.uP.ninterrupts >= 0) // valid range is 0..127
|
||||
if((int8_t) ur.uP.ninterrupts >= 0) // Valid range is 0..127
|
||||
if(ur.xvectornum < -1 || ur.xvectornum > ur.uP.ninterrupts)
|
||||
Return("unknown interrupt vector #%d for vector bootloader -- should be in [-1, %d]",
|
||||
ur.xvectornum, ur.uP.ninterrupts);
|
||||
|
||||
Reference in New Issue
Block a user