[tuxdroid-svn] r5746 - firmware/fuxusb/trunk/src
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-10-20 06:45:33
|
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();
|