hal/arduino/HalMultiSensor/Interrupt.h

22 lines
401 B
C
Raw Normal View History

#ifndef INTERRUPT_H
#define INTERRUPT_H
2016-02-24 21:51:16 +01:00
#include <Arduino.h>
typedef void (*InterruptFunction) ();
class Interrupt
{
public:
Interrupt(InterruptFunction callback) : callback(callback) {};
//static void sleep(int milliseconds);
void setupPinInterrupt(int pin);
2016-02-24 21:51:16 +01:00
void setupTimerInterrupt(unsigned int milliseconds);
private:
InterruptFunction callback;
2016-02-24 21:51:16 +01:00
};
#endif // INTERRUPT_H