Author: ks156
Date: 2009-10-20 08:45:22 +0200 (Tue, 20 Oct 2009)
New Revision: 5746

Modified:
   firmware/fuxusb/trunk/src/usb_task.c
Log:
* Reset the RF when the connexion is lost.


Modified: firmware/fuxusb/trunk/src/usb_task.c
===================================================================
--- firmware/fuxusb/trunk/src/usb_task.c        2009-10-20 06:36:56 UTC (rev 
5745)
+++ firmware/fuxusb/trunk/src/usb_task.c        2009-10-20 06:45:22 UTC (rev 
5746)
@@ -35,6 +35,7 @@
 #include "misc.h"
 #include "fifo_mic.h"
 #include "usb_ep.h"
+#include "rf.h"
 #include "lib_mcu\usb\usb_drv.h"
 
 /**
@@ -87,6 +88,15 @@
      */
     if (Usb_sof())
     {
+               static uint16_t reset_rf_ctr = 0;
+               if (!RF_ONLINE)
+               {
+                       if (++reset_rf_ctr > 1000)
+                       {
+                               reset_rf_ctr = 0;
+                               reset_rf();
+                       }
+               }
         Usb_clear_sof();
         led_behavior();
 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to