Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Function.cpp
- Revision:
- 0:2270b7a3a8ad
- Child:
- 2:14bfd1fc2163
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Function.cpp Thu Nov 16 15:49:53 2017 +0000 @@ -0,0 +1,35 @@ +#include "Ka.h" + + +Ka::Ka() : m(LED0) +{} +void Ka::set_led0() +{ + m = 1; +} + +void Ka::clear_led0() +{ + m = 0; +} +void Ka::invert() +{ + if (m==0){ + m=1; + } + else {m=0;} +} +void Ka::toggle (int a) +{ + a=a+a; + for (int b = 0 ; b<a ; b++){ + if (b%2==0){ + m=1; + } + else { m=0; } + wait(1); + } +} + + +