aboutsummaryrefslogblamecommitdiff
path: root/projects/rtos-test/thread-test.c
blob: 8b31a266b3cb709e3fdbc5f4f8f18ad7d4cb83ae (plain) (tree)























                                                               
#include "cmsis_os.h"

#include "stm-init.h"
#include "stm-led.h"

void led2_thread(void const *args)
{
    while (1) {
        led_toggle(LED_BLUE);
        osDelay(1000);
    }
}
osThreadDef(led2_thread, osPriorityNormal, DEFAULT_STACK_SIZE);

int main()
{
    stm_init();
    osThreadCreate(osThread(led2_thread), NULL);
    
    while (1) {
        led_toggle(LED_GREEN);
        osDelay(500);
    }
}