[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's |
Date: |
Sun, 13 Nov 2005 15:21:13 -0800 |
User-agent: |
Mutt/1.5.6i |
On Fri, Nov 11, 2005 at 12:02:18PM -0500, address@hidden wrote:
> No I have not yet made that change. I have been trying to figure out how
> to use it. I don't understand the brief description
>
> /*!
> * \brief Enable/disable automatic DC offset removal control loop in FPGA
> *
> * \param bits which control loops to enable
> * \param mask which \p bits to pay attention to
> *
> * If the corresponding bit is set, enable the automatic DC
> * offset correction control loop.
> *
> * <pre>
> * The 4 low bits are significant:
> *
> * ADC0 = (1 << 0)
> * ADC1 = (1 << 1)
> * ADC2 = (1 << 2)
> * ADC3 = (1 << 3)
> * </pre>
> *
> * By default the control loop is enabled on all ADC's.
> */
>
> bool set_dc_offset_cl_enable(int bits, int mask);
> I don't know what to use for bit or mask values. Is this like the mux
> values? Please explain how you determine the bit and mask values to use?
Hi Mike,
Many places in the code we use a pair of arguments with names like
"bits and mask" or "val and mask". This pattern allows us modify only
a subset of the bits in a given target word or register.
Assuming that "reg" is the value we are modifying, the result is
equivalent to
reg = (reg & ~mask) | (bits & mask)
We use this pattern because it allows us to atomically implement the
read/modify/write on for example the FPGA, where it's safe even in the
face of multiple processes trying to modify different bits in the same
register.
Eric
- Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's, (continued)
- Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's, Robitaille, Michael, 2005/11/07
- Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's, Robitaille, Michael, 2005/11/07
- RE: [Discuss-gnuradio] Using USRP w/o Daughterboard's, Robitaille, Michael, 2005/11/08
- RE: [Discuss-gnuradio] Using USRP w/o Daughterboard's, Robitaille, Michael, 2005/11/10
- Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's, address@hidden, 2005/11/11
- Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's,
Eric Blossom <=
- Re: [Discuss-gnuradio] Using USRP w/o Daughterboard's, address@hidden, 2005/11/14