Commit 4d9ee5d1 authored by Robert Schmidt's avatar Robert Schmidt

Add X400 to devtype_names, make char* array

parent 473328a0
......@@ -43,16 +43,31 @@
//#include "targets/RT/USER/lte-softmodem.h"
#include "executables/softmodem-common.h"
char *get_devname(int devtype) {
char *devnames[MAX_RF_DEV_TYPE]=DEVTYPE_NAMES;
const char* devtype_names[MAX_RF_DEV_TYPE] = {
"",
"EXMIMO",
"USRP B200",
"USRP X300",
"USRP N300",
"USRP X400",
"BLADERF",
"LMSSDR",
"IRIS",
"No HW",
"ADRV9371_ZC706",
"UEDv2",
"RFSIMULATOR"
};
const char *get_devname(int devtype) {
if (devtype < MAX_RF_DEV_TYPE && devtype !=MIN_RF_DEV_TYPE )
return devnames[devtype];
return devtype_names[devtype];
return "none";
}
int set_device(openair0_device *device)
{
char *devname = get_devname(device->type);
const char *devname = get_devname(device->type);
if (strcmp(devname,"none") != 0) {
LOG_I(HW,"[%s] has loaded %s device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"),devname);
} else {
......
......@@ -109,7 +109,9 @@ typedef enum {
RFSIMULATOR,
MAX_RF_DEV_TYPE
} dev_type_t;
#define DEVTYPE_NAMES {"","EXMIMO","USRP B200","USRP X300","USRP N300","BLADERF","LMSSDR","IRIS","No HW","ADRV9371_ZC706","UEDv2", "RFSIMULATOR"}
/* list of names of devices, needs to match dev_type_t */
extern const char* devtype_names[MAX_RF_DEV_TYPE];
/*!\brief transport protocol types
*/
typedef enum {
......@@ -537,7 +539,7 @@ extern "C"
/*! \brief get device name from device type */
char *get_devname(int devtype);
const char *get_devname(int devtype);
/*! \brief Initialize openair RF target. It returns 0 if OK */
int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cfg);
/*! \brief Initialize transport protocol . It returns 0 if OK */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment