11#ifndef ZEPHYR_MODEM_PIPELINK_
12#define ZEPHYR_MODEM_PIPELINK_
53struct modem_pipelink {
54 struct modem_pipe *pipe;
98void modem_pipelink_init(
struct modem_pipelink *link,
struct modem_pipe *pipe);
101void modem_pipelink_notify_connected(
struct modem_pipelink *link);
104void modem_pipelink_notify_disconnected(
struct modem_pipelink *link);
115#define MODEM_PIPELINK_DT_SYM(node_id, name) \
116 _CONCAT_4(__modem_pipelink_, DT_DEP_ORD(node_id), _, name)
125#define MODEM_PIPELINK_DT_DECLARE(node_id, name) \
126 extern struct modem_pipelink MODEM_PIPELINK_DT_SYM(node_id, name)
133#define MODEM_PIPELINK_DT_DEFINE(node_id, name) \
134 struct modem_pipelink MODEM_PIPELINK_DT_SYM(node_id, name)
141#define MODEM_PIPELINK_DT_GET(node_id, name) \
142 (&MODEM_PIPELINK_DT_SYM(node_id, name))
151#define MODEM_PIPELINK_DT_INST_DECLARE(inst, name) \
152 MODEM_PIPELINK_DT_DECLARE(DT_DRV_INST(inst), name)
154#define MODEM_PIPELINK_DT_INST_DEFINE(inst, name) \
155 MODEM_PIPELINK_DT_DEFINE(DT_DRV_INST(inst), name)
157#define MODEM_PIPELINK_DT_INST_GET(inst, name) \
158 MODEM_PIPELINK_DT_GET(DT_DRV_INST(inst), name)
modem_pipelink_event
Pipelink event.
Definition pipelink.h:26
void(* modem_pipelink_callback)(struct modem_pipelink *link, enum modem_pipelink_event event, void *user_data)
Pipelink callback definition.
Definition pipelink.h:46
void modem_pipelink_release(struct modem_pipelink *link)
Clear callback.
bool modem_pipelink_is_connected(struct modem_pipelink *link)
Check whether pipelink pipe is connected.
void modem_pipelink_attach(struct modem_pipelink *link, modem_pipelink_callback callback, void *user_data)
Attach callback to pipelink.
struct modem_pipe * modem_pipelink_get_pipe(struct modem_pipelink *link)
Get pipe from pipelink.
@ MODEM_PIPELINK_EVENT_CONNECTED
Modem pipe has been connected and can be opened.
Definition pipelink.h:28
@ MODEM_PIPELINK_EVENT_DISCONNECTED
Modem pipe has been disconnected and can't be opened.
Definition pipelink.h:30
Kernel Spin Lock.
Definition spinlock.h:45