Zephyr API 3.6.99
Loading...
Searching...
No Matches

Modem CMUX . More...

Data Structures

struct  modem_cmux_config
 Contains CMUX instance configuration data. More...
 
struct  modem_cmux_dlci_config
 CMUX DLCI configuration. More...
 

Typedefs

typedef void(* modem_cmux_callback) (struct modem_cmux *cmux, enum modem_cmux_event event, void *user_data)
 

Enumerations

enum  modem_cmux_event { MODEM_CMUX_EVENT_CONNECTED = 0 , MODEM_CMUX_EVENT_DISCONNECTED }
 

Functions

void modem_cmux_init (struct modem_cmux *cmux, const struct modem_cmux_config *config)
 Initialize CMUX instance.
 
struct modem_pipe * modem_cmux_dlci_init (struct modem_cmux *cmux, struct modem_cmux_dlci *dlci, const struct modem_cmux_dlci_config *config)
 Initialize DLCI instance and register it with CMUX instance.
 
int modem_cmux_attach (struct modem_cmux *cmux, struct modem_pipe *pipe)
 Attach CMUX instance to pipe.
 
int modem_cmux_connect (struct modem_cmux *cmux)
 Connect CMUX instance.
 
int modem_cmux_connect_async (struct modem_cmux *cmux)
 Connect CMUX instance asynchronously.
 
int modem_cmux_disconnect (struct modem_cmux *cmux)
 Close down and disconnect CMUX instance.
 
int modem_cmux_disconnect_async (struct modem_cmux *cmux)
 Close down and disconnect CMUX instance asynchronously.
 
void modem_cmux_release (struct modem_cmux *cmux)
 Release CMUX instance from pipe.
 

Detailed Description

Modem CMUX .

Typedef Documentation

◆ modem_cmux_callback

typedef void(* modem_cmux_callback) (struct modem_cmux *cmux, enum modem_cmux_event event, void *user_data)

#include <zephyr/modem/cmux.h>

Enumeration Type Documentation

◆ modem_cmux_event

#include <zephyr/modem/cmux.h>

Enumerator
MODEM_CMUX_EVENT_CONNECTED 
MODEM_CMUX_EVENT_DISCONNECTED 

Function Documentation

◆ modem_cmux_attach()

int modem_cmux_attach ( struct modem_cmux * cmux,
struct modem_pipe * pipe )

#include <zephyr/modem/cmux.h>

Attach CMUX instance to pipe.

Parameters
cmuxCMUX instance
pipePipe instance to attach CMUX instance to

◆ modem_cmux_connect()

int modem_cmux_connect ( struct modem_cmux * cmux)

#include <zephyr/modem/cmux.h>

Connect CMUX instance.

This will send a CMUX connect request to target on the serial bus. If successful, DLCI channels can be now be opened using modem_pipe_open()

Parameters
cmuxCMUX instance
Note
When connected, the bus pipe must not be used directly

◆ modem_cmux_connect_async()

int modem_cmux_connect_async ( struct modem_cmux * cmux)

#include <zephyr/modem/cmux.h>

Connect CMUX instance asynchronously.

This will send a CMUX connect request to target on the serial bus. If successful, DLCI channels can be now be opened using modem_pipe_open().

Parameters
cmuxCMUX instance
Note
When connected, the bus pipe must not be used directly

◆ modem_cmux_disconnect()

int modem_cmux_disconnect ( struct modem_cmux * cmux)

#include <zephyr/modem/cmux.h>

Close down and disconnect CMUX instance.

This will close all open DLCI channels, and close down the CMUX connection.

Parameters
cmuxCMUX instance
Note
The bus pipe must be released using modem_cmux_release() after disconnecting before being reused.

◆ modem_cmux_disconnect_async()

int modem_cmux_disconnect_async ( struct modem_cmux * cmux)

#include <zephyr/modem/cmux.h>

Close down and disconnect CMUX instance asynchronously.

This will close all open DLCI channels, and close down the CMUX connection.

Parameters
cmuxCMUX instance
Note
The bus pipe must be released using modem_cmux_release() after disconnecting before being reused.

◆ modem_cmux_dlci_init()

struct modem_pipe * modem_cmux_dlci_init ( struct modem_cmux * cmux,
struct modem_cmux_dlci * dlci,
const struct modem_cmux_dlci_config * config )

#include <zephyr/modem/cmux.h>

Initialize DLCI instance and register it with CMUX instance.

Parameters
cmuxCMUX instance which the DLCI will be registered to
dlciDLCI instance which will be registered and configured
configConfiguration to apply to DLCI instance

◆ modem_cmux_init()

void modem_cmux_init ( struct modem_cmux * cmux,
const struct modem_cmux_config * config )

#include <zephyr/modem/cmux.h>

Initialize CMUX instance.

Parameters
cmuxCMUX instance
configConfiguration to apply to CMUX instance

◆ modem_cmux_release()

void modem_cmux_release ( struct modem_cmux * cmux)

#include <zephyr/modem/cmux.h>

Release CMUX instance from pipe.

Releases the pipe and hard resets the CMUX instance internally. CMUX should be disconnected using modem_cmux_disconnect().

Parameters
cmuxCMUX instance
Note
The bus pipe can be used directly again after CMUX instance is released.