![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fault final (may be)
Fork of fault_man by
main.cpp
- Committer:
- sakthipriya
- Date:
- 2014-12-02
- Revision:
- 0:e5e97851bbd6
- Child:
- 1:cde488f73488
File content as of revision 0:e5e97851bbd6:
#include "mbed.h" #include "rtos.h" #define FAULT1 D0 #define FAULT2 D1 #define FAULT3 D2 #define FAULT4 D3 #define FAULT5 D4 #define FAULT6 D5 #define FAULT7 D6 #define FAULT8 D7 #define FAULT_CLEAR1 D8 #define FAULT_CLEAR1 D9 #define FAULT_CLEAR1 D10 #define FAULT_CLEAR1 D11 #define FAULT_CLEAR1 D12 #define FAULT_CLEAR1 D13 #define FAULT_CLEAR1 PTC10 #define FAULT_CLEAR1 PTC11 DigitalIn fault1(FAULT1); DigitalIn fault2(FAULT2); DigitalIn fault3(FAULT3); DigitalIn fault4(FAULT4); DigitalIn fault5(FAULT5); DigitalIn fault6(FAULT6); DigitalIn fault7(FAULT7); DigitalIn fault8(FAULT8); DigitalOut clear1(FAULT_CLEAR1); DigitalOut clear2(FAULT_CLEAR2); DigitalOut clear3(FAULT_CLEAR3); DigitalOut clear4(FAULT_CLEAR4); DigitalOut clear5(FAULT_CLEAR5); DigitalOut clear6(FAULT_CLEAR6); DigitalOut clear7(FAULT_CLEAR7); DigitalOut clear8(FAULT_CLEAR8); void FAULTS(void const *args) { while(1) { if(!fault1) { clear1 = 1; } if(!fault2) { clear2 = 1; } if(!fault3) { clear3 = 1; } if(!fault4) { clear4 = 1; } if(!fault5) { clear5 = 1; } if(!fault6) { clear6 = 1; } if(!fault7) { clear7 = 1; } if(!fault8) { clear8 = 1; } } }