Minor aesthetics changes

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent f261365c91
commit e621853566

@ -250,11 +250,10 @@ typedef enum SRSLTE_API {
SRSLTE_MOD_QPSK, SRSLTE_MOD_QPSK,
SRSLTE_MOD_16QAM, SRSLTE_MOD_16QAM,
SRSLTE_MOD_64QAM, SRSLTE_MOD_64QAM,
SRSLTE_MOD_256QAM SRSLTE_MOD_256QAM,
SRSLTE_MOD_NITEMS
} srslte_mod_t; } srslte_mod_t;
#define SRSLTE_NOF_MODULATIONS (SRSLTE_MOD_256QAM + 1)
typedef enum { typedef enum {
SRSLTE_DCI_FORMAT0 = 0, SRSLTE_DCI_FORMAT0 = 0,
SRSLTE_DCI_FORMAT1, SRSLTE_DCI_FORMAT1,

@ -84,7 +84,6 @@ static inline srslte_evm_buffer_t* srslte_evm_buffer_alloc(uint32_t nof_prb)
*/ */
static inline void srslte_evm_buffer_resize(srslte_evm_buffer_t* q, uint32_t nof_prb) static inline void srslte_evm_buffer_resize(srslte_evm_buffer_t* q, uint32_t nof_prb)
{ {
// Assert pointer and number of PRB // Assert pointer and number of PRB
if (!q || !nof_prb) { if (!q || !nof_prb) {
ERROR("Invalid inputs"); ERROR("Invalid inputs");

@ -73,7 +73,7 @@ typedef struct SRSLTE_API {
float* csi[SRSLTE_MAX_CODEWORDS]; /* Channel Strengh Indicator */ float* csi[SRSLTE_MAX_CODEWORDS]; /* Channel Strengh Indicator */
/* tx & rx objects */ /* tx & rx objects */
srslte_modem_table_t mod[SRSLTE_NOF_MODULATIONS]; srslte_modem_table_t mod[SRSLTE_MOD_NITEMS];
// EVM buffers, one for each codeword (avoid concurrency issue with coworker) // EVM buffers, one for each codeword (avoid concurrency issue with coworker)
srslte_evm_buffer_t* evm_buffer[SRSLTE_MAX_CODEWORDS]; srslte_evm_buffer_t* evm_buffer[SRSLTE_MAX_CODEWORDS];

@ -60,6 +60,8 @@ int srslte_demod_hard_demodulate(srslte_demod_hard_t* q, cf_t* symbols, uint8_t*
hard_qam256_demod(symbols, bits, nsymbols); hard_qam256_demod(symbols, bits, nsymbols);
nbits = nsymbols * 8; nbits = nsymbols * 8;
break; break;
case SRSLTE_MOD_NITEMS:
default:; // Do nothing
} }
return nbits; return nbits;
} }

@ -122,6 +122,8 @@ int srslte_modem_table_lte(srslte_modem_table_t* q, srslte_mod_t modulation)
} }
set_256QAMtable(q->symbol_table); set_256QAMtable(q->symbol_table);
break; break;
case SRSLTE_MOD_NITEMS:
default:; // Do nothing
} }
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }

@ -254,7 +254,7 @@ static int pdsch_init(srslte_pdsch_t* q, uint32_t max_prb, bool is_ue, uint32_t
INFO("Init PDSCH: %d PRBs, max_symbols: %d\n", max_prb, q->max_re); INFO("Init PDSCH: %d PRBs, max_symbols: %d\n", max_prb, q->max_re);
for (int i = 0; i < SRSLTE_NOF_MODULATIONS; i++) { for (int i = 0; i < SRSLTE_MOD_NITEMS; i++) {
if (srslte_modem_table_lte(&q->mod[i], modulations[i])) { if (srslte_modem_table_lte(&q->mod[i], modulations[i])) {
goto clean; goto clean;
} }
@ -461,7 +461,7 @@ void srslte_pdsch_free(srslte_pdsch_t* q)
srslte_sequence_free(&q->tmp_seq); srslte_sequence_free(&q->tmp_seq);
for (int i = 0; i < SRSLTE_NOF_MODULATIONS; i++) { for (int i = 0; i < SRSLTE_MOD_NITEMS; i++) {
srslte_modem_table_free(&q->mod[i]); srslte_modem_table_free(&q->mod[i]);
} }
@ -700,6 +700,8 @@ static void csi_correction(srslte_pdsch_t* q, srslte_pdsch_cfg_t* cfg, uint32_t
_e += 2; _e += 2;
} }
break; break;
case SRSLTE_MOD_NITEMS:
default:; // Do nothing
} }
i /= qm; i /= qm;

Loading…
Cancel
Save