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.
Revision 0:a5d388a0355c, committed 2016-08-04
- Comitter:
- moneneholic
- Date:
- Thu Aug 04 00:45:29 2016 +0000
- Commit message:
- FirstVer
Changed in this revision
GVD.cpp | Show annotated file Show diff for this revision Revisions of this file |
GVD.hpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r a5d388a0355c GVD.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GVD.cpp Thu Aug 04 00:45:29 2016 +0000 @@ -0,0 +1,33 @@ +#include "GVD.hpp" + +GVD::GVD(PinName p0,PinName p1,PinName p2,PinName p3,PinName p4,PinName p5,PinName p6,PinName p7){ + _dOut[0] = new DigitalOut(p0); + _dOut[1] = new DigitalOut(p1); + _dOut[2] = new DigitalOut(p2); + _dOut[3] = new DigitalOut(p3); + _dOut[4] = new DigitalOut(p4); + _dOut[5] = new DigitalOut(p5); + _dOut[6] = new DigitalOut(p6); + _dOut[7] = new DigitalOut(p7); +} + +void GVD::write(bool p0State,bool p1State,bool p2State,bool p3State,bool p4State,bool p5State,bool p6State,bool p7State){ + _dOut[0]->write(p0State); + _dOut[1]->write(p1State); + _dOut[2]->write(p2State); + _dOut[3]->write(p3State); + _dOut[4]->write(p4State); + _dOut[5]->write(p5State); + _dOut[6]->write(p6State); + _dOut[7]->write(p7State); +} + +void GVD::off(){ + _dOut[1]->write(0); + _dOut[2]->write(0); + _dOut[3]->write(0); + _dOut[4]->write(0); + _dOut[5]->write(0); + _dOut[6]->write(0); + _dOut[7]->write(0); +} \ No newline at end of file
diff -r 000000000000 -r a5d388a0355c GVD.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GVD.hpp Thu Aug 04 00:45:29 2016 +0000 @@ -0,0 +1,14 @@ +#ifndef GVD_HPP +#define GVD_HPP + +#include "mbed.h" + +class GVD{ +public: + GVD(PinName p0,PinName p1,PinName p2,PinName p3,PinName p4,PinName p5,PinName p6,PinName p7); + void write(bool p0State,bool p1State,bool p2State,bool p3State,bool p4State,bool p5State,bool p6State,bool p7State); + void off(); +private: + DigitalOut* _dOut[8]; +}; +#endif //GVD_HPP \ No newline at end of file