diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-09-18 21:07:30 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-09-18 21:07:30 +0200 |
commit | 4f6973b8500418abf83c2377d09396b8588f7746 (patch) | |
tree | 83862be273470ad25e492e62cf830cbc4ea4a9b5 /include/arch/lora32u4ii/driver/uptime.h | |
parent | 65d563aa36e1367d4d3191ac838c6fb60ac4f481 (diff) |
New architecture: lora32u4ii
Very limited support at the moment. No I2C/SPI, no USB bootloader or USB UART.
Diffstat (limited to 'include/arch/lora32u4ii/driver/uptime.h')
-rw-r--r-- | include/arch/lora32u4ii/driver/uptime.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/arch/lora32u4ii/driver/uptime.h b/include/arch/lora32u4ii/driver/uptime.h new file mode 100644 index 0000000..db2c039 --- /dev/null +++ b/include/arch/lora32u4ii/driver/uptime.h @@ -0,0 +1,27 @@ +#ifndef UPTIME_H +#define UPTIME_H + +#include <avr/io.h> + +class Uptime { + private: + Uptime(const Uptime ©); +#ifdef TIMER_S + uint8_t seconds; +#endif + + public: +#ifdef TIMER_S + Uptime () : seconds(0) {} +#else + Uptime () {} +#endif +#ifdef TIMER_S + inline uint8_t get_s() { return seconds; } + inline void tick_s() { seconds++; } +#endif +}; + +extern Uptime uptime; + +#endif |