Making "is_ptrs_symbol" as a static inline function

This commit is contained in:
Ahmed Hussein
2020-04-16 19:30:52 +02:00
parent 9b52bf29ca
commit 728a903369
2 changed files with 14 additions and 23 deletions
-22
View File
@@ -181,28 +181,6 @@ uint8_t is_ptrs_subcarrier(uint16_t k,
return 0;
}
/*******************************************************************
*
* NAME : is_ptrs_symbol
*
* PARAMETERS : l ofdm symbol index within slot
* ptrs_symbols bit mask of ptrs
*
* RETURN : 1 if symbol is ptrs, or 0 otherwise
*
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
*
*********************************************************************/
uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols)
{
if (((ptrs_symbols>>l)&1) == 1)
return 1;
return 0;
}
/*
int main(int argc, char const *argv[])
{
+14 -1
View File
@@ -65,7 +65,20 @@ uint8_t is_ptrs_subcarrier(uint16_t k,
uint16_t start_sc,
uint16_t ofdm_symbol_size);
uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols);
/*******************************************************************
*
* NAME : is_ptrs_symbol
*
* PARAMETERS : l ofdm symbol index within slot
* ptrs_symbols bit mask of ptrs
*
* RETURN : 1 if symbol is ptrs, or 0 otherwise
*
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
*
*********************************************************************/
static inline uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols) { return ((ptrs_symbols >> l) & 1); }