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