This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1d57ed780710cbc4646e4b543e9a36aac576c890 Author: Ville Juven <ville.ju...@unikie.com> AuthorDate: Tue Feb 25 15:45:30 2025 +0200 arch/mcx-nxxx: Add GPIO port 0 The port numbers go from 0-7 (and up) for this architecture; port 0 was missing. --- arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h | 27 ++++++++++++++------------- arch/arm/src/mcx-nxxx/nxxx_gpio.h | 1 + 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h b/arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h index b520072e7b..c9d0a9d78c 100644 --- a/arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h +++ b/arch/arm/src/mcx-nxxx/hardware/nxxx_gpio.h @@ -39,19 +39,20 @@ * Pre-processor Definitions ****************************************************************************/ -#define GPIO1 0 /* Port 1 index */ -#define GPIO2 1 /* Port 2 index */ -#define GPIO3 2 /* Port 3 index */ -#define GPIO4 3 /* Port 4 index */ -#define GPIO5 4 /* Port 5 index */ -#define GPIO6 5 /* Port 6 index */ -#define GPIO7 6 /* Port 7 index */ -#define GPIO8 7 /* Port 8 index */ -#define GPIO9 8 /* Port 9 index */ -#define GPIO10 9 /* Port 10 index */ -#define GPIO11 10 /* Port 11 index */ -#define GPIO12 11 /* Port 12 index */ -#define GPIO13 12 /* Port 13 index */ +#define GPIO0 0 /* Port 0 index */ +#define GPIO1 1 /* Port 1 index */ +#define GPIO2 2 /* Port 2 index */ +#define GPIO3 3 /* Port 3 index */ +#define GPIO4 4 /* Port 4 index */ +#define GPIO5 5 /* Port 5 index */ +#define GPIO6 6 /* Port 6 index */ +#define GPIO7 7 /* Port 7 index */ +#define GPIO8 8 /* Port 8 index */ +#define GPIO9 9 /* Port 9 index */ +#define GPIO10 10 /* Port 10 index */ +#define GPIO11 11 /* Port 11 index */ +#define GPIO12 12 /* Port 12 index */ +#define GPIO13 13 /* Port 13 index */ #define NXXX_GPIO_NPINS 32 /* Up to 32 pins per port */ diff --git a/arch/arm/src/mcx-nxxx/nxxx_gpio.h b/arch/arm/src/mcx-nxxx/nxxx_gpio.h index c938dece9b..5b2594bbc7 100644 --- a/arch/arm/src/mcx-nxxx/nxxx_gpio.h +++ b/arch/arm/src/mcx-nxxx/nxxx_gpio.h @@ -110,6 +110,7 @@ #define GPIO_PORT_SHIFT (5) /* Bits 5-8: GPIO port index */ #define GPIO_PORT_MASK (0xf << GPIO_PORT_SHIFT) +# define GPIO_PORT0 (GPIO0 << GPIO_PORT_SHIFT) /* GPIO0 */ # define GPIO_PORT1 (GPIO1 << GPIO_PORT_SHIFT) /* GPIO1 */ # define GPIO_PORT2 (GPIO2 << GPIO_PORT_SHIFT) /* GPIO2 */ # define GPIO_PORT3 (GPIO3 << GPIO_PORT_SHIFT) /* GPIO3 */