Commit 7893f94f authored by Rangaswami's avatar Rangaswami

fixed CSI payload bits inversion issue

parent b877a53d
...@@ -77,11 +77,11 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) { ...@@ -77,11 +77,11 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
} }
void reverse_n_bits(uint8_t *value, uint16_t bitlen) { void reverse_n_bits(uint8_t *value, uint16_t bitlen) {
uint16_t bitlen = bitlen - 1; uint16_t j;
uint8_t i; uint8_t i;
for(bitlen,i = 0; bitlen > i; bitlen--, i++) { for(j = bitlen - 1,i = 0; j > i; j--, i++) {
if(((*value>>bitlen)&1) != ((*value>>i)&1)) { if(((*value>>j)&1) != ((*value>>i)&1)) {
*value ^= (1<<bitlen); *value ^= (1<<j);
*value ^= (1<<i); *value ^= (1<<i);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment