Skip to content

Commit

Permalink
fix(rp2040): remove duplicate line of code
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Aug 4, 2021
1 parent 0f83c84 commit 281d6c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rp2040.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ export class RP2040 {
}

readUint32(address: number) {
address = address >>> 0;
const { bootrom } = this;
address = address >>> 0; // round to 32-bits, unsigned
if (address & 0x3) {
this.logger.error(
LOG_NAME,
`read from address ${address.toString(16)}, which is not 32 bit aligned`
);
}
address = address >>> 0; // round to 32-bits, unsigned

const { bootrom } = this;
if (address < bootrom.length * 4) {
return bootrom[address / 4];
} else if (address >= FLASH_START_ADDRESS && address < FLASH_END_ADDRESS) {
Expand Down

0 comments on commit 281d6c1

Please sign in to comment.