From 741163f927b4e651e4854e75c6fe77a007a3ee24 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Mon, 8 Apr 2024 14:35:11 +0300 Subject: [PATCH] platforms/nuttx/src/px4/nxp/imx9/include/px4_arch/micro_hal.h: Enable GPIO control Signed-off-by: Jukka Laitinen --- .../nuttx/src/px4/nxp/imx9/include/px4_arch/micro_hal.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platforms/nuttx/src/px4/nxp/imx9/include/px4_arch/micro_hal.h b/platforms/nuttx/src/px4/nxp/imx9/include/px4_arch/micro_hal.h index 0afd492776b2..3ba20ade166f 100644 --- a/platforms/nuttx/src/px4/nxp/imx9/include/px4_arch/micro_hal.h +++ b/platforms/nuttx/src/px4/nxp/imx9/include/px4_arch/micro_hal.h @@ -43,6 +43,7 @@ __BEGIN_DECLS #define GPIO_OUTPUT_CLEAR GPIO_OUTPUT_ZERO #include +#include "imx9_gpio.h" /* */ @@ -73,10 +74,10 @@ __BEGIN_DECLS #define px4_i2cbus_initialize(bus_num_1based) NULL //imx9_i2cbus_initialize(PX4_BUS_NUMBER_FROM_PX4(bus_num_1based)) #define px4_i2cbus_uninitialize(pdev) (-1)//imx9_i2cbus_uninitialize(pdev) -#define px4_arch_configgpio(pinset) //imx9_config_gpio(pinset) +#define px4_arch_configgpio(pinset) imx9_config_gpio(pinset) #define px4_arch_unconfiggpio(pinset) -#define px4_arch_gpioread(pinset) //imx9_gpio_read(pinset) -#define px4_arch_gpiowrite(pinset, value) //imx9_gpio_write(pinset, value) +#define px4_arch_gpioread(pinset) imx9_gpio_read(pinset) +#define px4_arch_gpiowrite(pinset, value) imx9_gpio_write(pinset, value) int imx9_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, bool event, xcpt_t func, void *arg);