sitara_depot/components/free_rtos/timer_sw/timer_sw.hpp
algin ae3cac8a7d feat: First commit
Adds sitara_depot/free_rtos

Original one is on server_gorbunov/SmartForce4.0/sitara_depot
2023-05-03 14:01:32 +03:00

32 lines
469 B
C++

/*
* timer_sw.hpp
*
* Created on: 13 ìàð. 2023 ã.
* Author: sychev
*/
#ifndef FREE_RTOS_TIMER_SW_TIMER_SW_HPP_
#define FREE_RTOS_TIMER_SW_TIMER_SW_HPP_
#include <cstdint>
class TimerSw {
public:
void start(uint32_t period);
void stop();
bool tick(uint32_t ticks);
bool is_started() { return enable_; }
private:
bool enable_ = false;
uint32_t cnt_ = 0;
uint32_t prd_ = 0;
};
#endif /* FREE_RTOS_TIMER_SW_TIMER_SW_HPP_ */