Commit 96c909cf authored by Rangaswami's avatar Rangaswami Committed by r.karey

fixed CSI payload bits inversion issue

parent dd010094
......@@ -80,11 +80,11 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
}
void reverse_n_bits(uint8_t *value, uint16_t bitlen) {
uint16_t bitlen = bitlen - 1;
uint16_t j;
uint8_t i;
for(bitlen,i = 0; bitlen > i; bitlen--, i++) {
if(((*value>>bitlen)&1) != ((*value>>i)&1)) {
*value ^= (1<<bitlen);
for(j = bitlen - 1,i = 0; j > i; j--, i++) {
if(((*value>>j)&1) != ((*value>>i)&1)) {
*value ^= (1<<j);
*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