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
timer0.h
00001 #ifndef TIMER0_H 00002 #define TIMER0_H 00003 00004 #include "mbed.h" 00005 00006 #define TIMER0_NUM_COUNTDOWNTIMERS 25 00007 00008 // status definition: 00009 // 0 the timer has expired 00010 // 1 10 ms Timer 00011 // 2 Sekunden Timer 00012 // 3 Minuten Timer 00013 // 4 Stunden Timer 00014 // 0xFF Free timer 00015 00016 00017 class timer0 { 00018 private: 00019 00020 struct timerStruct 00021 { 00022 unsigned char status; // siehe Beschreibung 00023 unsigned int count_timer; // count down Zähler 00024 } CountDownTimers[TIMER0_NUM_COUNTDOWNTIMERS]; 00025 00026 Ticker ticker; 00027 00028 public: 00029 uint16_t counter; 00030 uint16_t countMillisecond; 00031 00032 timer0(); 00033 void func(void); 00034 uint8_t AllocateCountdownTimer (void); 00035 void RemoveCountdownTimer(uint8_t timer); 00036 uint8_t GetTimerStatus(uint8_t timer); 00037 uint16_t GetTimerZeit(uint8_t timer); 00038 void SetCountdownTimer(uint8_t timer, uint8_t status, uint16_t value); 00039 }; 00040 00041 #endif
Generated on Mon Jul 18 2022 01:30:50 by
1.7.2
