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.
Fork of fault_man by
Revision 2:12445d744dfd, committed 2014-12-02
- Comitter:
- greenroshks
- Date:
- Tue Dec 02 09:41:28 2014 +0000
- Parent:
- 1:cde488f73488
- Commit message:
- fault modified
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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