Design-in of LPC11U24 (lqfp48) of mbed as Steppermotor controller with USB control.

Dependencies:   USBDevice mbed

Mbed repository of Stepper Motor Control board. Using mbed LPC11U24 chip with HID USB.

Hardware in copy repo on bitbucket https://bitbucket.org/jeroen3/stepper-motor-board

watchdog.h

Committer:
jeroen3
Date:
2013-10-30
Revision:
2:ddae311a4533
Parent:
0:d0306c0cbee6

File content as of revision 2:ddae311a4533:

/*
*           Using code Simon Ford written in his example
*           to implement WDT. 
*           It can run in seconds, milliseconds, and microseconds. 
*           All there is to do, is keep feeding the watchdog. 
*/

#ifndef WATCHDOG_H
#define WATCHDOG_H

#include "mbed.h"

/** Watchdog timer implementation (in seconds) */
class WatchDog {
public: 
    /** Creates Watchdog timer
    * 
    * @param Sets the WDT in seconds
    */
    WatchDog(float s);
    
    /** Keep feeding the watchdog in routine
    *
    * xxx.feed(); does the trick
    */
    void feed();
};
/** Watchdog timer implementation (in milliseconds) */
class WatchDog_ms {
public: 
    /** Creates Watchdog timer
    * 
    * @param Sets the WDT in milliseconds
    */
    WatchDog_ms(int ms);
    /** Keep feeding the watchdog in routine
    *
    * xxx.feed(); does the trick
    */
    void feed();
};
/** Watchdog timer implementation (in microseconds) */
class WatchDog_us {
public:
    /** Creates Watchdog timer
    * 
    * @param Sets the WDT in microseconds
    */
    WatchDog_us(int us);
    /** Keep feeding the watchdog in routine
    *
    * xxx.feed(); does the trick
    */    
    void feed();
};

#endif