diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-22 11:28:16 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-22 11:28:16 +0100 |
commit | 7f02e87f3d34a1ab3878e13b17dd0218c6d1455c (patch) | |
tree | de2f38687df68e27afa5556dba91c8cb8132f1cf /include/arch/esp8266 | |
parent | 9b07d50daa0ce241d2677eebe777bc15b57ec7b0 (diff) |
esp8266: add missing features to driver/counter
Diffstat (limited to 'include/arch/esp8266')
-rw-r--r-- | include/arch/esp8266/driver/counter.h | 4 | ||||
-rw-r--r-- | include/arch/esp8266/driver/uptime.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/arch/esp8266/driver/counter.h b/include/arch/esp8266/driver/counter.h index 0b50c8e..beb36e5 100644 --- a/include/arch/esp8266/driver/counter.h +++ b/include/arch/esp8266/driver/counter.h @@ -7,8 +7,8 @@ extern "C" { } #include "c_types.h" -typedef counter_value_t uint32_t; -typedef counter_overflow_t uint32_t; +typedef uint32_t counter_value_t; +typedef uint32_t counter_overflow_t; class Counter { private: diff --git a/include/arch/esp8266/driver/uptime.h b/include/arch/esp8266/driver/uptime.h index 21740c9..44dde43 100644 --- a/include/arch/esp8266/driver/uptime.h +++ b/include/arch/esp8266/driver/uptime.h @@ -14,6 +14,7 @@ class Uptime { public: Uptime () {} inline uint32_t get_us() { return system_get_time(); } + inline uint32_t get_s() { return system_get_time() / 1000000; } inline uint32_t get_cycles() { |