From 0d2acffaf4d3e3b02dc9745e94b407356650f923 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Fri, 3 Feb 2012 17:36:07 -0800 Subject: B100/B150: firmware disable FIFOs until host enables to keep junk out --- firmware/fx2/b100/usrp_main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'firmware/fx2/b100/usrp_main.c') 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); -- cgit v1.2.3