![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fault final (may be)
Fork of fault_man by
Diff: main.cpp
- Revision:
- 2:12445d744dfd
- Parent:
- 1:cde488f73488
diff -r cde488f73488 -r 12445d744dfd main.cpp --- a/main.cpp Tue Dec 02 07:25:23 2014 +0000 +++ b/main.cpp Tue Dec 02 09:41:28 2014 +0000 @@ -2,7 +2,7 @@ #include "rtos.h" #define FAULT1 D0 -#define FAULT2 D1 +#define FAULT2 PTB18 #define FAULT3 D2 #define FAULT4 D3 #define FAULT5 D4 @@ -40,22 +40,23 @@ DigitalOut clear7(FAULT_CLEAR7); DigitalOut clear8(FAULT_CLEAR8); - /*bool fault1 = 0; - bool fault2 = 0; - bool fault3 = 0; - bool fault4 = 0; - bool fault5 = 0; - bool fault6 = 0; - bool fault7 = 0; - bool fault8 = 0; */ +//fault1 = 0; +// bool fault2 = 0; + //bool fault3 = 0; +// bool fault4 = 0; +// bool fault5 = 0; +// bool fault6 = 0; +// bool fault7 = 0; +// bool fault8 = 0; - +BusOut clear(FAULT_CLEAR1,FAULT_CLEAR2,FAULT_CLEAR3,FAULT_CLEAR4,FAULT_CLEAR5,FAULT_CLEAR6,FAULT_CLEAR7,FAULT_CLEAR8); void FAULTS(void const *args) { + while(1) { Thread :: signal_wait(0x1); - printf("\nEntered fault thred\n"); + // printf("\nEntered fault thred\n"); //if(fault1 == 0) { clear1 = !fault1; } //if(fault2 == 0) @@ -80,14 +81,15 @@ //{ int main() { - - Thread f1(FAULTS, (void *) "faults"); + printf("\nsup\n"); + Thread f1(FAULTS); + int clearout; while(1) { //Thread :: wait(5000); f1.signal_set(0x1); - - //printf(" %d %d %d %d %d %d %d %d \n",clear1,clear2,clear3,clear4,clear5,clear6,clear7,clear8); + clearout=clear; + printf("%d ",clearout); } } \ No newline at end of file