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 CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: CANController/DC_DC/DC_DC.cpp
- Revision:
- 22:fc802e7715f8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CANController/DC_DC/DC_DC.cpp Fri Nov 07 21:09:50 2014 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "DC_DC.h"
+
+DigitalOut dc_pin(p20);
+DigitalOut dc_control(p18);
+
+#define OFF 1
+#define ON 0
+
+DC::DC(){
+ dc_control = OFF;
+}
+
+bool DC::is_on(){
+ return dc_pin;
+}
+
+void DC::set(bool s){
+ if(s)
+ dc_control = ON;
+ else
+ dc_control = OFF;
+}
\ No newline at end of file
