Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
wangjie
OpenXG-RAN
Commits
41896be7
Commit
41896be7
authored
6 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifications to allow for multiple usrps connected to same UHD instance
parent
6849e297
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+15
-9
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
41896be7
...
...
@@ -1082,15 +1082,21 @@ extern "C" {
LOG_E
(
HW
,
"No USRP Device Found.
\n
"
);
free
(
s
);
return
-
1
;
}
else
if
(
device_adds
.
size
()
>
1
)
{
LOG_E
(
HW
,
"More than
one USRP Device Found. Please specify device
more precisely in config file.
\n
"
);
}
else
if
(
device_adds
.
size
()
>
2
)
{
LOG_E
(
HW
,
"More than
two USRP Devices Found. Please specify devices
more precisely in config file.
\n
"
);
free
(
s
);
return
-
1
;
}
LOG_I
(
HW
,
"Found USRP %s
\n
"
,
device_adds
[
0
].
get
(
"type"
).
c_str
());
double
usrp_master_clock
;
if
(
device_adds
.
size
>
1
&&
strcmp
(
device_adds
[
0
].
get
(
"type"
),
device_adds
[
1
].
get
(
"type"
))
!=
0
)
{
LOG_E
(
HW
,
"Please use the same type of USRP
\n
"
);
free
(
s
);
return
(
-
1
);
}
LOG_I
(
HW
,
"Found %d USRP of type %s
\n
"
,
device_adds
.
size
,
device_adds
[
0
].
get
(
"type"
).
c_str
());
if
(
device_adds
[
0
].
get
(
"type"
)
==
"b200"
)
{
printf
(
"Found USRP b200
\n
"
);
device
->
type
=
USRP_B200_DEV
;
...
...
@@ -1116,7 +1122,7 @@ extern "C" {
s
->
usrp
=
uhd
::
usrp
::
multi_usrp
::
make
(
args
);
// lock mboard clocks
if
(
openair0_cfg
[
0
].
clock_source
==
internal
)
if
(
openair0_cfg
[
0
].
clock_source
==
internal
&&
device_adds
.
size
==
1
)
s
->
usrp
->
set_clock_source
(
"internal"
);
else
s
->
usrp
->
set_clock_source
(
"external"
);
...
...
This diff is collapsed.
Click to expand it.
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