The design of the pipe is overly complicated compared to the in-tree and planned future use of the pipe module. The pipe is currently designed to protect against multiple threads calling any API simultaineously. This is not neccesary as only one thread ever calls open/close/transmit/receive at once, while the notification APIs are potentially called by a different thread. This commit removes the synchronization of calls to the open/ close/receive/transmit APIs. It also uses a k_event for thread safe event and state handling instead of a k_mutex and k_condvar. The callback is proteced by a k_sem as it modified using the attach/release APIs, which can be called simultaneously to a thread invoking the callback. Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
101 lines
1.8 KiB
Text
101 lines
1.8 KiB
Text
# Copyright (c) 2023 Trackunit Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menuconfig MODEM_MODULES
|
|
bool "Modem modules"
|
|
select EXPERIMENTAL
|
|
|
|
if MODEM_MODULES
|
|
|
|
config MODEM_CHAT
|
|
bool "Modem chat module"
|
|
select RING_BUFFER
|
|
select MODEM_PIPE
|
|
|
|
if MODEM_CHAT
|
|
|
|
config MODEM_CHAT_LOG_BUFFER_SIZE
|
|
int "Modem chat log buffer size in bytes"
|
|
default 128
|
|
|
|
endif
|
|
|
|
config MODEM_CMUX
|
|
bool "Modem CMUX module"
|
|
select MODEM_PIPE
|
|
select RING_BUFFER
|
|
select EVENTS
|
|
select CRC
|
|
|
|
if MODEM_CMUX
|
|
|
|
config MODEM_CMUX_WORK_BUFFER_SIZE
|
|
int "CMUX module work buffer size in bytes"
|
|
range 16 1500
|
|
default 64
|
|
|
|
module = MODEM_CMUX
|
|
module-str = modem_cmux
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
endif
|
|
|
|
config MODEM_PIPE
|
|
bool "Modem pipe module"
|
|
select EVENTS
|
|
|
|
config MODEM_PIPELINK
|
|
bool "Modem pipelink module"
|
|
depends on MODEM_PIPE
|
|
|
|
config MODEM_PPP
|
|
bool "Modem PPP module"
|
|
depends on NET_L2_PPP
|
|
select MODEM_PIPE
|
|
select RING_BUFFER
|
|
select CRC
|
|
|
|
if MODEM_PPP
|
|
|
|
config MODEM_PPP_NET_BUF_FRAG_SIZE
|
|
int "Network buffer fragment size"
|
|
default NET_BUF_DATA_SIZE if NET_BUF_FIXED_DATA_SIZE
|
|
default 128
|
|
|
|
endif
|
|
|
|
config MODEM_STATS
|
|
bool "Modem statistics"
|
|
depends on SHELL
|
|
help
|
|
Enables modem statistics shell commands which track the usage of
|
|
buffers across the modem modules. The statistics are useful for
|
|
scaling buffer sizes, as these are application specific.
|
|
|
|
config MODEM_STATS_BUFFER_NAME_SIZE
|
|
int "Maximum string size of modem stats buffer name"
|
|
default 32
|
|
range 8 64
|
|
|
|
config MODEM_UBX
|
|
bool "Modem U-BLOX module"
|
|
select RING_BUFFER
|
|
select MODEM_PIPE
|
|
help
|
|
Enable Modem U-BLOX module.
|
|
|
|
if MODEM_UBX
|
|
|
|
config MODEM_UBX_LOG_BUFFER
|
|
int "Modem U-BLOX log buffer size"
|
|
default 128
|
|
|
|
endif
|
|
|
|
module = MODEM_MODULES
|
|
module-str = modem_modules
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
rsource "backends/Kconfig"
|
|
|
|
endif
|