commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8877 - gnuradio/branches/developers/trondeau/dbs/gr-u


From: trondeau
Subject: [Commit-gnuradio] r8877 - gnuradio/branches/developers/trondeau/dbs/gr-usrp/src
Date: Sun, 13 Jul 2008 11:32:10 -0600 (MDT)

Author: trondeau
Date: 2008-07-13 11:32:08 -0600 (Sun, 13 Jul 2008)
New Revision: 8877

Modified:
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.cc
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h
Log:
making data types consistent

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h  
2008-07-13 17:22:42 UTC (rev 8876)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h  
2008-07-13 17:32:08 UTC (rev 8877)
@@ -143,7 +143,7 @@
    * \param value              [0,4095]
    * \returns true iff successful
    */
-  virtual bool write_aux_dac (int which_board, int which_dac, unsigned int 
value) {return false;}
+  virtual bool write_aux_dac (int which_board, int which_dac, int value) 
{return false;}
 
   /*!
    * \brief Read auxiliary analog to digital converter.
@@ -152,7 +152,7 @@
    * \param which_adc          [0,1]
    * \returns value in the range [0,4095] if successful, else READ_FAILED.
    */
-  virtual unsigned int read_aux_adc (int which_dboard, int which_adc) {return 
0;}
+  virtual int read_aux_adc (int which_dboard, int which_adc) {return 0;}
 
   /*!
    * \brief Write EEPROM on motherboard or any daughterboard.
@@ -195,7 +195,7 @@
    * \param which      which ADC[0,3]: 0 = RX_A I, 1 = RX_A Q...
    * \param offset     16-bit value to subtract from raw ADC input.
    */
-  virtual bool set_adc_offset (int which, unsigned int offset) {return false;}
+  virtual bool set_adc_offset (int which, int offset) {return false;}
 
   /*!
    * \brief Set DAC offset correction
@@ -236,7 +236,7 @@
    * without a very good reason.  Using this method incorrectly will
    * kill your USRP motherboard and/or daughterboard.
    */
-  virtual bool _write_oe (int which_dboard, unsigned int value, unsigned int 
mask) {return false;}
+  virtual bool _write_oe (int which_dboard, int value, int mask) {return 
false;}
 
   /*!
    * \brief Write daughterboard i/o pin value
@@ -245,7 +245,7 @@
    * \param value              value to write into register
    * \param mask               which bits of value to write into reg
    */
-  virtual bool write_io (int which_dboard, unsigned int value, unsigned int 
mask) {return false;}
+  virtual bool write_io (int which_dboard, int value, int mask) {return false;}
 
   /*!
    * \brief Read daughterboard i/o pin value
@@ -253,7 +253,7 @@
    * \param which_dboard       [0,1] which d'board
    * \returns register value if successful, else READ_FAILED
    */
-  virtual unsigned int read_io (int which_dboard) {return 0;}
+  virtual int read_io (int which_dboard) {return 0;}
 
     // ----------------------------------------------------------------
   // internal routines...  
@@ -266,7 +266,7 @@
    * \param value      32-bit value
    * \returns true iff successful
    */
-  virtual bool _write_fpga_reg (int regno, unsigned int value) {return false;} 
//< 7-bit regno, 32-bit value
+  virtual bool _write_fpga_reg (int regno, int value) {return false;}  //< 
7-bit regno, 32-bit value
 
   /*!
    * \brief Write FPGA register masked.
@@ -275,14 +275,14 @@
    * \param mask               16-bit mask
    * \returns true iff successful
    */
-  virtual bool _write_fpga_reg_masked (int regno, unsigned int value, int 
mask) {return false;}        //< 7-bit regno, 16-bit value, 16-bit mask
+  virtual bool _write_fpga_reg_masked (int regno, int value, int mask) {return 
false;} //< 7-bit regno, 16-bit value, 16-bit mask
 
   /*!
    * \brief Read FPGA register.
    * \param regno      7-bit register number
    * \returns register value if successful, else READ_FAILED
    */
-  virtual unsigned int _read_fpga_reg (int regno) {return 0;}
+  virtual int _read_fpga_reg (int regno) {return 0;}
 
   /*!
    * \brief Write AD9862 register.
@@ -299,7 +299,7 @@
    * \param regno      6-bit register number
    * \returns register value if successful, else READ_FAILED
    */
