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
298d8d67
Commit
298d8d67
authored
Jul 25, 2014
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5605
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
fda79001
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+11
-2
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
298d8d67
...
@@ -65,7 +65,7 @@ static int trx_usrp_start(openair0_device *device)
...
@@ -65,7 +65,7 @@ static int trx_usrp_start(openair0_device *device)
// init recv and send streaming
// init recv and send streaming
uhd
::
stream_cmd_t
cmd
(
uhd
::
stream_cmd_t
::
STREAM_MODE_START_CONTINUOUS
);
uhd
::
stream_cmd_t
cmd
(
uhd
::
stream_cmd_t
::
STREAM_MODE_START_CONTINUOUS
);
cmd
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
0.01
);
cmd
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
0.0
0
1
);
cmd
.
stream_now
=
false
;
// start at constant delay
cmd
.
stream_now
=
false
;
// start at constant delay
s
->
rx_stream
->
issue_stream_cmd
(
cmd
);
s
->
rx_stream
->
issue_stream_cmd
(
cmd
);
...
@@ -134,6 +134,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
...
@@ -134,6 +134,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
return
samples_received
;
return
samples_received
;
}
}
openair0_timestamp
get_usrp_time
(
openair0_device
*
device
)
{
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
return
s
->
usrp
->
get_time_now
().
to_ticks
(
s
->
sample_rate
);
}
static
bool
is_equal
(
double
a
,
double
b
)
static
bool
is_equal
(
double
a
,
double
b
)
{
{
return
std
::
fabs
(
a
-
b
)
<
std
::
numeric_limits
<
double
>::
epsilon
();
return
std
::
fabs
(
a
-
b
)
<
std
::
numeric_limits
<
double
>::
epsilon
();
...
@@ -141,11 +149,12 @@ static bool is_equal(double a, double b)
...
@@ -141,11 +149,12 @@ static bool is_equal(double a, double b)
int
openair0_device_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
int
openair0_device_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
{
// uhd::set_thread_priority_safe(1.0);
usrp_state_t
*
s
=
(
usrp_state_t
*
)
malloc
(
sizeof
(
usrp_state_t
));
usrp_state_t
*
s
=
(
usrp_state_t
*
)
malloc
(
sizeof
(
usrp_state_t
));
memset
(
s
,
0
,
sizeof
(
usrp_state_t
));
memset
(
s
,
0
,
sizeof
(
usrp_state_t
));
// Initialize USRP device
// Initialize USRP device
std
::
string
args
=
""
;
std
::
string
args
=
"
type=b200
"
;
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
if
(
device_adds
.
size
()
==
0
)
if
(
device_adds
.
size
()
==
0
)
{
{
...
...
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