Author: ks156
Date: 2009-10-20 08:51:55 +0200 (Tue, 20 Oct 2009)
New Revision: 5748
Modified:
firmware/fuxusb/branches/auto_reset_rf/src/usb_task.c
Log:
* Reset RF when the connexion is lost
Modified: firmware/fuxusb/branches/auto_reset_rf/src/usb_task.c
===================================================================
--- firmware/fuxusb/branches/auto_reset_rf/src/usb_task.c 2009-10-20
06:49:49 UTC (rev 5747)
+++ firmware/fuxusb/branches/auto_reset_rf/src/usb_task.c 2009-10-20
06:51:55 UTC (rev 5748)
@@ -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