Adds sitara_depot/free_rtos Original one is on server_gorbunov/SmartForce4.0/sitara_depot
32 lines
469 B
C++
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_ */
|