Skip to content

Commit a8247b1

Browse files
committed
Fix shadow warning - parameter byte shadows typedef uint8_t byte;
1 parent d136bce commit a8247b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp32/Esp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ FlashMode_t EspClass::getFlashChipMode(void) {
378378
}
379379
#endif // if !defined(CONFIG_IDF_TARGET_ESP32P4)
380380

381-
uint32_t EspClass::magicFlashChipSize(uint8_t byte) {
381+
uint32_t EspClass::magicFlashChipSize(uint8_t octet) {
382382
/*
383383
FLASH_SIZES = {
384384
"1MB": 0x00,
@@ -391,7 +391,7 @@ uint32_t EspClass::magicFlashChipSize(uint8_t byte) {
391391
"128MB": 0x70,
392392
}
393393
*/
394-
switch (byte & 0x0F) {
394+
switch (octet & 0x0F) {
395395
case 0x0: return (1_MB); // 8 MBit (1MB)
396396
case 0x1: return (2_MB); // 16 MBit (2MB)
397397
case 0x2: return (4_MB); // 32 MBit (4MB)

0 commit comments

Comments
 (0)