zephyr/drivers/modem
Marcin Niestroj 1a4cb7e0e3 drivers: modem: add modem_cmd_send_ext()
There are currently modem_cmd_send() and modem_cmd_send_nolock()
functions, each with slightly different behavior regarding acquiring (or
not) sem_tx_lock. Introduce a generic function that will allow caller to
select behavior using flags.

While at it, add possibility to disable setting and unsetting command
handlers. This will be useful in situations when there are multiple
replies expected one after the other coming as a response to single
command. This is the case for example with ESP-AT driver, which expects
following data as response to AT+CIPSEND command:

  OK
  >

where 'OK' is handled by static CMD_RESP (so releasing response
semaphore right away), while '>' is handled by dynamic
CMD_HANDLER (which is releasing another semaphore). Keeping command
handlers in place allows to receive '>' without race condition because
of small period of time where command handlers are not set.

Convert modem_cmd_send_nolock() and modem_cmd_send() to static inline
functions, as they are just a specific invocation of
modem_cmd_send_ext() function.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-07-28 21:08:51 -04:00
..
CMakeLists.txt drivers: modem: Add support for quectel bg95 2020-12-01 17:43:59 -05:00
gsm_ppp.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
hl7800.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
Kconfig drivers: modem: implement operator id and cell info 2021-06-14 15:19:13 +02:00
Kconfig.gsm drivers: modem: RSSI measurement for PPP link 2021-07-14 21:06:30 -04:00
Kconfig.hl7800 drivers: modem: hl7800: Make RX net_bufs configurable 2020-10-30 10:09:48 +02:00
Kconfig.quectel-bg9x drivers: modem: Add support for quectel bg95 2020-12-01 17:43:59 -05:00
Kconfig.ublox-sara-r4 drivers: modem: ublox-sara-r4: Convert driver to new DT device macros 2021-02-15 08:31:52 -05:00
Kconfig.wncm14a2a kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
modem_cmd_handler.c drivers: modem: add modem_cmd_send_ext() 2021-07-28 21:08:51 -04:00
modem_cmd_handler.h drivers: modem: add modem_cmd_send_ext() 2021-07-28 21:08:51 -04:00
modem_context.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
modem_context.h drivers: modem: RSSI measurement for PPP link 2021-07-14 21:06:30 -04:00
modem_iface_uart.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
modem_iface_uart.h drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
modem_pin.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
modem_receiver.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
modem_receiver.h drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
modem_shell.c drivers: modem: implement operator id and cell info 2021-06-14 15:19:13 +02:00
modem_socket.c modem: fix socket descriptor leak 2021-01-07 10:36:19 +02:00
modem_socket.h drivers: modem: ublox-sara-r4: add TLS offload support 2021-04-21 11:13:34 +03:00
quectel-bg9x.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
quectel-bg9x.h drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
ublox-sara-r4.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00
wncm14a2a.c drivers: modem: operate on device pointers instead of names 2021-07-15 11:48:00 -04:00