diff options
| author | Josh Blum <josh@joshknows.com> | 2010-09-26 21:07:43 -0700 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2010-09-26 21:07:43 -0700 | 
| commit | 017e7202468a8800335c05afd4a85cb52c6171e6 (patch) | |
| tree | c5b8c7cc2190f74caa72b24bf5389a05ca6bb52a | |
| parent | 86213f8de2cc4ca671f9afbcf475c744fe7aebcb (diff) | |
| download | uhd-017e7202468a8800335c05afd4a85cb52c6171e6.tar.gz uhd-017e7202468a8800335c05afd4a85cb52c6171e6.tar.bz2 uhd-017e7202468a8800335c05afd4a85cb52c6171e6.zip | |
usrp1: add print out messages when loading images
| -rw-r--r-- | host/lib/usrp/usrp1/usrp1_ctrl.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.cpp b/host/lib/usrp/usrp1/usrp1_ctrl.cpp index 1dc6e6e25..76e8ce368 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.cpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.cpp @@ -38,6 +38,8 @@ enum firmware_code {  #define FX2_FIRMWARE_LOAD 0xa0 +static const bool load_img_msg = true; +  /***********************************************************************   * Helper Functions   **********************************************************************/ @@ -178,6 +180,7 @@ public:          unsigned char reset_n = 0;          //hit the reset line +        if (load_img_msg) std::cout << "Loading firmware image " << filestring << "..." << std::flush;          usrp_control_write(FX2_FIRMWARE_LOAD, 0xe600, 0,                             &reset_y, 1); @@ -213,7 +216,7 @@ public:                  //wait for things to settle                  boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); - +                if (load_img_msg) std::cout << " done" << std::endl;                  return USRP_FIRMWARE_LOAD_SUCCESS;               }              //type anything else is unhandled @@ -249,6 +252,7 @@ public:          unsigned char buf[ep0_size];          int ret; +        if (load_img_msg) std::cout << "Loading FPGA image: " << filestring << "..." << std::flush;          std::ifstream file;          file.open(filename, std::ios::in | std::ios::binary);          if (not file.good()) { @@ -282,6 +286,7 @@ public:          usrp_set_fpga_hash(hash);          file.close(); +        if (load_img_msg) std::cout << " done" << std::endl;          return 0;       } | 
