mirror of git://git.sysmocom.de/ofono
gathdlc: Add accessor for GAtIO
This commit is contained in:
parent
3b98ed067a
commit
378f3c61e3
|
@ -313,6 +313,14 @@ guint32 g_at_hdlc_get_xmit_accm(GAtHDLC *hdlc)
|
||||||
return hdlc->xmit_accm[0];
|
return hdlc->xmit_accm[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GAtIO *g_at_hdlc_get_io(GAtHDLC *hdlc)
|
||||||
|
{
|
||||||
|
if (hdlc == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return hdlc->io;
|
||||||
|
}
|
||||||
|
|
||||||
#define NEED_ESCAPE(xmit_accm, c) xmit_accm[c >> 5] & (1 << (c & 0x1f))
|
#define NEED_ESCAPE(xmit_accm, c) xmit_accm[c >> 5] & (1 << (c & 0x1f))
|
||||||
|
|
||||||
gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
|
gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#define __G_AT_HDLC_H
|
#define __G_AT_HDLC_H
|
||||||
|
|
||||||
#include "gat.h"
|
#include "gat.h"
|
||||||
|
#include "gatio.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -51,6 +52,8 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size);
|
||||||
|
|
||||||
void g_at_hdlc_set_recording(GAtHDLC *hdlc, const char *filename);
|
void g_at_hdlc_set_recording(GAtHDLC *hdlc, const char *filename);
|
||||||
|
|
||||||
|
GAtIO *g_at_hdlc_get_io(GAtHDLC *hdlc);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,6 +32,8 @@ struct _GAtIO;
|
||||||
|
|
||||||
typedef struct _GAtIO GAtIO;
|
typedef struct _GAtIO GAtIO;
|
||||||
|
|
||||||
|
struct ring_buffer;
|
||||||
|
|
||||||
typedef void (*GAtIOReadFunc)(struct ring_buffer *buffer, gpointer user_data);
|
typedef void (*GAtIOReadFunc)(struct ring_buffer *buffer, gpointer user_data);
|
||||||
typedef gboolean (*GAtIOWriteFunc)(gpointer user_data);
|
typedef gboolean (*GAtIOWriteFunc)(gpointer user_data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue