modem: choice symbol for UART backend
Add a choice symbol that is used to select which UART backend to use. This allows backends that don't use the interrupt API to be implemented. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
a6081eeedf
commit
5228de3af5
|
@ -10,7 +10,7 @@ zephyr_library_sources_ifdef(CONFIG_MODEM_CONTEXT
|
|||
modem_pin.c
|
||||
)
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_MODEM_IFACE_UART modem_iface_uart.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_MODEM_IFACE_UART_INTERRUPT modem_iface_uart_interrupt.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_MODEM_CMD_HANDLER modem_cmd_handler.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_MODEM_SOCKET modem_socket.c)
|
||||
|
||||
|
|
|
@ -64,8 +64,6 @@ config MODEM_CONTEXT_VERBOSE_DEBUG
|
|||
|
||||
config MODEM_IFACE_UART
|
||||
bool "UART-based modem interface"
|
||||
depends on SERIAL_SUPPORT_INTERRUPT
|
||||
select UART_INTERRUPT_DRIVEN
|
||||
select RING_BUFFER
|
||||
help
|
||||
To configure this layer for use, create a modem_iface_uart_data
|
||||
|
@ -73,6 +71,21 @@ config MODEM_IFACE_UART
|
|||
along with the modem_iface reference from your modem_context object
|
||||
and the UART device name.
|
||||
|
||||
if MODEM_IFACE_UART
|
||||
|
||||
choice MODEM_IFACE_UART_BACKEND
|
||||
prompt "UART backend to use for modem interface"
|
||||
default MODEM_IFACE_UART_INTERRUPT
|
||||
|
||||
config MODEM_IFACE_UART_INTERRUPT
|
||||
bool "UART-based modem interface using interrupt API"
|
||||
depends on SERIAL_SUPPORT_INTERRUPT
|
||||
select UART_INTERRUPT_DRIVEN
|
||||
|
||||
endchoice
|
||||
|
||||
endif # MODEM_IFACE_UART
|
||||
|
||||
config MODEM_CMD_HANDLER
|
||||
bool "Generic modem command handler"
|
||||
select NET_BUF
|
||||
|
|
Loading…
Reference in a new issue