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
lizhongxiao
OpenXG-RAN
Commits
630ee18b
Commit
630ee18b
authored
Jul 10, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use BladeRF log level directly without OAI Log Levels
- bladerf depends on UTIL via common_lib.h - use header guards
parent
91329928
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
42 deletions
+16
-42
radio/BLADERF/CMakeLists.txt
radio/BLADERF/CMakeLists.txt
+1
-0
radio/BLADERF/bladerf_lib.c
radio/BLADERF/bladerf_lib.c
+10
-35
radio/BLADERF/bladerf_lib.h
radio/BLADERF/bladerf_lib.h
+5
-7
No files found.
radio/BLADERF/CMakeLists.txt
View file @
630ee18b
pkg_check_modules
(
bladeRF REQUIRED libbladeRF
)
add_library
(
oai_bladerfdevif MODULE bladerf_lib.c
)
target_link_libraries
(
oai_bladerfdevif PRIVATE bladeRF
)
target_link_libraries
(
oai_bladerfdevif PRIVATE UTIL
)
set_target_properties
(
oai_bladerfdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
add_custom_command
(
TARGET oai_bladerfdevif POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E create_symlink liboai_bladerfdevif.so liboai_device.so
...
...
radio/BLADERF/bladerf_lib.c
View file @
630ee18b
...
...
@@ -1131,7 +1131,16 @@ int device_init(openair0_device *device,
printf("[BRF] calibration OK\n");
#endif
bladerf_log_set_verbosity
(
get_brf_log_level
(
openair0_cfg
->
log_level
));
/* set log to info, available log levels are:
* - BLADERF_LOG_LEVEL_VERBOSE
* - BLADERF_LOG_LEVEL_DEBUG
* - BLADERF_LOG_LEVEL_INFO
* - BLADERF_LOG_LEVEL_WARNING
* - BLADERF_LOG_LEVEL_ERROR
* - BLADERF_LOG_LEVEL_CRITICAL
* - BLADERF_LOG_LEVEL_SILENT
*/
bladerf_log_set_verbosity
(
BLADERF_LOG_LEVEL_INFO
);
printf
(
"BLADERF: Initializing openair0_device
\n
"
);
device
->
Mod_id
=
num_devices
++
;
...
...
@@ -1208,38 +1217,4 @@ struct bladerf * open_bladerf_from_serial(const char *serial)
return
dev
;
}
}
/*! \brief Get BladeRF log level
* \param log_level log level
* \returns log level of BLADERF device
*/
int
get_brf_log_level
(
int
log_level
)
{
int
level
=
BLADERF_LOG_LEVEL_INFO
;
return
BLADERF_LOG_LEVEL_INFO
;
switch
(
log_level
)
{
case
LOG_DEBUG
:
level
=
BLADERF_LOG_LEVEL_DEBUG
;
break
;
case
LOG_INFO
:
level
=
BLADERF_LOG_LEVEL_INFO
;
break
;
case
LOG_WARNING
:
level
=
BLADERF_LOG_LEVEL_WARNING
;
break
;
case
LOG_ERR
:
level
=
BLADERF_LOG_LEVEL_ERROR
;
break
;
case
LOG_CRIT
:
level
=
BLADERF_LOG_LEVEL_CRITICAL
;
break
;
case
LOG_EMERG
:
level
=
BLADERF_LOG_LEVEL_SILENT
;
break
;
default:
break
;
}
return
level
;
}
/*@}*/
radio/BLADERF/bladerf_lib.h
View file @
630ee18b
...
...
@@ -24,10 +24,12 @@
* Author: navid nikaein
*/
#ifndef BLADERF_LIB_H
#define BLADERF_LIB_H
#include <libbladeRF.h>
#include "common_lib.h"
#include "LOG/log.h"
/** @addtogroup _BLADERF_PHY_RF_INTERFACE_
* @{
...
...
@@ -109,12 +111,6 @@ int trx_brf_init(openair0_device *device);
*/
openair0_timestamp
trx_get_timestamp
(
openair0_device
*
device
,
bladerf_module
module
);
/*! \brief Get BladeRF log level
* \param log_level log level
* \returns log level of BLADERF device
*/
int
get_brf_log_level
(
int
log_level
);
/*! \brief bladeRF error report
* \param status
* \returns 0 on success
...
...
@@ -122,3 +118,5 @@ int get_brf_log_level(int log_level);
int
brf_error
(
int
status
);
/*@}*/
#endif
/* BLADERF_LIB_H */
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