Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JenRungHuang
openairinterface5G
Commits
9c167fc3
Commit
9c167fc3
authored
Aug 18, 2017
by
Florian Kaltenberger
Browse files
adding GPIO control for TDD to USRP
parent
d7096758
Changes
1
Hide whitespace changes
Inline
Side-by-side
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
9c167fc3
...
...
@@ -277,6 +277,17 @@ static int trx_usrp_start(openair0_device *device) {
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
// setup GPIO for TDD, GPIO(4) = ATR_RX
//set data direction register (DDR) to output
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"DDR"
,
0x1f
,
0x1f
);
//set control register to ATR
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"CTRL"
,
0x1f
,
0x1f
);
//set ATR register
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"ATR_RX"
,
1
<<
4
,
0x1f
);
// init recv and send streaming
uhd
::
stream_cmd_t
cmd
(
uhd
::
stream_cmd_t
::
STREAM_MODE_START_CONTINUOUS
);
// should be s->usrp->get_time_next_pps(&cmd.time_spec);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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