public void registerInterruptHandler(byte pin, GTI.InterruptMode mode, InterruptHandler handler) { InterruptRegistraton reg = new InterruptRegistraton(); reg.handler = handler; reg.mode = mode; reg.pin = pin; lock (this.interruptHandlers) this.interruptHandlers.Add(reg); }
public InterruptInputImplementation(byte pin, GTI.GlitchFilterMode glitchFilter, GTI.ResistorMode resistorMode, GTI.InterruptMode interruptMode, IO60P16 io60) { this.io60 = io60; this.pin = pin; this.io60.setIOMode(this.pin, IO60P16.IOState.InputInterrupt, resistorMode); this.io60.registerInterruptHandler(this.pin, interruptMode, this.RaiseInterrupt); }
/// <summary> /// Creates an interrrupt input on the input port on the module. /// </summary> /// <param name="glitchFilterMode">The glitch filter mode for the input.</param> /// <param name="resistorMode">The resistor mode for the input.</param> /// <param name="interruptMode">The interrupt mode for the input.</param> /// <returns>The new input.</returns> public GTI.InterruptInput CreateInterruptInput(GTI.GlitchFilterMode glitchFilterMode, GTI.ResistorMode resistorMode, GTI.InterruptMode interruptMode) { return(new GTI.InterruptInput(this.socket, Socket.Pin.Three, glitchFilterMode, resistorMode, interruptMode, this)); }