This commit is contained in:
iceman1001 2024-01-23 15:28:50 +01:00
commit 081ff216eb
12 changed files with 123 additions and 110 deletions

View file

@ -95,24 +95,24 @@ static uint32_t flash_size_from_cidr(uint32_t cidr) {
case 0:
return 0;
case 1:
return 8*1024;
return 8 * 1024;
case 2:
return 16*1024;
return 16 * 1024;
case 3:
return 32*1024;
return 32 * 1024;
case 5:
return 64*1024;
return 64 * 1024;
case 7:
return 128*1024;
return 128 * 1024;
case 9:
return 256*1024;
return 256 * 1024;
case 10:
return 512*1024;
return 512 * 1024;
case 12:
return 1024*1024;
return 1024 * 1024;
case 14:
default: // for 'reserved' values, guess 2MB
return 2048*1024;
return 2048 * 1024;
}
}
@ -188,7 +188,7 @@ static void UsbPacketReceived(uint8_t *packet) {
base = NULL;
// Boundary check against end of addressable space.
if (offset > 0)
count=MIN(count, -offset);
count = MIN(count, -offset);
}
if (isok) {