diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-04-04 16:54:53 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-04-04 16:54:53 -0600 |
commit | 1da066ece5f7247269b47cd6194b1aeeb4c44088 (patch) | |
tree | 544a89cd92865e24a07354fbcac7fb45b2e009e4 /nuttx/arch | |
parent | 1f5fe9e8388bbe15779a08b8eddb52951072983d (diff) | |
download | px4-nuttx-1da066ece5f7247269b47cd6194b1aeeb4c44088.tar.gz px4-nuttx-1da066ece5f7247269b47cd6194b1aeeb4c44088.tar.bz2 px4-nuttx-1da066ece5f7247269b47cd6194b1aeeb4c44088.zip |
SAMV7: Fix a errort in GPIO bit encoding. Correct naming of a variable
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/samv7/sam_gpio.c | 2 | ||||
-rwxr-xr-x | nuttx/arch/arm/src/samv7/sam_gpio.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/samv7/sam_gpio.c b/nuttx/arch/arm/src/samv7/sam_gpio.c index 7cd338eb4..99f894617 100644 --- a/nuttx/arch/arm/src/samv7/sam_gpio.c +++ b/nuttx/arch/arm/src/samv7/sam_gpio.c @@ -89,7 +89,7 @@ static const char g_portchar[SAMV7_NPIO] = * Public Data ****************************************************************************/ -const uintptr_t g_portchar[SAMV7_NPIO] = +const uintptr_t g_portbase[SAMV7_NPIO] = { SAM_PIOA_BASE #if SAMV7_NPIO > 1 diff --git a/nuttx/arch/arm/src/samv7/sam_gpio.h b/nuttx/arch/arm/src/samv7/sam_gpio.h index 89ff23e10..4b5b6f520 100755 --- a/nuttx/arch/arm/src/samv7/sam_gpio.h +++ b/nuttx/arch/arm/src/samv7/sam_gpio.h @@ -130,7 +130,7 @@ * .... .... .... .... .... PPP. .... */ -#define GPIO_PORT_SHIFT (5) /* Bit 5-6: Port number */ +#define GPIO_PORT_SHIFT (5) /* Bit 5-7: Port number */ #define GPIO_PORT_MASK (7 << GPIO_PORT_SHIFT) # define GPIO_PORT_PIOA (0 << GPIO_PORT_SHIFT) # define GPIO_PORT_PIOB (1 << GPIO_PORT_SHIFT) @@ -201,7 +201,7 @@ extern "C" #define EXTERN extern #endif -EXTERN const uintptr_t g_portchar[SAMV7_NPIO]; +EXTERN const uintptr_t g_portbase[SAMV7_NPIO]; /************************************************************************************ * Inline Functions @@ -219,7 +219,7 @@ static inline uintptr_t sam_gpio_base(gpio_pinset_t cfgset) { int port = (cfgset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; DEBUGASSERT(port <SAMV7_NPIO); - return g_portchar[port]; + return g_portbase[port]; } /**************************************************************************** |