diff --git a/subsys/ipc/ipc_service/Kconfig b/subsys/ipc/ipc_service/Kconfig index 33dfe681057..8090612f928 100644 --- a/subsys/ipc/ipc_service/Kconfig +++ b/subsys/ipc/ipc_service/Kconfig @@ -12,6 +12,7 @@ menuconfig IPC_SERVICE if IPC_SERVICE rsource "backends/Kconfig" +rsource "lib/Kconfig" module = IPC_SERVICE module-str = IPC service and backend diff --git a/subsys/ipc/ipc_service/backends/Kconfig b/subsys/ipc/ipc_service/backends/Kconfig index 4b8d5d16f54..8a7683bc76c 100644 --- a/subsys/ipc/ipc_service/backends/Kconfig +++ b/subsys/ipc/ipc_service/backends/Kconfig @@ -48,54 +48,5 @@ config IPC_SERVICE_BACKEND_ICMSG_ME_FOLLOWER on circular packet buffer. This enables enpoint discovery follower role. -config IPC_SERVICE_RPMSG - bool "RPMsg support library" - help - "RPMsg library" - -config IPC_SERVICE_STATIC_VRINGS - bool "Static VRINGs support library" - help - "Static VRINGs library" - -config IPC_SERVICE_STATIC_VRINGS_ALIGNMENT - int "VRINGs alignment" - depends on IPC_SERVICE_STATIC_VRINGS - default 4 - help - Static VRINGs alignment - -config IPC_SERVICE_ICMSG - bool - select SPSC_PBUF - select SPSC_PBUF_USE_CACHE - help - Icmsg library - -config IPC_SERVICE_ICMSG_CB_BUF_SIZE - int "Size of callback buffer size" - depends on IPC_SERVICE_ICMSG - range 1 65535 - default 255 - help - Size of callback buffer used for processing received data in work - queue thread. If you are sure that your application never sends data - data bigger than some size, you can safely change this option to - reduce RAM consumption in your application. - -# The Icmsg library in its simplicity requires the system workqueue to execute -# at a cooperative priority. -config SYSTEM_WORKQUEUE_PRIORITY - depends on IPC_SERVICE_ICMSG - range -256 -1 - -config IPC_SERVICE_BACKEND_ICMSG_BOND_NOTIFY_REPEAT_TO_MS - int "Bond notification timeout in miliseconds" - range 1 100 - default 1 - help - Time to wait for remote bonding notification before the - notification is repeated. - rsource "Kconfig.icmsg_me" rsource "Kconfig.rpmsg" diff --git a/subsys/ipc/ipc_service/lib/Kconfig b/subsys/ipc/ipc_service/lib/Kconfig new file mode 100644 index 00000000000..44888a38110 --- /dev/null +++ b/subsys/ipc/ipc_service/lib/Kconfig @@ -0,0 +1,30 @@ +# Copyright (c) 2022 Nordic Semiconductor (ASA) +# SPDX-License-Identifier: Apache-2.0 + +config IPC_SERVICE_RPMSG + bool "RPMsg support library" + help + "RPMsg library" + +config IPC_SERVICE_STATIC_VRINGS + bool "Static VRINGs support library" + help + "Static VRINGs library" + +config IPC_SERVICE_STATIC_VRINGS_ALIGNMENT + int "VRINGs alignment" + depends on IPC_SERVICE_STATIC_VRINGS + default 4 + help + Static VRINGs alignment + +menuconfig IPC_SERVICE_ICMSG + bool "icmsg IPC library" + select SPSC_PBUF + select SPSC_PBUF_USE_CACHE + help + Icmsg library + +if IPC_SERVICE_ICMSG + rsource "Kconfig.icmsg" +endif diff --git a/subsys/ipc/ipc_service/lib/Kconfig.icmsg b/subsys/ipc/ipc_service/lib/Kconfig.icmsg new file mode 100644 index 00000000000..850e5aca374 --- /dev/null +++ b/subsys/ipc/ipc_service/lib/Kconfig.icmsg @@ -0,0 +1,25 @@ +# Copyright (c) 2022 Nordic Semiconductor (ASA) +# SPDX-License-Identifier: Apache-2.0 + +config IPC_SERVICE_ICMSG_CB_BUF_SIZE + int "Size of callback buffer size" + range 1 65535 + default 255 + help + Size of callback buffer used for processing received data in work + queue thread. If you are sure that your application never sends data + data bigger than some size, you can safely change this option to + reduce RAM consumption in your application. + +# The Icmsg library in its simplicity requires the system workqueue to execute +# at a cooperative priority. +config SYSTEM_WORKQUEUE_PRIORITY + range -256 -1 + +config IPC_SERVICE_ICMSG_BOND_NOTIFY_REPEAT_TO_MS + int "Bond notification timeout in miliseconds" + range 1 100 + default 1 + help + Time to wait for remote bonding notification before the + notification is repeated. diff --git a/subsys/ipc/ipc_service/lib/icmsg.c b/subsys/ipc/ipc_service/lib/icmsg.c index 583db86aac0..0af0f6e6007 100644 --- a/subsys/ipc/ipc_service/lib/icmsg.c +++ b/subsys/ipc/ipc_service/lib/icmsg.c @@ -12,7 +12,7 @@ #include #define CB_BUF_SIZE CONFIG_IPC_SERVICE_ICMSG_CB_BUF_SIZE -#define BOND_NOTIFY_REPEAT_TO K_MSEC(CONFIG_IPC_SERVICE_BACKEND_ICMSG_BOND_NOTIFY_REPEAT_TO_MS) +#define BOND_NOTIFY_REPEAT_TO K_MSEC(CONFIG_IPC_SERVICE_ICMSG_BOND_NOTIFY_REPEAT_TO_MS) static const uint8_t magic[] = {0x45, 0x6d, 0x31, 0x6c, 0x31, 0x4b, 0x30, 0x72, 0x6e, 0x33, 0x6c, 0x69, 0x34};