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
Michael Black
OpenXG-RAN
Commits
9764c924
Commit
9764c924
authored
Feb 29, 2016
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update trx_bladerf_write calls to match the common_lib.h trx_write_func
parent
5d62584c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
+18
-19
No files found.
targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
View file @
9764c924
...
...
@@ -412,7 +412,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_LMS_DCOFF_I
,
offIold
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
for
(
meanIold
=
meanQold
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
switch
(
i
&
3
)
{
...
...
@@ -438,7 +438,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_LMS_DCOFF_I
,
offI
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
switch
(
i
&
3
)
{
...
...
@@ -474,7 +474,7 @@ void calibrate_rf(openair0_device *device) {
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
switch
(
i
&
3
)
{
...
...
@@ -503,7 +503,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_LMS_DCOFF_Q
,
offQold
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/4
for
(
meanIold
=
meanQold
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -530,7 +530,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_LMS_DCOFF_Q
,
offQ
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
switch
(
i
&
3
)
{
...
...
@@ -568,7 +568,7 @@ void calibrate_rf(openair0_device *device) {
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
switch
(
i
&
3
)
{
...
...
@@ -601,7 +601,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_FPGA_PHASE
,
offphaseold
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/8 (Image of TX signal in +ve frequencies)
for
(
meanIold
=
meanQold
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -618,7 +618,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_FPGA_PHASE
,
offphase
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/8 (Image of TX signal in +ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -648,7 +648,7 @@ void calibrate_rf(openair0_device *device) {
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/8 (Image of TX signal in +ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -670,7 +670,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_FPGA_GAIN
,
offgainold
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/8 (Image of TX signal in +ve frequencies)
for
(
meanIold
=
meanQold
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -687,7 +687,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_TX
,
BLADERF_CORR_FPGA_GAIN
,
offgain
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/8 (Image of TX signal in +ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -716,7 +716,7 @@ void calibrate_rf(openair0_device *device) {
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on fs/8 (Image of TX signal in +ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -741,7 +741,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_RX
,
BLADERF_CORR_FPGA_PHASE
,
offphaseold
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on -3fs/8 (Image of TX signal in -ve frequencies)
for
(
meanIold
=
meanQold
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -758,7 +758,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_RX
,
BLADERF_CORR_FPGA_PHASE
,
offphase
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on -3fs/8 (Image of TX signal in -ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -788,7 +788,7 @@ void calibrate_rf(openair0_device *device) {
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on -3fs/8 (Image of TX signal in -ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -810,7 +810,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_RX
,
BLADERF_CORR_FPGA_GAIN
,
offgainold
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on -3fs/8 (Image of TX signal in +ve frequencies)
for
(
meanIold
=
meanQold
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -827,7 +827,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction
(
brf
->
dev
,
BLADERF_MODULE_RX
,
BLADERF_CORR_FPGA_GAIN
,
offgain
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on 3fs/8 (Image of TX signal in -ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -856,7 +856,7 @@ void calibrate_rf(openair0_device *device) {
for
(
i
=
0
;
i
<
10
;
i
++
)
{
trx_brf_read
(
device
,
&
ptimestamp
,
(
void
**
)
&
calib_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
);
trx_brf_write
(
device
,
ptimestamp
+
5
*
RXDCLENGTH
,
(
void
**
)
&
calib_tx_buffp
,
RXDCLENGTH
,
0
,
0
);
}
// project on -3fs/8 (Image of TX signal in -ve frequencies)
for
(
meanI
=
meanQ
=
i
=
j
=
0
;
i
<
RXDCLENGTH
;
i
++
)
{
...
...
@@ -1068,7 +1068,6 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
bladerf_log_set_verbosity
(
get_brf_log_level
(
openair0_cfg
->
log_level
));
printf
(
"BLADERF: Initializing openair0_device
\n
"
);
device
->
priv
=
brf
;
device
->
Mod_id
=
num_devices
++
;
device
->
type
=
BLADERF_DEV
;
device
->
trx_start_func
=
trx_brf_start
;
...
...
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