diff options
author | IvanOrfanidi <i.orfanidi@thirdpin.io> | 2019-09-02 17:40:37 +0300 |
---|---|---|
committer | IvanOrfanidi <i.orfanidi@thirdpin.io> | 2019-09-02 17:40:37 +0300 |
commit | 2f3530fc51905cdefd706565009999b55d834c46 (patch) | |
tree | a54ea9355f8655352acba0119daf9048599f6f2b | |
parent | fe4fc8c9001ec43e840c986843523f962f1ef950 (diff) |
Added the functions status SusTick is active.
-rw-r--r-- | cm3cpp/systick.cpp | 5 | ||||
-rw-r--r-- | cm3cpp/systick.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cm3cpp/systick.cpp b/cm3cpp/systick.cpp index 180f8da..69098f2 100644 --- a/cm3cpp/systick.cpp +++ b/cm3cpp/systick.cpp @@ -131,6 +131,11 @@ bool Counter::stop() return true; } +bool Counter::is_active() const +{ + return _is_active; +} + #endif // CM3CPP_CUSTOM_SYSTICK } // namespace systick diff --git a/cm3cpp/systick.hpp b/cm3cpp/systick.hpp index 7685d86..2d6876c 100644 --- a/cm3cpp/systick.hpp +++ b/cm3cpp/systick.hpp @@ -61,6 +61,7 @@ class Counter bool timeout(); bool start(); bool stop(); + bool is_active() const; void set_period(uint32_t const period) { _period = period; } uint32_t period() const { return _period; } |