System Management code
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
LatchMonitor.h
00001 #ifndef __LATCH_MONITOR_H 00002 #define __LATCH_MONITOR_H 00003 00004 #include "mbed.h" 00005 00006 enum LatchMon_Status_Bits { 00007 OK_FAULT = 1<<0, // Device OK pin is low 00008 LATCHED_HARD = 1<<1, // Circuit is in the tripped state 00009 LATCHED_SOFT = 1<<2, // Software-timer has expired and decided to tag the fault 00010 HARD_FAULT = 1<<3, // The circuit should have latched open, but it did not 00011 }; 00012 00013 class LatchMonitor 00014 { 00015 00016 public: 00017 // Make this startup delay longer than the actual hardware circuit delay so that it can catch errors in the circuit 00018 LatchMonitor(PinName _ok, PinName _fault); 00019 void setup(float* startDelay); 00020 void delayStart(); 00021 00022 char update(); 00023 private: 00024 float* startDelay; 00025 Timeout startup; 00026 void startupDelay(); 00027 bool started; 00028 DigitalIn okPin; 00029 DigitalIn faultPin; 00030 }; 00031 00032 #endif
Generated on Fri Jul 15 2022 06:07:18 by
1.7.2
