Sistema l'errore da me commesso in fase di conversione...
[bertos.git] / drv / timer_qt.c
old mode 100755 (executable)
new mode 100644 (file)
index a9e38be..cb24195
@@ -1,4 +1,4 @@
-/*!
+/**
  * \file
  * <!--
  * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
 
 /*#*
  *#* $Log$
+ *#* Revision 1.6  2006/09/13 18:25:22  bernie
+ *#* Fix GCC error.
+ *#*
+ *#* Revision 1.5  2006/07/19 12:56:26  bernie
+ *#* Convert to new Doxygen style.
+ *#*
+ *#* Revision 1.4  2006/05/28 12:17:57  bernie
+ *#* Drop almost all the Qt3 cruft.
+ *#*
+ *#* Revision 1.3  2006/02/21 21:28:02  bernie
+ *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms.
+ *#*
+ *#* Revision 1.2  2006/02/20 02:01:35  bernie
+ *#* Port to Qt 4.1.
+ *#*
  *#* Revision 1.1  2005/11/27 03:06:36  bernie
  *#* Qt timer emulation.
  *#*
@@ -22,8 +37,8 @@
 #include <cfg/compiler.h> /* hptime.t */
 
 // Qt headers
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <QtCore/QDateTime>
+#include <QtCore/QTimer>
 
 
 // The user interrupt server routine
@@ -70,9 +85,9 @@ public:
                // Record initial time
                system_time.start();
 
-               // Activate 1ms timer interrupt
+               // Activate timer interrupt
                timer.connect(&timer, SIGNAL(timeout()), this, SLOT(timerInterrupt()));
-               timer.start(1);
+               timer.start(1000 / TIMER_TICKS_PER_SEC);
 
                initialized = true;
        }
@@ -97,13 +112,13 @@ public slots:
 
 
 /// HW dependent timer initialization.
-extern "C" static void timer_hw_init(void)
+static void timer_hw_init(void)
 {
        // Kick EmulTimer initialization
        EmulTimer::instance().init();
 }
 
-extern "C" INLINE hptime_t timer_hw_hpread(void)
+INLINE hptime_t timer_hw_hpread(void)
 {
        return EmulTimer::instance().hpread();
 }