avr-fw-modules/core/src/thread_set_periodic.c

16 lines
234 B
C
Executable File

#include <hwo/threads.h>
#include <stdlib.h>
void thread_set_periodic(THREAD* thread,int32_t us) {
ATOMIC
if (!thread) {
thread = current_thread();
};
thread->periode = thread->periodic = us;
schedule_thread( thread );
};