PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #include <TeensyThreads.h>
-
- volatile long int count = 0;
-
- void thread_func(int inc) {
- while(1) count += inc;
- }
-
- void setup() {
- threads.addThread(thread_func, 1);
- }
-
- void loop() {
- Serial.println(count);
- threads.delay(1000);
- }
|