mbed with working rtos for DISCO F746NG
Dependencies: BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed
Diff: main.cpp
- Revision:
- 0:a21a45d681ba
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 30 03:35:17 2015 +0000 @@ -0,0 +1,37 @@ +#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) { + + } +}