Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

CANController/DC_DC/DC_DC.cpp

Committer:
martydd3
Date:
2014-11-07
Revision:
24:f58a3c0071c3
Parent:
22:fc802e7715f8

File content as of revision 24:f58a3c0071c3:

#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;
}