A set of classes that mimic the behaviour of Mbed Ticker class but using TIMER0, TIMER1, TIMER2 and the RIT.

Revision:
0:5c7fd96cf29a
Child:
1:e60d949ec09a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TickersSys.h	Fri Feb 11 10:42:52 2011 +0000
@@ -0,0 +1,81 @@
+/*
+    Copyright (c) 2011 Andy Kirkham
+ 
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+ 
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+ 
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+    THE SOFTWARE.
+*/
+
+#ifndef AJK_TICKERSSYS_H
+#define AJK_TICKERSSYS_H
+
+#include "mbed.h"
+#include "Tickers.h"
+#include <list>
+
+namespace AjK {
+
+class TickerA;
+
+// Ticker1 controller.
+class Ticker1Sys {
+protected:
+    list<TickerA *> tickers;
+    
+public:
+    void init(void);
+    Ticker1Sys();
+    void isr(void);    
+    void addTicker(TickerA *t);
+    void delTicker(TickerA *t);        
+};
+
+class TickerB;
+
+// Ticker2 controller.
+class Ticker2Sys {
+protected:
+    list<TickerB *> tickers;
+    
+public:
+    void init(void);
+    Ticker2Sys();
+    void isr(void);    
+    void addTicker(TickerB *t);    
+    void delTicker(TickerB *t);    
+};
+
+class TickerC;
+
+// TickerR controller.
+class TickerRSys {
+protected:
+    list<TickerC *> tickers;
+    
+public:
+    void init(void);
+    TickerRSys();
+    void isr(void);    
+    void addTicker(TickerC *t);    
+    void delTicker(TickerC *t);    
+};
+
+}; // namespace AjK ends.
+
+using namespace AjK;
+
+#endif