Skip to content

Commit de7fb16

Browse files
committed
Fix ui32GPCfgShft used uninitialized
1 parent ab1bab9 commit de7fb16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/arduino/ard_sup/gpio/ap3_gpio.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ uint32_t ap3_gpio_enable_interrupts(uint32_t ui32Pin, uint32_t eIntDir)
305305
uint32_t ui32GPCfgClearMask;
306306
uint32_t ui32GPCfgShft;
307307

308+
ui32GPCfgShft = ((ui32Pin & 0x7) << 2);
309+
308310
ui32GPCfgAddr = AM_REGADDR(GPIO, CFGA) + ((ui32Pin >> 1) & ~0x3);
309311

310312
ui32GPCfgClearMask = ~((uint32_t)0xF << ui32GPCfgShft);

0 commit comments

Comments
 (0)