Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Modem Pipe . More...
Typedefs | |
typedef void(* | modem_pipe_api_callback) (struct modem_pipe *pipe, enum modem_pipe_event event, void *user_data) |
Enumerations | |
enum | modem_pipe_event { MODEM_PIPE_EVENT_OPENED = 0 , MODEM_PIPE_EVENT_RECEIVE_READY , MODEM_PIPE_EVENT_TRANSMIT_IDLE , MODEM_PIPE_EVENT_CLOSED } |
Modem pipe event. More... | |
Functions | |
int | modem_pipe_open (struct modem_pipe *pipe, k_timeout_t timeout) |
Open pipe. | |
int | modem_pipe_open_async (struct modem_pipe *pipe) |
Open pipe asynchronously. | |
void | modem_pipe_attach (struct modem_pipe *pipe, modem_pipe_api_callback callback, void *user_data) |
Attach pipe to callback. | |
int | modem_pipe_transmit (struct modem_pipe *pipe, const uint8_t *buf, size_t size) |
Transmit data through pipe. | |
int | modem_pipe_receive (struct modem_pipe *pipe, uint8_t *buf, size_t size) |
Receive data through pipe. | |
void | modem_pipe_release (struct modem_pipe *pipe) |
Clear callback. | |
int | modem_pipe_close (struct modem_pipe *pipe, k_timeout_t timeout) |
Close pipe. | |
int | modem_pipe_close_async (struct modem_pipe *pipe) |
Close pipe asynchronously. | |
Modem Pipe .
typedef void(* modem_pipe_api_callback) (struct modem_pipe *pipe, enum modem_pipe_event event, void *user_data) |
#include <zephyr/modem/pipe.h>
enum modem_pipe_event |
#include <zephyr/modem/pipe.h>
Modem pipe event.
Enumerator | |
---|---|
MODEM_PIPE_EVENT_OPENED | |
MODEM_PIPE_EVENT_RECEIVE_READY | |
MODEM_PIPE_EVENT_TRANSMIT_IDLE | |
MODEM_PIPE_EVENT_CLOSED |
void modem_pipe_attach | ( | struct modem_pipe * | pipe, |
modem_pipe_api_callback | callback, | ||
void * | user_data ) |
#include <zephyr/modem/pipe.h>
Attach pipe to callback.
pipe | Pipe instance |
callback | Callback called when pipe event occurs |
user_data | Free to use user data passed with callback |
int modem_pipe_close | ( | struct modem_pipe * | pipe, |
k_timeout_t | timeout ) |
#include <zephyr/modem/pipe.h>
Close pipe.
pipe | Pipe instance |
timeout | Timeout waiting for pipe to close |
0 | if pipe open was called closed or pipe was already closed |
-errno | code otherwise |
int modem_pipe_close_async | ( | struct modem_pipe * | pipe | ) |
#include <zephyr/modem/pipe.h>
Close pipe asynchronously.
pipe | Pipe instance |
0 | if pipe close was called successfully or pipe was already closed |
-errno | code otherwise |
int modem_pipe_open | ( | struct modem_pipe * | pipe, |
k_timeout_t | timeout ) |
#include <zephyr/modem/pipe.h>
Open pipe.
pipe | Pipe instance |
timeout | Timeout waiting for pipe to open |
0 | if pipe was successfully opened or was already open |
-errno | code otherwise |
int modem_pipe_open_async | ( | struct modem_pipe * | pipe | ) |
#include <zephyr/modem/pipe.h>
Open pipe asynchronously.
pipe | Pipe instance |
0 | if pipe open was called successfully or pipe was already open |
-errno | code otherwise |
#include <zephyr/modem/pipe.h>
Receive data through pipe.
pipe | Pipe to receive from |
buf | Destination for received data; must not be already in use in a modem module. |
size | Capacity of destination for received data |
Number | of bytes received from pipe |
-EPERM | if pipe is closed |
-errno | code on error |
void modem_pipe_release | ( | struct modem_pipe * | pipe | ) |
#include <zephyr/modem/pipe.h>
Transmit data through pipe.
pipe | Pipe to transmit through |
buf | Data to transmit |
size | Number of bytes to transmit |
Number | of bytes placed in pipe |
-EPERM | if pipe is closed |
-errno | code on error |