summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/sercomm.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/osmocom/core/sercomm.h b/include/osmocom/core/sercomm.h
index b751bcd6..10deb7cc 100644
--- a/include/osmocom/core/sercomm.h
+++ b/include/osmocom/core/sercomm.h
@@ -21,10 +21,10 @@ enum sercomm_dlci {
_SC_DLCI_MAX
};
-struct sercomm_inst;
-typedef void (*dlci_cb_t)(struct sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg);
+struct osmo_sercomm_inst;
+typedef void (*dlci_cb_t)(struct osmo_sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg);
-struct sercomm_inst {
+struct osmo_sercomm_inst {
int initialized;
int uart_id;
@@ -50,35 +50,35 @@ struct sercomm_inst {
#ifndef HOST_BUILD
#include <uart.h>
/* helper functions for target */
-void sercomm_bind_uart(struct sercomm_inst *sercomm, int uart);
-int sercomm_get_uart(struct sercomm_inst *sercomm);
-void sercomm_change_speed(struct sercomm_inst *sercomm, enum uart_baudrate bdrt);
+void osmo_sercomm_bind_uart(struct osmo_sercomm_inst *sercomm, int uart);
+int osmo_sercomm_get_uart(struct osmo_sercomm_inst *sercomm);
+void osmo_sercomm_change_speed(struct osmo_sercomm_inst *sercomm, enum uart_baudrate bdrt);
#endif
-void sercomm_init(struct sercomm_inst *sercomm);
-int sercomm_initialized(struct sercomm_inst *sercomm);
+void osmo_sercomm_init(struct osmo_sercomm_inst *sercomm);
+int osmo_sercomm_initialized(struct osmo_sercomm_inst *sercomm);
/* User Interface: Tx */
/* user interface for transmitting messages for a given DLCI */
-void sercomm_sendmsg(struct sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg);
+void osmo_sercomm_sendmsg(struct osmo_sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg);
/* how deep is the Tx queue for a given DLCI */
-unsigned int sercomm_tx_queue_depth(struct sercomm_inst *sercomm, uint8_t dlci);
+unsigned int osmo_sercomm_tx_queue_depth(struct osmo_sercomm_inst *sercomm, uint8_t dlci);
/* User Interface: Rx */
/* receiving messages for a given DLCI */
-int sercomm_register_rx_cb(struct sercomm_inst *sercomm, uint8_t dlci, dlci_cb_t cb);
+int osmo_sercomm_register_rx_cb(struct osmo_sercomm_inst *sercomm, uint8_t dlci, dlci_cb_t cb);
/* Driver Interface */
/* fetch one octet of to-be-transmitted serial data. returns 0 if no more data */
-int sercomm_drv_pull(struct sercomm_inst *sercomm, uint8_t *ch);
+int osmo_sercomm_drv_pull(struct osmo_sercomm_inst *sercomm, uint8_t *ch);
/* the driver has received one byte, pass it into sercomm layer.
returns 1 in case of success, 0 in case of unrecognized char */
-int sercomm_drv_rx_char(struct sercomm_inst *sercomm, uint8_t ch);
+int osmo_sercomm_drv_rx_char(struct osmo_sercomm_inst *sercomm, uint8_t ch);
-static inline struct msgb *sercomm_alloc_msgb(unsigned int len)
+static inline struct msgb *osmo_sercomm_alloc_msgb(unsigned int len)
{
return msgb_alloc_headroom(len+4, 4, "sercomm_tx");
}