Just a test

Dependencies:   BSP_DISCO_F769NI LCD_DISCO_F769NI lcd_log esp8266-driver

Fork of mbed-os-example-blinky-5 by Joscha Ihl

main.cpp

Committer:
joschaihl
Date:
2017-05-20
Revision:
0:2e946c38e476
Child:
1:361238d5a1bc

File content as of revision 0:2e946c38e476:

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

Serial pc(USBTX, USBRX);

DigitalOut led1(LED1);

void print_thread()
{
    while (true) {
        Thread::wait(1000);
        pc.printf("Hallo Welt!!!\r\n");
    }
}

void led_thread() {
    while(true) {
        Thread::wait(200);
        led1 = !led1;
    }
}

int main()
{
    pc.baud(115200*2);
    pc.printf("*** Joscha ***\r\n");
    Thread t1(osPriorityNormal), t2(osPriorityNormal);

    
    t1.start(print_thread);
    t2.start(led_thread);
    while (true) {
        pc.printf("\n\n*** RTOS basic example ***\r\n");

        Thread::wait(500);
    }
}