Andy Pomfret
/
UoY-32C-lab8-threads
Template project for University of York ELE00032C Lab 8
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut green(D2); 00004 DigitalOut red(D3); 00005 00006 Thread redThread; 00007 00008 void redThreadFn() { 00009 00010 // Flash the red LED here 00011 00012 } 00013 00014 int main() { 00015 00016 redThread.start(redThreadFn); 00017 00018 // Flash the green LED here 00019 00020 }
Generated on Thu Jul 21 2022 03:27:23 by 1.7.2