Commit c5fd6708 authored by Florian Kaltenberger's avatar Florian Kaltenberger

making use of gpsdo optional

parent 9c167fc3
...@@ -140,7 +140,9 @@ typedef enum { ...@@ -140,7 +140,9 @@ typedef enum {
//! This tells the underlying hardware to use the internal reference //! This tells the underlying hardware to use the internal reference
internal=0, internal=0,
//! This tells the underlying hardware to use the external reference //! This tells the underlying hardware to use the external reference
external=1 external=1,
//! This tells the underlying hardware to use the gpsdo reference
gpsdo=2
} clock_source_t; } clock_source_t;
/*! \brief RF frontend parameters set by application */ /*! \brief RF frontend parameters set by application */
......
...@@ -660,7 +660,9 @@ extern "C" { ...@@ -660,7 +660,9 @@ extern "C" {
uhd::set_thread_priority_safe(1.0); uhd::set_thread_priority_safe(1.0);
usrp_state_t *s = (usrp_state_t*)calloc(sizeof(usrp_state_t),1); usrp_state_t *s = (usrp_state_t*)calloc(sizeof(usrp_state_t),1);
if (openair0_cfg[0].clock_source==gpsdo)
s->use_gps =1; s->use_gps =1;
// Initialize USRP device // Initialize USRP device
device->openair0_cfg = openair0_cfg; device->openair0_cfg = openair0_cfg;
...@@ -755,7 +757,7 @@ extern "C" { ...@@ -755,7 +757,7 @@ extern "C" {
// lock mboard clocks // lock mboard clocks
if (openair0_cfg[0].clock_source == internal){ if (openair0_cfg[0].clock_source == internal){
//s->usrp->set_clock_source("internal"); s->usrp->set_clock_source("internal");
} }
else{ else{
s->usrp->set_clock_source("external"); s->usrp->set_clock_source("external");
......
...@@ -608,9 +608,6 @@ static void get_options (int argc, char **argv) { ...@@ -608,9 +608,6 @@ static void get_options (int argc, char **argv) {
// char line[1000]; // char line[1000];
// int l; // int l;
int k,i;//,j,k; int k,i;//,j,k;
#if defined(OAI_USRP) || defined(CPRIGW)
int clock_src;
#endif
int CC_id; int CC_id;
...@@ -639,6 +636,7 @@ static void get_options (int argc, char **argv) { ...@@ -639,6 +636,7 @@ static void get_options (int argc, char **argv) {
LONG_OPTION_USIMTEST, LONG_OPTION_USIMTEST,
LONG_OPTION_MMAPPED_DMA, LONG_OPTION_MMAPPED_DMA,
LONG_OPTION_EXTERNAL_CLOCK, LONG_OPTION_EXTERNAL_CLOCK,
LONG_OPTION_GPSDO_CLOCK,
LONG_OPTION_WAIT_FOR_SYNC, LONG_OPTION_WAIT_FOR_SYNC,
LONG_OPTION_SINGLE_THREAD_DISABLE, LONG_OPTION_SINGLE_THREAD_DISABLE,
LONG_OPTION_THREADIQ, LONG_OPTION_THREADIQ,
...@@ -681,6 +679,7 @@ static void get_options (int argc, char **argv) { ...@@ -681,6 +679,7 @@ static void get_options (int argc, char **argv) {
{"usim-test", no_argument, NULL, LONG_OPTION_USIMTEST}, {"usim-test", no_argument, NULL, LONG_OPTION_USIMTEST},
{"mmapped-dma", no_argument, NULL, LONG_OPTION_MMAPPED_DMA}, {"mmapped-dma", no_argument, NULL, LONG_OPTION_MMAPPED_DMA},
{"external-clock", no_argument, NULL, LONG_OPTION_EXTERNAL_CLOCK}, {"external-clock", no_argument, NULL, LONG_OPTION_EXTERNAL_CLOCK},
{"gpsdo-clock", no_argument, NULL, LONG_OPTION_GPSDO_CLOCK},
{"wait-for-sync", no_argument, NULL, LONG_OPTION_WAIT_FOR_SYNC}, {"wait-for-sync", no_argument, NULL, LONG_OPTION_WAIT_FOR_SYNC},
{"single-thread-disable", no_argument, NULL, LONG_OPTION_SINGLE_THREAD_DISABLE}, {"single-thread-disable", no_argument, NULL, LONG_OPTION_SINGLE_THREAD_DISABLE},
{"threadIQ", required_argument, NULL, LONG_OPTION_THREADIQ}, {"threadIQ", required_argument, NULL, LONG_OPTION_THREADIQ},
...@@ -810,6 +809,10 @@ static void get_options (int argc, char **argv) { ...@@ -810,6 +809,10 @@ static void get_options (int argc, char **argv) {
clock_source = external; clock_source = external;
break; break;
case LONG_OPTION_GPSDO_CLOCK:
clock_source = gpsdo;
break;
case LONG_OPTION_WAIT_FOR_SYNC: case LONG_OPTION_WAIT_FOR_SYNC:
wait_for_sync = 1; wait_for_sync = 1;
break; break;
...@@ -1002,24 +1005,6 @@ static void get_options (int argc, char **argv) { ...@@ -1002,24 +1005,6 @@ static void get_options (int argc, char **argv) {
break; break;
case 's':
#if defined(OAI_USRP) || defined(CPRIGW)
clock_src = atoi(optarg);
if (clock_src == 0) {
// char ref[128] = "internal";
//strncpy(uhd_ref, ref, strlen(ref)+1);
} else if (clock_src == 1) {
//char ref[128] = "external";
//strncpy(uhd_ref, ref, strlen(ref)+1);
}
#else
printf("Note: -s not defined for ExpressMIMO2\n");
#endif
break;
case 'S': case 'S':
exit_missed_slots=0; exit_missed_slots=0;
printf("Skip exit for missed slots\n"); printf("Skip exit for missed slots\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment