diff options
author | Harald Welte <laforge@osmocom.org> | 2020-05-07 23:09:16 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-05-10 19:11:44 +0200 |
commit | 5226e5b926ccff2856f2fa065748b956ccd14f52 (patch) | |
tree | 352a4d406e0a0c26b0413cf36443abfde677e12e /include/osmocom | |
parent | eb55e2f8d95f83379b209c4390543b64895a5253 (diff) |
subchan_demux: Use 'ubit_t' for unpacked bit buffer; use const
Change-Id: Ia082b9fddf03d02afd007825a1588a3ef0dbedae
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/abis/e1_input.h | 2 | ||||
-rw-r--r-- | include/osmocom/abis/subchan_demux.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 4362f50..a38bab8 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -273,7 +273,7 @@ int e1inp_ts_config_sign(struct e1inp_ts *ts, struct e1inp_line *line); /* configure and initialize one timeslot dedicated to TRAU frames. */ int e1inp_ts_config_trau(struct e1inp_ts *ts, struct e1inp_line *line, int (*trau_rcv_cb)(struct subch_demux *dmx, int ch, - uint8_t *data, int len, void *_priv)); + const ubit_t *data, int len, void *_priv)); /* configure and initialize one timeslot dedicated to RAW frames */ int e1inp_ts_config_raw(struct e1inp_ts *ts, struct e1inp_line *line, diff --git a/include/osmocom/abis/subchan_demux.h b/include/osmocom/abis/subchan_demux.h index 4e2f464..3978d73 100644 --- a/include/osmocom/abis/subchan_demux.h +++ b/include/osmocom/abis/subchan_demux.h @@ -22,6 +22,7 @@ #include <stdint.h> #include <osmocom/core/linuxlist.h> +#include <osmocom/core/bits.h> /*! \defgroup subchan_demux * \brief E1 sub-channel multiplexer/demultiplexer @@ -44,7 +45,7 @@ /*! \brief one subchannel inside the demultplexer */ struct demux_subch { /*! \brief bit-buffer for output bits */ - uint8_t out_bitbuf[TRAU_FRAME_BITS]; + ubit_t out_bitbuf[TRAU_FRAME_BITS]; /*! \brief next bit to be written in out_bitbuf */ uint16_t out_idx; /*! \brief number of consecutive zeros that we have received (for sync) */ @@ -61,7 +62,7 @@ struct subch_demux { struct demux_subch subch[NR_SUBCH]; /*! \brief callback to be called once we have received a * complete frame on a given subchannel */ - int (*out_cb)(struct subch_demux *dmx, int ch, uint8_t *data, int len, + int (*out_cb)(struct subch_demux *dmx, int ch, const ubit_t *data, int len, void *); /*! \brief user-provided data, transparently passed to out_cb() */ void *data; |