diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-08-07 10:25:27 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-08-07 11:23:59 -0700 |
commit | f1ebf688291a8f3026940125b2af50e069272fd8 (patch) | |
tree | ee5811707fd80e82d68fb1167e8e36ca6bb67dd0 /host/examples/tx_samples_c.c | |
parent | c2827e9a0bcfe9c2dd2e4dd5d68f895384564ec6 (diff) | |
download | uhd-f1ebf688291a8f3026940125b2af50e069272fd8.tar.gz uhd-f1ebf688291a8f3026940125b2af50e069272fd8.tar.bz2 uhd-f1ebf688291a8f3026940125b2af50e069272fd8.zip |
C API: feature additions, bugfixes
* Wrapped uhd::device_addrs_t, added find functions for multi_usrp, multi_usrp_clock
* Replaced getopt with public domain implementation
* Minor bugfixes
Diffstat (limited to 'host/examples/tx_samples_c.c')
-rw-r--r-- | host/examples/tx_samples_c.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/examples/tx_samples_c.c b/host/examples/tx_samples_c.c index 5a4b79005..3035297fd 100644 --- a/host/examples/tx_samples_c.c +++ b/host/examples/tx_samples_c.c @@ -102,19 +102,19 @@ int main(int argc, char* argv[]){ // Create USRP uhd_usrp_handle usrp; fprintf(stderr, "Creating USRP with args \"%s\"...\n", device_args); - EXECUTE_OR_GOTO(free_usrp, + EXECUTE_OR_GOTO(free_option_strings, uhd_usrp_make(&usrp, device_args) ) // Create TX streamer uhd_tx_streamer_handle tx_streamer; - EXECUTE_OR_GOTO(free_tx_streamer, + EXECUTE_OR_GOTO(free_usrp, uhd_tx_streamer_make(&tx_streamer) ) // Create TX metadata uhd_tx_metadata_handle md; - EXECUTE_OR_GOTO(free_tx_metadata, + EXECUTE_OR_GOTO(free_tx_streamer, uhd_tx_metadata_make(&md, false, 0.0, 0.1, true, false) ) @@ -224,7 +224,7 @@ int main(int argc, char* argv[]){ if(verbose){ fprintf(stderr, "Cleaning up USRP.\n"); } - if(return_code != EXIT_SUCCESS){ + if(return_code != EXIT_SUCCESS && usrp != NULL){ uhd_usrp_last_error(usrp, error_string, 512); fprintf(stderr, "USRP reported the following error: %s\n", error_string); } @@ -235,7 +235,7 @@ int main(int argc, char* argv[]){ free(device_args); } - fprintf(stderr, (return_code ? "Failure" : "Success")); + fprintf(stderr, (return_code ? "Failure\n" : "Success\n")); return return_code; } |