KEIS

Dependencies:   mbed-rtos mbed

Fork of rtos_signals by mbed official

main.cpp

Committer:
khayakawa
Date:
2013-09-28
Revision:
4:ad6be128bc77
Parent:
1:6a8fcc666593

File content as of revision 4:ad6be128bc77:

#include "mbed.h"
#include "rtos.h"

DigitalOut led(LED1);

void led_thread(void const *argument) {
    while (true) {
        Thread::signal_wait(0x1);
        led = !led;
    }
}

int main (void) {
    Thread thread(led_thread);
    
    while (true) {
        Thread::wait(1000);
        thread.signal_set(0x1);
    }
}