8000 Merge pull request #747 from rkone/patch-2 · rmpalgo/esp32-snippets@8a5a789 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a5a789

Browse files
authored
Merge pull request nkolban#747 from rkone/patch-2
uint8_t < 256 is always true
2 parents 45fcc07 + 0d01a64 commit 8a5a789

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp_utils/MMU.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static uint32_t flashPageToOffset(uint32_t page) {
4747
const uint32_t mappingInvalid = 1 << 8;
4848

4949
printf("PRO CPU MMU\n");
50-
for (uint8_t i = 0; i < 256; i++) {
50+
for (uint16_t i = 0; i < 256; i++) {
5151
if (!(DPORT_PRO_FLASH_MMU_TABLE[i] & mappingInvalid)) {
5252
addressRange_t addressRange = entryNumberToAddressRange(i);
5353
printf("Entry: %2d (0x%8.8x - 0x%8.8x), Page: %d - offset: 0x%x\n",
@@ -59,7 +59,7 @@ static uint32_t flashPageToOffset(uint32_t page) {
5959
}
6060
printf("\n");
6161
printf("APP CPU MMU\n");
62-
for (uint8_t i = 0; i < 256; i++) {
62+
for (uint16_t i = 0; i < 256; i++) {
6363
if (!(DPORT_APP_FLASH_MMU_TABLE[i] & mappingInvalid)) {
6464
addressRange_t addressRange = entryNumberToAddressRange(i);
6565
printf("Entry: %2d (0x%8.8x - 0x%8.8x), Page: %d - offset: 0x%x\n",

0 commit comments

Comments
 (0)
0