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.

17 satır
233B

  1. #include <TeensyThreads.h>
  2. volatile long int count = 0;
  3. void thread_func(int inc) {
  4. while(1) count += inc;
  5. }
  6. void setup() {
  7. threads.addThread(thread_func, 1);
  8. }
  9. void loop() {
  10. Serial.println(count);
  11. threads.delay(1000);
  12. }