ICRS Eurobot 2013
Dependencies: mbed mbed-rtos Servo QEI
Diff: Others/EmergencyStop/EmergencyStop.h
- Revision:
- 2:45da48fab346
- Child:
- 3:717de74f6ebd
diff -r 8119211eae14 -r 45da48fab346 Others/EmergencyStop/EmergencyStop.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Others/EmergencyStop/EmergencyStop.h Fri Mar 29 20:09:21 2013 +0000 @@ -0,0 +1,24 @@ + +// Eurobot13 EmergencyStop.h + +#include "mbed.h" +#include "Actuators/Actuator.h" + +class EmergencyStop : public InterruptIn{ + private: + public: + EmergencyStop ( PinName pin + , void (*risefunction)(void) = Actuator::haltandCatchFire + , void (*fallfunction)(void) = Actuator::haltandCatchFire + ) + : InterruptIn(pin) + { + if (risefunction != NULL){ + rise(risefunction); + } + + if (fallfunction != NULL){ + fall(fallfunction); + } + } +}; \ No newline at end of file