diff options
Diffstat (limited to 'nuttx/arch/arm/src/lm3s/lm3s_gpio.c')
-rw-r--r-- | nuttx/arch/arm/src/lm3s/lm3s_gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_gpio.c b/nuttx/arch/arm/src/lm3s/lm3s_gpio.c index 891a2fdb0..d289022a9 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_gpio.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_gpio.c @@ -789,7 +789,7 @@ void lm3s_gpiowrite(uint32 pinset, boolean value) * "... All bits are cleared by a reset." */ - putreg32((uint32)value << pinno, base + LM3S_GPIO_DATA_OFFSET + (pinno << 2)); + putreg32((uint32)value << pinno, base + LM3S_GPIO_DATA_OFFSET + (1 << (pinno + 2))); } /**************************************************************************** @@ -828,5 +828,5 @@ boolean lm3s_gpioread(uint32 pinset, boolean value) * are cleared by a reset." */ - return (getreg32(base + LM3S_GPIO_DATA_OFFSET + (pinno << 2)) != 0); + return (getreg32(base + LM3S_GPIO_DATA_OFFSET + (1 << (pinno + 2))) != 0); }
\ No newline at end of file |