mirror of https://github.com/ARMmbed/mbed-os.git
Adding threaded blinky integration test
parent
7996649d96
commit
7dc3159b69
|
@ -0,0 +1,25 @@
|
|||
#include "test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "rtos.h"
|
||||
|
||||
DigitalOut led1(LED1);
|
||||
|
||||
|
||||
void led1_thread(void const *args) {
|
||||
int count = 0;
|
||||
while (true) {
|
||||
Thread::wait(1000);
|
||||
greentea_send_kv("tick", count);
|
||||
count++;
|
||||
led1 = !led1;
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
GREENTEA_SETUP(20, "wait_us_auto");
|
||||
|
||||
Thread thread(led1_thread);
|
||||
|
||||
while (true) {
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue