sercomm.h File Reference
Seriall Communications (HDLC)

Osmocom Sercomm HDLC (de)multiplex. More...

`#include <osmocom/core/msgb.h>`

Go to the source code of this file.

## Data Structures

struct | osmo_sercomm_inst
| one instance of a sercomm multiplex/demultiplex More...

## Typedefs

typedef void(* | dlci_cb_t) (struct osmo_sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg)
| call-back function for per-DLC receive handler More...

## Enumerations

enum | sercomm_dlci { SC_DLCI_HIGHEST = 0 , SC_DLCI_DEBUG = 4 , SC_DLCI_L1A_L23 = 5 , SC_DLCI_LOADER = 9 , SC_DLCI_CONSOLE = 10 , SC_DLCI_ECHO = 128 , _SC_DLCI_MAX }
| A low sercomm_dlci means high priority. More...

## Functions

void | osmo_sercomm_init (struct osmo_sercomm_inst *sercomm)
| Initialize an Osmocom sercomm instance. More...
int | osmo_sercomm_initialized (struct osmo_sercomm_inst *sercomm)
| Determine if a given Osmocom sercomm instance has been initialized. More...
void | osmo_sercomm_sendmsg (struct osmo_sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg)
| User interface for transmitting messages for a given DLCI. More...
unsigned int | osmo_sercomm_tx_queue_depth (struct osmo_sercomm_inst *sercomm, uint8_t dlci)
| How deep is the Tx queue for a given DLCI? More...
int | osmo_sercomm_register_rx_cb (struct osmo_sercomm_inst *sercomm, uint8_t dlci, dlci_cb_t cb)
| Register a handler for a given DLCI. More...
int | osmo_sercomm_change_speed (struct osmo_sercomm_inst *sercomm, uint32_t bdrt)
| wait until everything has been transmitted, then grab the lock and change the baud rate as requested More...
int | osmo_sercomm_drv_pull (struct osmo_sercomm_inst *sercomm, uint8_t *ch)
| fetch one octet of to-be-transmitted serial data More...
int | osmo_sercomm_drv_rx_char (struct osmo_sercomm_inst *sercomm, uint8_t ch)
| the driver has received one byte, pass it into sercomm layer More...
void | sercomm_drv_lock (unsigned long *flags)
void | sercomm_drv_unlock (unsigned long *flags)
void | sercomm_drv_start_tx (struct osmo_sercomm_inst *sercomm)
| low-level driver routine to request start of transmission The Sercomm code calls this function to inform the low-level driver that some data is pending for transmission, and the low-level driver should (if not active already) start enabling tx_empty interrupts and pull drivers out of sercomm using osmo_sercomm_drv_pull() until the latter returns 0. More...
int | sercomm_drv_baudrate_chg (struct osmo_sercomm_inst *sercomm, uint32_t bdrt)
| low-level driver routine to execute baud-rate change More...
static struct msgb * | osmo_sercomm_alloc_msgb (unsigned int len)
| Sercomm msgb allocator function. More...

## Detailed Description

Osmocom Sercomm HDLC (de)multiplex.