Tasty/include/sta/tasty/tasks/toggle.hpp
2024-01-07 00:41:32 +01:00

33 lines
556 B
C++

/*
* toggle.hpp
*
* Created on: Jan 1, 2024
* Author: Dario
*/
#ifndef INCLUDE_TASKS_TOGGLE_HPP_
#define INCLUDE_TASKS_TOGGLE_HPP_
#include <sta/tacos/thread.hpp>
namespace sta
{
namespace tasty
{
class ToggleThread : public sta::tacos::TacosThread
{
public:
ToggleThread(uint32_t ticks, uint32_t lockout = 0, const char* name = "toggle");
void init() override;
void func() override;
private:
uint32_t ticks_;
uint32_t lockout_;
};
} // namespace tasty
} // namespace sta
#endif /* INCLUDE_TASKS_TOGGLE_HPP_ */