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.
Dependencies: mbed BLE_API nRF51822
PowerSwitch.h
00001 #ifndef MBED_POWERSWITCH_H 00002 #define MBED_POWERSWITCH_H 00003 00004 #include "mbed.h" 00005 00006 class PowerSwitch { 00007 public: 00008 PowerSwitch(PinName pin); 00009 void doSwitch(bool state, float duration); 00010 bool powerStateOn(void); 00011 00012 private: 00013 DigitalOut _pin; 00014 bool powerState; 00015 void doSwitchEnd(void); 00016 00017 Ticker switchPeriod; 00018 00019 }; 00020 00021 #endif
Generated on Wed Jul 13 2022 03:55:21 by
1.7.2