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
020f08b3
Commit
020f08b3
authored
Dec 30, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed to support doxygen
parent
7290a7d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
22 deletions
+60
-22
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+60
-22
No files found.
targets/ARCH/COMMON/common_lib.h
View file @
020f08b3
...
...
@@ -46,7 +46,7 @@ typedef int64_t openair0_timestamp;
typedef
volatile
int64_t
openair0_vtimestamp
;
/* structrue holds the parameters to configure USRP devices*/
/*
!\brief
structrue holds the parameters to configure USRP devices*/
typedef
struct
openair0_device_t
openair0_device
;
...
...
@@ -68,7 +68,8 @@ typedef enum {
/** @addtogroup _PHY_RF_INTERFACE_
* @{
*/
/*! \brief RF Gain clibration */
typedef
struct
{
//! Frequency for which RX chain was calibrated
double
freq
;
...
...
@@ -76,10 +77,11 @@ typedef struct {
double
offset
;
}
rx_gain_calib_table_t
;
/*! \brief RF frontend parameters set by application */
typedef
struct
{
//! Module ID for this configuration
int
Mod_id
;
// device log level
//
!
device log level
int
log_level
;
//! duplexing mode
duplex_mode_t
duplex_mode
;
...
...
@@ -136,10 +138,11 @@ typedef struct {
}
openair0_config_t
;
/*! \brief RF mapping */
typedef
struct
{
/
* card id */
/
/! card id
int
card
;
/
* rf chain id */
/
/! rf chain id
int
chain
;
}
openair0_rf_map
;
...
...
@@ -182,20 +185,21 @@ typedef enum {
}
func_type_t
;
/*!\brief structrue holds the parameters to configure USRP devices */
struct
openair0_device_t
{
/
* Module ID of this device */
/
/! Module ID of this device
int
Mod_id
;
/
* Type of this device */
/
/! Type of this device
dev_type_t
type
;
/* Type of the device's host (BBU/RRH) */
//! Type of the device's host (BBU/RRH)
func_type_t
func_type
;
/
* RF frontend parameters set by application */
/
/! RF frontend parameters set by application
openair0_config_t
openair0_cfg
;
/
* Can be used by driver to hold internal structure*/
/
/! Can be used by driver to hold internal structure
void
*
priv
;
/* Functions API, which are called by the application*/
...
...
@@ -217,7 +221,7 @@ struct openair0_device_t {
@param msg pointer to the message structure passed between BBU-RRH
@param msg_len length of the message
*/
int
(
*
trx_reply_func
)(
openair0_device
*
openair0
,
void
*
msg
,
ssize_t
msg_len
);
int
(
*
trx_reply_func
)(
openair0_device
*
device
,
void
*
msg
,
ssize_t
msg_len
);
/*! \brief Called to send samples to the RF target
@param device pointer to the device structure specific to the RF hardware target
...
...
@@ -235,9 +239,9 @@ struct openair0_device_t {
* was received.
* \param device the hardware to use
* \param[out] ptimestamp the time at which the first sample was received.
* \param[out] An array of pointers to buffers for received samples. The buffers must be large enough to hold the number of samples \ref nsamps.
* \param[out]
buff
An array of pointers to buffers for received samples. The buffers must be large enough to hold the number of samples \ref nsamps.
* \param nsamps Number of samples. One sample is 2 byte I + 2 byte Q => 4 byte.
* \param
cc Number of channels. If cc == 1, only buff[0] is filled with samples.
* \param
antenna_id Index of antenna for which to receive samples
* \returns the number of sample read
*/
int
(
*
trx_read_func
)(
openair0_device
*
device
,
openair0_timestamp
*
ptimestamp
,
void
**
buff
,
int
nsamps
,
int
antenna_id
);
...
...
@@ -254,22 +258,29 @@ struct openair0_device_t {
*/
int
(
*
trx_reset_stats_func
)(
openair0_device
*
device
);
/*! \brief Terminate operation of the transceiver -- free all associated resources */
/*! \brief Terminate operation of the transceiver -- free all associated resources
* \param device the hardware to use
*/
void
(
*
trx_end_func
)(
openair0_device
*
device
);
/* Terminate operation */
/*! \brief Stop operation of the transceiver
* \param card RF Card to use
*/
int
(
*
trx_stop_func
)(
int
card
);
/* Functions API related to UE*/
/*! \brief Set RX feaquencies
* \param
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
* \param exmimo_dump_config dump EXMIMO configuration
* \returns 0 in success
*/
int
(
*
trx_set_freq_func
)(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
int
exmimo_dump_config
);
/*! \brief Set gains
* \param
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
* \returns 0 in success
*/
int
(
*
trx_set_gains_func
)(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
...
...
@@ -282,20 +293,47 @@ extern "C"
{
#endif
/*! \brief Initialize Openair RF target. It returns 0 if OK */
/*! \brief Initialize Openair RF target. It returns 0 if OK
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int
openair0_device_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
//USRP
/*! \brief Get the current timestamp of USRP */
/*! \brief Get the current timestamp of USRP
* \param device the hardware to use
*/
openair0_timestamp
get_usrp_time
(
openair0_device
*
device
);
/*! \brief Set the RX frequency of USRP RF TARGET */
/*! \brief Set the RX frequency of USRP RF TARGET
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int
openair0_set_rx_frequencies
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
//extern
/*! \brief Initialize Openair ETHERNET target. It returns 0 if OK */
//extern functions
/*! \brief Initialize Openair ETHERNET target. It returns 0 if OK
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int
openair0_dev_init_eth
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
/*! \brief Initialize Openair BLADERF target. It returns 0 if OK
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int
openair0_dev_init_bladerf
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
/*! \brief Initialize Openair USRP target. It returns 0 if OK
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int
openair0_dev_init_usrp
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
/*! \brief Initialize Openair EXMIMO target. It returns 0 if OK
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int
openair0_dev_init_exmimo
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
/*@}*/
...
...
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