diff options
Diffstat (limited to 'usrp/host/apps')
-rw-r--r-- | usrp/host/apps/test_usrp_standard_rx.cc | 10 | ||||
-rw-r--r-- | usrp/host/apps/test_usrp_standard_tx.cc | 12 | ||||
-rw-r--r-- | usrp/host/apps/usrp_cal_dc_offset.cc | 10 |
3 files changed, 13 insertions, 19 deletions
diff --git a/usrp/host/apps/test_usrp_standard_rx.cc b/usrp/host/apps/test_usrp_standard_rx.cc index 49f1f21bb..4a47daa95 100644 --- a/usrp/host/apps/test_usrp_standard_rx.cc +++ b/usrp/host/apps/test_usrp_standard_rx.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2003,2006 Free Software Foundation, Inc. + * Copyright 2003,2006,2008 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -44,7 +44,7 @@ char *prog_name; -static bool test_input (usrp_standard_rx *urx, int max_bytes, FILE *fp); +static bool test_input (usrp_standard_rx_sptr urx, int max_bytes, FILE *fp); static void set_progname (char *path) @@ -189,7 +189,7 @@ main (int argc, char **argv) mode |= usrp_standard_rx::FPGA_MODE_COUNTING; - usrp_standard_rx *urx = + usrp_standard_rx_sptr urx = usrp_standard_rx::make (which_board, decim, 1, -1, mode, fusb_block_size, fusb_nblocks); @@ -214,14 +214,12 @@ main (int argc, char **argv) if (fp) fclose (fp); - delete urx; - return 0; } static bool -test_input (usrp_standard_rx *urx, int max_bytes, FILE *fp) +test_input (usrp_standard_rx_sptr urx, int max_bytes, FILE *fp) { int fd = -1; static const int BUFSIZE = urx->block_size(); diff --git a/usrp/host/apps/test_usrp_standard_tx.cc b/usrp/host/apps/test_usrp_standard_tx.cc index 6418c4abf..488995526 100644 --- a/usrp/host/apps/test_usrp_standard_tx.cc +++ b/usrp/host/apps/test_usrp_standard_tx.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2003,2004 Free Software Foundation, Inc. + * Copyright 2003,2004,2008 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -42,7 +42,7 @@ char *prog_name; -static bool test_output (usrp_standard_tx *utx, int max_bytes, double ampl, +static bool test_output (usrp_standard_tx_sptr utx, int max_bytes, double ampl, bool dc_p, bool counting_p); static void @@ -210,7 +210,7 @@ main (int argc, char **argv) } #endif - usrp_standard_tx *utx; + usrp_standard_tx_sptr utx; utx = usrp_standard_tx::make (which_board, interp, @@ -226,7 +226,7 @@ main (int argc, char **argv) die ("utx->set_tx_freq"); if (dump_regs_p) - do_dump_codec_regs (utx); + do_dump_codec_regs (utx.get()); fflush (stdout); @@ -236,14 +236,12 @@ main (int argc, char **argv) test_output (utx, max_bytes, ampl, dc_p, counting_p); - delete utx; - return 0; } static bool -test_output (usrp_standard_tx *utx, int max_bytes, double ampl, +test_output (usrp_standard_tx_sptr utx, int max_bytes, double ampl, bool dc_p, bool counting_p) { static const int BUFSIZE = utx->block_size(); diff --git a/usrp/host/apps/usrp_cal_dc_offset.cc b/usrp/host/apps/usrp_cal_dc_offset.cc index e836e1aab..5ebac12a3 100644 --- a/usrp/host/apps/usrp_cal_dc_offset.cc +++ b/usrp/host/apps/usrp_cal_dc_offset.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2008 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -43,7 +43,7 @@ char *prog_name; static void -run_cal(usrp_standard_rx *u, int which_side, int decim, bool verbose_p) +run_cal(usrp_standard_rx_sptr u, int which_side, int decim, bool verbose_p) { static const int BUFSIZE = u->block_size(); static const int N = BUFSIZE/sizeof (short); @@ -213,11 +213,11 @@ main (int argc, char **argv) usrp_local_sighandler sigquit (SIGQUIT, usrp_local_sighandler::throw_signal); #endif - usrp_standard_rx *urx = + usrp_standard_rx_sptr urx = usrp_standard_rx::make(which_board, decim, nchannels, mux, mode, fusb_block_size, fusb_nblocks); - if (urx == 0) + if (!urx) die("usrp_standard_rx::make"); try { @@ -236,7 +236,5 @@ main (int argc, char **argv) catch(...){ fprintf (stderr, "usrp_cal_dc_offset: caught something\n"); } - - delete urx; } |