mbed with working rtos for DISCO F746NG

Dependencies:   BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed

main.cpp

Committer:
habiburrahman
Date:
2015-11-30
Revision:
0:a21a45d681ba

File content as of revision 0:a21a45d681ba:

#include "mbed.h"
#include "TS_DISCO_F746NG.h"
#include "LCD_DISCO_F746NG.h"
#include "rtos.h"

#define STACK_SIZE DEFAULT_STACK_SIZE

DigitalOut led1(LED1);

LCD_DISCO_F746NG lcd;
TS_DISCO_F746NG ts;


void thread_1(void const *argument) {
    while (true) {
        led1 = !led1;
        Thread::wait(500);
    }
}

void thread_2(void const *argument) {
    while (true) {
        printf("this is a sample string\n");
        Thread::wait(1000);
    }
}


int main()
{
    Thread t1(thread_1, NULL, osPriorityNormal, STACK_SIZE);
    Thread t2(thread_2, NULL, osPriorityNormal, STACK_SIZE);
    
    while(1) {

    }
}