Some more work on Hal Arduino sensor. issue 18
This commit is contained in:
parent
050addfa31
commit
c9a030774b
8 changed files with 128 additions and 33 deletions
18
arduino/HalMultiSensor/Interrupt.h
Executable file
18
arduino/HalMultiSensor/Interrupt.h
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef INTERRUPT_H
|
||||
#define INTERRUPT_H
|
||||
|
||||
typedef void (*InterruptFunction) ();
|
||||
|
||||
class Interrupt
|
||||
{
|
||||
public:
|
||||
Interrupt(InterruptFunction callback) : callback(callback) {};
|
||||
|
||||
//static void sleep(int milliseconds);
|
||||
void setupPinInterrupt(int pin);
|
||||
void setupTimerInterrupt(int milliseconds);
|
||||
private:
|
||||
InterruptFunction callback;
|
||||
}
|
||||
|
||||
#endif // INTERRUPT_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue