pkarashchenko commented on code in PR #8707:
URL: https://github.com/apache/nuttx/pull/8707#discussion_r1125441003
##########
arch/arm/src/imx6/imx_gpio.c:
##########
@@ -542,16 +544,25 @@ int imx_config_gpio(gpio_pinset_t pinset)
}
break;
- case GPIO_PERIPH:
- {
- /* Configure the pin as a peripheral */
-
- ret = imx_gpio_configperiph(pinset);
- }
- break;
-
default:
- ret = -EINVAL;
+
+ /* Workaround for:
+ * chip/imx_gpio.c:545:7: error: case label does not reduce to an
+ * integer constant
+ * 545 | case GPIO_PERIPH:
+ * | ^~~~
+ */
+
+ if (pinset == GPIO_PERIPH)
Review Comment:
I will try it out. The first glance seems like this is because only bit 31
is set, but I'm not aware of such limitations in C.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]