12#include <ds_types_lambda.h>
15typedef uintmax_t ds_thread_t;
32 bool take(uint32_t wait_ms);
72 void setCallback(
const lambda<
void(
void)> &callback)
77 void setAutoReload(
bool autoreload);
79 void start(uint32_t period_ms);
81 void startFromIsr(int32_t* woken);
82 void startFromIsr(uint32_t period_ms, int32_t* woken);
85 void stopFromIsr(int32_t* woken);
87 bool isActive(
void)
const;
91 lambda<void(
void)> mCallback;
93 static void callbackEntry(
DsTimer* timer);
97int32_t DsOsGetTick(
void);
98ds_thread_t DsOsGetThreadId(
void);
DsSemaphore is a class that implements a binary semaphore.
Definition ds_os.h:22
void giveFromIsr(int32_t *woken)
Gives the semaphore. Can be called from an interrupt context.
void give(void)
Gives the semaphore.
bool take(uint32_t wait_ms)
Take the semaphore.
Definition ds_types_lambda.h:24