![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut out(p5); 00004 #if defined(TARGET_LPC1114) 00005 AnalogIn in(p20); 00006 #else 00007 AnalogIn in(p19); 00008 #endif 00009 00010 volatile float w, x, y, z; 00011 int main() { 00012 while(1) { 00013 z = x * y / w; 00014 printf("Hello World %d %f\n", out.read(), z); 00015 if(in > 0.5) { 00016 out = !out; 00017 } 00018 } 00019 }
Generated on Sun Jul 17 2022 08:25:26 by
![doxygen](doxygen.png)