diff options
author | Nick Foster <nick@ettus.com> | 2012-02-03 17:36:07 -0800 |
---|---|---|
committer | Nick Foster <nick@ettus.com> | 2012-02-03 17:38:33 -0800 |
commit | 0d2acffaf4d3e3b02dc9745e94b407356650f923 (patch) | |
tree | 616e53d896fcc341ae409e8a004d55e1280bea4d /firmware/fx2/b100/usrp_main.c | |
parent | f88dd2289b714b53a59d0fd6da1ddef549940e51 (diff) | |
download | uhd-0d2acffaf4d3e3b02dc9745e94b407356650f923.tar.gz uhd-0d2acffaf4d3e3b02dc9745e94b407356650f923.tar.bz2 uhd-0d2acffaf4d3e3b02dc9745e94b407356650f923.zip |
B100/B150: firmware disable FIFOs until host enables to keep junk out
Diffstat (limited to 'firmware/fx2/b100/usrp_main.c')
-rw-r--r-- | firmware/fx2/b100/usrp_main.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/firmware/fx2/b100/usrp_main.c b/firmware/fx2/b100/usrp_main.c index fdc4fce48..436bdeb36 100644 --- a/firmware/fx2/b100/usrp_main.c +++ b/firmware/fx2/b100/usrp_main.c @@ -81,6 +81,15 @@ static void initialize_gpif_buffer(int ep) { FIFORESET = 0x00; SYNCDELAY; } +void enable_xfers(int enable) { + if(enable) { + IFCONFIG |= bmIFSLAVE; + } else { + IFCONFIG &= ~bmIFSLAVE; + } + set_led_0(enable); +} + /* * Handle our "Vendor Extension" commands on endpoint 0. * If we handle this one, return non-zero. @@ -174,6 +183,7 @@ app_vendor_cmd (void) break; case VRQ_ENABLE_GPIF: + enable_xfers(wValueL); break; case VRQ_CLEAR_FPGA_FIFO: @@ -266,13 +276,6 @@ main (void) EA = 1; // global interrupt enable fx2_renumerate (); // simulates disconnect / reconnect - -// setup_flowstate_common(); - -//set up gpif slave mode here - //set slave FIFO mode - //set synchronous slave mode - ////both done in init_usrp() //set FLAGA, FLAGB, FLAGC, FLAGD to be EP2EF, EP4EF, EP6PF, EP8PF PINFLAGSAB = (bmEP2EF) | (bmEP4EF << 4); |