diff options
author | Max <msuraev@sysmocom.de> | 2016-04-06 16:13:00 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-04-12 10:10:44 -0400 |
commit | d8fb14226f798c9daf948d374a982583cd4ee202 (patch) | |
tree | 063f7c4d851a1d4d0cf40e0b6b0b47f88c1f1500 /include | |
parent | 93bc64f99ddef02a39c03dfd0725bb41dc93e287 (diff) |
Add ubit <-> sbit convertors
Move functions for conversion between soft and unpacked bits to main
library as they are generally useful.
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/bits.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/core/bits.h b/include/osmocom/core/bits.h index 46f0c8b8..e082313a 100644 --- a/include/osmocom/core/bits.h +++ b/include/osmocom/core/bits.h @@ -42,6 +42,9 @@ int osmo_ubit2pbit(pbit_t *out, const ubit_t *in, unsigned int num_bits); int osmo_pbit2ubit(ubit_t *out, const pbit_t *in, unsigned int num_bits); +void osmo_ubit2sbit(sbit_t *out, const ubit_t *in, unsigned int num_bits); +void osmo_sbit2ubit(ubit_t *out, const sbit_t *in, unsigned int num_bits); + int osmo_ubit2pbit_ext(pbit_t *out, unsigned int out_ofs, const ubit_t *in, unsigned int in_ofs, unsigned int num_bits, int lsb_mode); |