From 40b52bc8f494666e02026db2a76e69c0fd12bd62 Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Fri, 10 May 2024 12:49:44 -0400 Subject: [PATCH] Use existing function for bits reversal --- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index f60d9c89ea..b87fc9267c 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -508,12 +508,10 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, #endif } - uint32_t payload = 0; result->xtra_byte = (out>>24)&0xff; - for (int i=0; i>i)&1)<<(NR_POLAR_PBCH_PAYLOAD_BITS-i-1); - + const uint64_t payload = reverse_bits(out, NR_POLAR_PBCH_PAYLOAD_BITS); + for (int i=0; i<3; i++) result->decoded_output[i] = (uint8_t)((payload>>((3-i)<<3))&0xff);