-  virtual unsigned int  _read_9862 (int which_codec, int regno) const {return 
0;}
+  virtual int  _read_9862 (int which_codec, int regno) const {return 0;}
 
   /*!
    * \brief Write data to SPI bus peripheral.

Modified: 
gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.cc
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.cc    
2008-07-13 17:22:42 UTC (rev 8876)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.cc    
2008-07-13 17:32:08 UTC (rev 8877)
@@ -204,12 +204,12 @@
 }
 
 bool
-usrp1_sink_base::write_aux_dac (int which_dboard, int which_dac, unsigned int 
value)
+usrp1_sink_base::write_aux_dac (int which_dboard, int which_dac, int value)
 {
   return d_usrp->write_aux_dac (which_dboard, which_dac, value);
 }
 
-unsigned int
+int
 usrp1_sink_base::read_aux_adc (int which_dboard, int which_adc)
 {
   return d_usrp->read_aux_adc (which_dboard, which_adc);
@@ -277,7 +277,7 @@
 }
 
 bool
-usrp1_sink_base::set_adc_offset (int which, unsigned int offset)
+usrp1_sink_base::set_adc_offset (int which, int offset)
 {
   return d_usrp->set_adc_offset (which, offset);
 }
@@ -301,18 +301,18 @@
 }
 
 bool
-usrp1_sink_base::_write_oe (int which_dboard, unsigned int value, unsigned int 
mask)
+usrp1_sink_base::_write_oe (int which_dboard, int value, int mask)
 {
   return d_usrp->_write_oe (which_dboard, value, mask);
 }
 
 bool
-usrp1_sink_base::write_io (int which_dboard, unsigned int value, unsigned int 
mask)
+usrp1_sink_base::write_io (int which_dboard, int value, int mask)
 {
   return d_usrp->write_io (which_dboard, value, mask);
 }
 
-unsigned int
+int
 usrp1_sink_base::read_io (int which_dboard)
 {
   return d_usrp->read_io (which_dboard);
@@ -321,12 +321,12 @@
 // internal routines...
 
 bool
-usrp1_sink_base::_write_fpga_reg (int regno, unsigned int value)
+usrp1_sink_base::_write_fpga_reg (int regno, int value)
 {
   return d_usrp->_write_fpga_reg (regno, value);
 }
 
-unsigned int
+int
 usrp1_sink_base::_read_fpga_reg (int regno)
 {
   return d_usrp->_read_fpga_reg (regno);
@@ -338,7 +338,7 @@
   return d_usrp->_write_9862 (which_codec, regno, value);
 }
 
-unsigned int
+int
 usrp1_sink_base::_read_9862 (int which_codec, int regno) const
 {
   return d_usrp->_read_9862 (which_codec, regno);

Modified: 
gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h     
2008-07-13 17:22:42 UTC (rev 8876)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h     
2008-07-13 17:32:08 UTC (rev 8877)
@@ -173,7 +173,7 @@
    * \param value              [0,4095]
    * \returns true iff successful
    */
-  bool write_aux_dac (int which_board, int which_dac, unsigned int value);
+  bool write_aux_dac (int which_board, int which_dac, int value);
 
   /*!
    * \brief Read auxiliary analog to digital converter.
@@ -182,7 +182,7 @@
    * \param which_adc          [0,1]
    * \returns value in the range [0,4095] if successful, else READ_FAILED.
    */
-  unsigned int read_aux_adc (int which_dboard, int which_adc);
+  int read_aux_adc (int which_dboard, int which_adc);
 
   /*!
    * \brief Write EEPROM on motherboard or any daughterboard.
@@ -225,7 +225,7 @@
    * \param which      which ADC[0,3]: 0 = RX_A I, 1 = RX_A Q...
    * \param offset     16-bit value to subtract from raw ADC input.
    */
-  bool set_adc_offset (int which, unsigned int offset);
+  bool set_adc_offset (int which, int offset);
 
   /*!
    * \brief Set DAC offset correction
@@ -266,7 +266,7 @@
    * without a very good reason.  Using this method incorrectly will
    * kill your USRP motherboard and/or daughterboard.
    */
-  bool _write_oe (int which_dboard, unsigned int value, unsigned int mask);
+  bool _write_oe (int which_dboard, int value, int mask);
 
   /*!
    * \brief Write daughterboard i/o pin value
@@ -275,7 +275,7 @@
    * \param value              value to write into register
    * \param mask               which bits of value to write into reg
    */
-  bool write_io (int which_dboard, unsigned int value, unsigned int mask);
+  bool write_io (int which_dboard, int value, int mask);
 
   /*!
    * \brief Read daughterboard i/o pin value
@@ -283,8 +283,9 @@
    * \param which_dboard       [0,1] which d'board
    * \returns register value if successful, else READ_FAILED
    */
-  unsigned int read_io (int which_dboard);
 
+  int read_io (int which_dboard);
+
   //
   // internal routines...
   // You probably shouldn't be using these...
@@ -295,14 +296,14 @@
    * \param value      32-bit value
    * \returns true iff successful
    */
-  bool _write_fpga_reg (int regno, unsigned int value);        //< 7-bit 
regno, 32-bit value
+  bool _write_fpga_reg (int regno, int value); //< 7-bit regno, 32-bit value
 
   /*!
    * \brief Read FPGA register.
    * \param regno      7-bit register number
    * \returns register value if successful, else READ_FAILED
    */
-  unsigned int  _read_fpga_reg (int regno);
+  int  _read_fpga_reg (int regno);
 
   /*!
    * \brief Write AD9862 register.
@@ -319,7 +320,7 @@
    * \param regno      6-bit register number
    * \returns register value if successful, else READ_FAILED
    */
-  unsigned int  _read_9862 (int which_codec, int regno) const;
+  int  _read_9862 (int which_codec, int regno) const;
 
   /*!
    * \brief Write data to SPI bus peripheral.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]