Skip to content

Commit edaf2bf

Browse files
committed
Merge pull request #45 from bridadan/add-threaded-blinky-test
Adding threaded blinky integration test
2 parents ed1952d + 7dc3159 commit edaf2bf

File tree

1 file changed

+25
-0
lines changed
  • TESTS/integration/threaded_blinky

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "test_env.h"
2+
#include "mbed.h"
3+
#include "rtos.h"
4+
5+
DigitalOut led1(LED1);
6+
7+
8+
void led1_thread(void const *args) {
9+
int count = 0;
10+
while (true) {
11+
Thread::wait(1000);
12+
greentea_send_kv("tick", count);
13+
count++;
14+
led1 = !led1;
15+
}
16+
}
17+
18+
int main() {
19+
GREENTEA_SETUP(20, "wait_us_auto");
20+
21+
Thread thread(led1_thread);
22+
23+
while (true) {
24+
}
25+
}

0 commit comments

Comments
 (0)