X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_utils.h;h=ec7d0e0d2fa13f9d399ac1613cc02fda1fb4889a;hb=aa73421b9f5306c786cc5b757043b3d71705bbf2;hp=b4a3acb88b75112056ac417ff0fdf573d1bacc50;hpb=49dec2270f1b3c03b36a801e153bf0786edffc24;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_utils.h b/src/5gnrsch/sch_utils.h index b4a3acb88..ec7d0e0d2 100644 --- a/src/5gnrsch/sch_utils.h +++ b/src/5gnrsch/sch_utils.h @@ -25,9 +25,16 @@ #define MAX_PRACH_CONFIG_IDX 256 #define MAX_MU_PUSCH 4 #define TOTAL_TBSIZE_VALUES 93 -#define SET_BITS(_startBit, _numBits, _byte) \ -{ \ - _byte = (((~((~0)<<_numBits))<<_startBit)); \ +#define SET_BITS_MSB(_startBit, _numBits, _byte) \ +{ \ + _byte = (~((0xFF) >> _numBits)); \ + _byte >>= _startBit; \ +} + +#define SET_BITS_LSB(_startBit, _numBits, _byte) \ +{ \ + _byte = (~((0xFF) << _numBits)); \ + _byte <<= _startBit; \ } /* functions declarations */