![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
i2c slave integrated
Fork of BAE_FRDM_INTEGRATION by
Diff: fault.cpp
- Revision:
- 2:80b8a2e999f7
- Child:
- 3:02b45de29c0f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fault.cpp Tue Dec 02 10:43:24 2014 +0000 @@ -0,0 +1,42 @@ +#include "fault.h" + + +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); + + +BusOut clear(FAULT_CLEAR1,FAULT_CLEAR2,FAULT_CLEAR3,FAULT_CLEAR4,FAULT_CLEAR5,FAULT_CLEAR6,FAULT_CLEAR7,FAULT_CLEAR8); +int clearout = clear; + +void FAULTS() +{ + + printf("Entered Fault management \n"); + clear1 = !fault1; + clear2 = !fault2; + clear3 = !fault3; + clear4 = !fault4; + clear5 = !fault5; + clear6 = !fault6; + clear7 = !fault7; + clear8 = !fault8; + printf(" %d \n",clearout); + + +} \ No newline at end of file