Lahis Almeida / Mbed 2 deprecated CNC_CONTROLLER

Dependencies:   mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Debug.cpp Source File

Debug.cpp

00001 #include "Debug.h"
00002 
00003 Debug::Debug(){
00004     debugPin_1 = new DigitalOut(LED1);
00005     debugPin_2 = new DigitalOut(LED2);
00006     debugPin_3 = new DigitalOut(LED3);
00007     debugPin_4 = new DigitalOut(LED4);
00008 }
00009 
00010 
00011 void Debug::debugPin(int led, int state){
00012 
00013     switch(led){
00014         case 1:
00015             debugPin_1->write(state);
00016             break;
00017         case 2:
00018             debugPin_2->write(state);
00019             break;
00020         case 3:
00021             debugPin_3->write(state);
00022             break;
00023         case 4:
00024             debugPin_4->write(state);
00025             break;
00026         default:
00027             debugPin_1->write(state);
00028             debugPin_2->write(state);
00029             debugPin_3->write(state);
00030             debugPin_4->write(state);
00031             break;
00032     }
00033     
00034 }