Lines Matching refs:backend

49 	struct modem_backend_fake *backend =  in modem_backend_fake_opened_handler()  local
52 modem_pipe_notify_opened(&backend->pipe); in modem_backend_fake_opened_handler()
57 struct modem_backend_fake *backend = data; in modem_backend_fake_open() local
59 backend->open_called = true; in modem_backend_fake_open()
61 if (backend->synchronous) { in modem_backend_fake_open()
62 modem_pipe_notify_opened(&backend->pipe); in modem_backend_fake_open()
64 k_work_schedule(&backend->opened_dwork, TEST_MODEM_PIPE_NOTIFY_TIMEOUT); in modem_backend_fake_open()
73 struct modem_backend_fake *backend = in modem_backend_fake_transmit_idle_handler() local
76 modem_pipe_notify_transmit_idle(&backend->pipe); in modem_backend_fake_transmit_idle_handler()
81 struct modem_backend_fake *backend = data; in modem_backend_fake_transmit() local
83 backend->transmit_called = true; in modem_backend_fake_transmit()
84 backend->transmit_buffer = buf; in modem_backend_fake_transmit()
85 backend->transmit_buffer_size = size; in modem_backend_fake_transmit()
87 if (backend->synchronous) { in modem_backend_fake_transmit()
88 modem_pipe_notify_transmit_idle(&backend->pipe); in modem_backend_fake_transmit()
90 k_work_schedule(&backend->transmit_idle_dwork, TEST_MODEM_PIPE_NOTIFY_TIMEOUT); in modem_backend_fake_transmit()
98 struct modem_backend_fake *backend = data; in modem_backend_fake_receive() local
100 backend->receive_called = true; in modem_backend_fake_receive()
101 backend->receive_buffer = buf; in modem_backend_fake_receive()
102 backend->receive_buffer_size = size; in modem_backend_fake_receive()
109 struct modem_backend_fake *backend = in modem_backend_fake_closed_handler() local
112 modem_pipe_notify_closed(&backend->pipe); in modem_backend_fake_closed_handler()
117 struct modem_backend_fake *backend = data; in modem_backend_fake_close() local
119 backend->close_called = true; in modem_backend_fake_close()
121 if (backend->synchronous) { in modem_backend_fake_close()
122 modem_pipe_notify_closed(&backend->pipe); in modem_backend_fake_close()
124 k_work_schedule(&backend->closed_dwork, TEST_MODEM_PIPE_NOTIFY_TIMEOUT); in modem_backend_fake_close()
137 static struct modem_pipe *modem_backend_fake_init(struct modem_backend_fake *backend) in modem_backend_fake_init() argument
139 k_work_init_delayable(&backend->opened_dwork, in modem_backend_fake_init()
141 k_work_init_delayable(&backend->transmit_idle_dwork, in modem_backend_fake_init()
143 k_work_init_delayable(&backend->closed_dwork, in modem_backend_fake_init()
146 modem_pipe_init(&backend->pipe, backend, &modem_backend_fake_api); in modem_backend_fake_init()
147 return &backend->pipe; in modem_backend_fake_init()
150 static void modem_backend_fake_reset(struct modem_backend_fake *backend) in modem_backend_fake_reset() argument
152 backend->transmit_buffer = NULL; in modem_backend_fake_reset()
153 backend->transmit_buffer_size = 0; in modem_backend_fake_reset()
154 backend->receive_buffer = NULL; in modem_backend_fake_reset()
155 backend->transmit_buffer_size = 0; in modem_backend_fake_reset()
156 backend->open_called = false; in modem_backend_fake_reset()
157 backend->transmit_called = false; in modem_backend_fake_reset()
158 backend->receive_called = false; in modem_backend_fake_reset()
159 backend->close_called = false; in modem_backend_fake_reset()
162 static void modem_backend_fake_set_sync(struct modem_backend_fake *backend, bool sync) in modem_backend_fake_set_sync() argument
164 backend->synchronous = sync; in modem_backend_fake_set_sync()