Changed parameter names to match function meanings

This commit is contained in:
Paul Sutton 2015-09-14 09:43:33 +01:00
parent d2a17a631b
commit 1e6f56cdef
2 changed files with 12 additions and 12 deletions

View File

@ -41,14 +41,14 @@
#include "srslte/config.h" #include "srslte/config.h"
SRSLTE_API void srslte_bit_unpack_vector(uint8_t *srslte_bit_packed, SRSLTE_API void srslte_bit_unpack_vector(uint8_t *packed,
uint8_t *bits_packed, uint8_t *unpacked,
int nof_bits);
SRSLTE_API void srslte_bit_pack_vector(uint8_t *bits_packed,
uint8_t *srslte_bit_packed,
int nof_bits); int nof_bits);
SRSLTE_API void srslte_bit_pack_vector(uint8_t *unpacked,
uint8_t *packed,
int nof_bits);
SRSLTE_API uint32_t srslte_bit_pack(uint8_t **bits, SRSLTE_API uint32_t srslte_bit_pack(uint8_t **bits,
int nof_bits); int nof_bits);

View File

@ -31,15 +31,15 @@
#include "srslte/utils/bit.h" #include "srslte/utils/bit.h"
void srslte_bit_unpack_vector(uint8_t *bits_unpacked, uint8_t *bits_packed, int nof_bits) void srslte_bit_unpack_vector(uint8_t *packed, uint8_t *unpacked, int nof_bits)
{ {
uint32_t i, nbytes; uint32_t i, nbytes;
nbytes = nof_bits/8; nbytes = nof_bits/8;
for (i=0;i<nbytes;i++) { for (i=0;i<nbytes;i++) {
srslte_bit_unpack(bits_unpacked[i], &bits_packed, 8); srslte_bit_unpack(packed[i], &unpacked, 8);
} }
if (nof_bits%8) { if (nof_bits%8) {
srslte_bit_unpack(bits_unpacked[i], &bits_packed, nof_bits%8); srslte_bit_unpack(packed[i], &unpacked, nof_bits%8);
} }
} }
@ -63,15 +63,15 @@ void srslte_bit_unpack(uint32_t value, uint8_t **bits, int nof_bits)
*bits += nof_bits; *bits += nof_bits;
} }
void srslte_bit_pack_vector(uint8_t *bits_packed, uint8_t *bits_unpacked, int nof_bits) void srslte_bit_pack_vector(uint8_t *unpacked, uint8_t *packed, int nof_bits)
{ {
uint32_t i, nbytes; uint32_t i, nbytes;
nbytes = nof_bits/8; nbytes = nof_bits/8;
for (i=0;i<nbytes;i++) { for (i=0;i<nbytes;i++) {
bits_unpacked[i] = srslte_bit_pack(&bits_packed, 8); packed[i] = srslte_bit_pack(&unpacked, 8);
} }
if (nof_bits%8) { if (nof_bits%8) {
bits_unpacked[i] = srslte_bit_pack(&bits_packed, nof_bits%8); packed[i] = srslte_bit_pack(&unpacked, nof_bits%8);
} }
} }