I am trying to write an interrupt based rotary encoder switch library that has three events, clockwise, counterclockwise and button push.
However when I try to add an interupt port to the class it just doesnt show up.
Here is my code so far
using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; using SecretLabs.NETMF; namespace RotaryEncoderSwitch { public class RotarySwitch { private int _pinA; private int _pinB; private int _switchPin; private bool _positiveEdge; public delegate void ClockwiseEventHandler(); public delegate void CounterClockWiseEventHandler(); public delegate void ButtonPushedEventHandler(); public event ClockwiseEventHandler ClockWise; public event CounterClockWiseEventHandler CounterClockWise; public event ButtonPushedEventHandler ButtonPushed; public RotarySwitch(int pinA, int pinB, int switchPin, bool positiveEdge) { _pinA = pinA; _pinB = pinB; _switchPin = switchPin; _positiveEdge = positiveEdge; } } }
does anyone have any ideas why?
Doh, Forgot to add all of the correct references
Adam Clifford