Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 19_Taster_BSW_oo 19_Taster_a
Fork of timer0 by
Diff: timer0.h
- Revision:
- 0:bbd867fd30d1
- Child:
- 1:45063f72267b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/timer0.h Sat Jul 26 07:27:37 2014 +0000
@@ -0,0 +1,36 @@
+
+#include "mbed.h"
+
+#define TIMER0_NUM_COUNTDOWNTIMERS 25
+
+// status definition:
+// 0 the timer has expired
+// 1 10 ms Timer
+// 2 Sekunden Timer
+// 3 Minuten Timer
+// 4 Stunden Timer
+// 0xFF Free timer
+
+
+class timer0 {
+ private:
+
+ struct timerStruct
+ {
+ unsigned char status; // siehe Beschreibung
+ unsigned int count_timer; // count down Zähler
+ } CountDownTimers[TIMER0_NUM_COUNTDOWNTIMERS];
+
+ Ticker ticker;
+
+ public:
+ uint16_t counter;
+
+ timer0();
+ void func(void);
+ uint8_t AllocateCountdownTimer (void);
+ void RemoveCountdownTimer(uint8_t timer);
+ uint8_t GetTimerStatus(uint8_t timer);
+ uint16_t GetTimerZeit(uint8_t timer);
+ void SetCountdownTimer(uint8_t timer, uint8_t status, uint16_t value);
+};
\ No newline at end of file
