You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2021/07/14 11:11:58 UTC
[mynewt-core] 02/02: hw/ipc_nrf5340: Fix enabling multiple GPIOs
passed to network core #2623
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 4faf524bb113c4738b9db30001955f69c34de102
Author: Niklas Casaril <ni...@casaril.com>
AuthorDate: Thu Jun 24 10:29:54 2021 +1000
hw/ipc_nrf5340: Fix enabling multiple GPIOs passed to network core #2623
---
hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index a44f267..b0d7da8 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -155,6 +155,11 @@ ipc_nrf5340_isr(void)
os_trace_isr_exit();
}
+/* Below is to unmangle comma separated GPIO pins from MYNEWT_VAL */
+#define _Args(...) __VA_ARGS__
+#define STRIP_PARENS(X) X
+#define UNMANGLE_MYNEWT_VAL(X) STRIP_PARENS(_Args X)
+
void
ipc_nrf5340_init(void)
{
@@ -162,7 +167,7 @@ ipc_nrf5340_init(void)
#if MYNEWT_VAL(MCU_APP_CORE)
#if MYNEWT_VAL(IPC_NRF5340_NET_GPIO)
- unsigned int gpios[] = { MYNEWT_VAL(IPC_NRF5340_NET_GPIO) };
+ unsigned int gpios[] = { UNMANGLE_MYNEWT_VAL(MYNEWT_VAL(IPC_NRF5340_NET_GPIO)) };
NRF_GPIO_Type *nrf_gpio;
#endif