#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "example.h"
void *user_data)
{
(void)host;
(void)timer;
(void)user_data;
}
void *user_data)
{
(void)timer;
(void)user_data;
}
{
0,
0);
for (;;) {}
}
void Led_InitAll(bool state)
void Led_Set(LedId led, bool state)
C language binding/interface for SuperTinyKernel RTOS.
C language binding for stk::time::TimerHost and stk::time::Timer.
struct stk_kernel_t stk_kernel_t
Opaque handle to a kernel instance.
void stk_kernel_start(stk_kernel_t *k)
Start the scheduler - never returns.
static stk_tick_t stk_ticks_from_ms_r(stk_time_t msec, uint32_t resolution)
Get ticks from milliseconds using an explicit tick resolution.
uint32_t stk_tick_resolution(void)
Returns how many microseconds correspond to one kernel tick.
#define STK_PERIODICITY_DEFAULT
Default tick period (1 ms).
void stk_kernel_init(stk_kernel_t *k, uint32_t tick_period_us)
Initialize kernel with given tick period.
stk_kernel_t * stk_kernel_create(uint8_t core_nr)
Create kernel.
stk_timer_result_t stk_timer_start(stk_timerhost_t *host, stk_timer_t *tmr, uint32_t delay, uint32_t period)
Start a timer.
stk_timer_result_t stk_timerhost_shutdown(stk_timerhost_t *host)
Gracefully shut down the TimerHost.
void stk_timerhost_init(stk_timerhost_t *host, stk_kernel_t *kernel, bool privileged)
Initialize the TimerHost and register its internal tasks with the kernel.
stk_timer_t * stk_timer_create(stk_timer_mem_t *const membuf, stk_timer_callback_t callback, void *user_data)
Construct a timer in the supplied memory buffer.
stk_timerhost_t * stk_timerhost_get(uint8_t core_nr)
Obtain the pre-allocated TimerHost for the given CPU core.
Opaque memory container for a stk_timer_t instance.
static void on_led_timer_expired(stk_timerhost_t *host, stk_timer_t *timer, void *user_data)
static stk_timer_mem_t s_LedTimerMem
static void on_shutdown_timer_expired(stk_timerhost_t *host, stk_timer_t *timer, void *user_data)
static stk_timer_mem_t s_ShutdownTimerMem