SAMV7: Fix a errort in GPIO bit encoding. Correct naming of a variable
This commit is contained in:
parent
77e86521c8
commit
8aeaff1e95
@ -89,7 +89,7 @@ static const char g_portchar[SAMV7_NPIO] =
|
|||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
const uintptr_t g_portchar[SAMV7_NPIO] =
|
const uintptr_t g_portbase[SAMV7_NPIO] =
|
||||||
{
|
{
|
||||||
SAM_PIOA_BASE
|
SAM_PIOA_BASE
|
||||||
#if SAMV7_NPIO > 1
|
#if SAMV7_NPIO > 1
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
* .... .... .... .... .... PPP. ....
|
* .... .... .... .... .... 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_MASK (7 << GPIO_PORT_SHIFT)
|
||||||
# define GPIO_PORT_PIOA (0 << GPIO_PORT_SHIFT)
|
# define GPIO_PORT_PIOA (0 << GPIO_PORT_SHIFT)
|
||||||
# define GPIO_PORT_PIOB (1 << GPIO_PORT_SHIFT)
|
# define GPIO_PORT_PIOB (1 << GPIO_PORT_SHIFT)
|
||||||
@ -201,7 +201,7 @@ extern "C"
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN const uintptr_t g_portchar[SAMV7_NPIO];
|
EXTERN const uintptr_t g_portbase[SAMV7_NPIO];
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Inline Functions
|
* 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;
|
int port = (cfgset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
|
||||||
DEBUGASSERT(port <SAMV7_NPIO);
|
DEBUGASSERT(port <SAMV7_NPIO);
|
||||||
return g_portchar[port];
|
return g_portbase[port];
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user