Commit 125ae534 authored by Bjarki Arge Andreasen's avatar Bjarki Arge Andreasen Committed by Johan Hedberg
Browse files

modem: modem_pipe: Update documentation



This commit updates the documentation for the modem_pipe
modem module.

Signed-off-by: default avatarBjarki Arge Andreasen <bjarkix123@gmail.com>
parent a7564220
Loading
Loading
Loading
Loading
+45 −9
Original line number Diff line number Diff line
@@ -14,8 +14,37 @@
extern "C" {
#endif

/**
 * @brief Modem Pipe
 * @defgroup modem_pipe Modem Pipe
 * @ingroup modem
 * @{
 */

/** Modem pipe event */
enum modem_pipe_event {
	MODEM_PIPE_EVENT_OPENED = 0,
	MODEM_PIPE_EVENT_RECEIVE_READY,
	MODEM_PIPE_EVENT_CLOSED,
};

/**
 * @cond INTERNAL_HIDDEN
 */

struct modem_pipe;

/**
 * @endcond
 */

typedef void (*modem_pipe_api_callback)(struct modem_pipe *pipe, enum modem_pipe_event event,
					void *user_data);

/**
 * @cond INTERNAL_HIDDEN
 */

typedef int (*modem_pipe_api_open)(void *data);

typedef int (*modem_pipe_api_transmit)(void *data, const uint8_t *buf, size_t size);
@@ -36,15 +65,6 @@ enum modem_pipe_state {
	MODEM_PIPE_STATE_OPEN,
};

enum modem_pipe_event {
	MODEM_PIPE_EVENT_OPENED = 0,
	MODEM_PIPE_EVENT_RECEIVE_READY,
	MODEM_PIPE_EVENT_CLOSED,
};

typedef void (*modem_pipe_api_callback)(struct modem_pipe *pipe, enum modem_pipe_event event,
					void *user_data);

struct modem_pipe {
	void *data;
	struct modem_pipe_api *api;
@@ -65,6 +85,10 @@ struct modem_pipe {
 */
void modem_pipe_init(struct modem_pipe *pipe, void *data, struct modem_pipe_api *api);

/**
 * @endcond
 */

/**
 * @brief Open pipe
 *
@@ -158,6 +182,10 @@ int modem_pipe_close(struct modem_pipe *pipe);
 */
int modem_pipe_close_async(struct modem_pipe *pipe);

/**
 * @cond INTERNAL_HIDDEN
 */

/**
 * @brief Notify user of pipe that it has opened
 *
@@ -185,6 +213,14 @@ void modem_pipe_notify_closed(struct modem_pipe *pipe);
 */
void modem_pipe_notify_receive_ready(struct modem_pipe *pipe);

/**
 * @endcond
 */

/**
 * @}
 */

#ifdef __cplusplus
}
#endif