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
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
Kconfig.quectel-bg9x
Kconfig.ublox-sara-r4
Kconfig.wncm14a2a
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
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
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_socket.h
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