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.
Dependents: 17robo_fuzi 17robo_tokyo_kaede
cyclic_io.cpp
00001 #include "cyclic_io.h" 00002 #include "mbed.h" 00003 00004 CyclicIo::CyclicIo(PinName pin) : gpio(pin){ 00005 } 00006 00007 void CyclicIo::cyclic(int state){ 00008 if(state) { 00009 if(flag == false) { 00010 gpio = !gpio; 00011 } 00012 flag = true; 00013 } else flag = false; 00014 } 00015 00016 00017 void CyclicIo::cyclicOn(){ 00018 gpio = 0; 00019 } 00020 00021 void CyclicIo::cyclicOff(){ 00022 gpio = 1; 00023 } 00024 00025 int CyclicIo::getState(){ 00026 return (int)gpio; 00027 }
Generated on Tue Jul 12 2022 22:18:57 by
