Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG UE
Commits
9b1deffa
Commit
9b1deffa
authored
Mar 02, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add X400 to devtype_names, make char* array
parent
41a58a49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+19
-4
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+4
-2
No files found.
targets/ARCH/COMMON/common_lib.c
View file @
9b1deffa
...
...
@@ -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
dev
names
[
devtype
];
return
devtype_
names
[
devtype
];
return
"none"
;
}
int
set_device
(
openair0_device
*
device
)
{
char
*
devname
=
get_devname
(
device
->
type
);
c
onst
c
har
*
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
{
...
...
targets/ARCH/COMMON/common_lib.h
View file @
9b1deffa
...
...
@@ -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
);
c
onst
c
har
*
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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment