Minor temp memset

This commit is contained in:
Guy De Souza
2018-07-10 15:58:16 +02:00
parent 243684844f
commit 940eae3edd
+2 -3
View File
@@ -212,6 +212,8 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
uint8_t idx=0; uint8_t idx=0;
uint16_t M; uint16_t M;
uint8_t nushift; uint8_t nushift;
uint8_t *xbyte = pbch->pbch_a;
memset((void*) xbyte, 0, 1);
LOG_I(PHY, "PBCH generation started\n"); LOG_I(PHY, "PBCH generation started\n");
@@ -224,12 +226,9 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
printf("Byte endian fix:\n"); printf("Byte endian fix:\n");
for (int i=0; i<4; i++) for (int i=0; i<4; i++)
printf("pbch_a[%d]: 0x%04x\n", i, pbch->pbch_a[i]); printf("pbch_a[%d]: 0x%04x\n", i, pbch->pbch_a[i]);
#endif #endif
// Extra byte generation // Extra byte generation
uint8_t *xbyte = pbch->pbch_a;
//memset((void*) xbyte, 0, 1);
for (int i=0; i<4; i++) for (int i=0; i<4; i++)
(*xbyte) ^= ((sfn>>i)&1)<<i; // 4 lsb of sfn (*xbyte) ^= ((sfn>>i)&1)<<i; // 4 lsb of sfn