public DigitalIOImplementation(byte pin, bool initialState, GTI.GlitchFilterMode glitchFilter, GTI.ResistorMode resistorMode, IO60P16 io60) { this.io60 = io60; this.pin = pin; this.resistorMode = resistorMode; this.Mode = Socket.SocketInterfaces.IOMode.Input; this.io60.writeDigital(this.pin, initialState); }
public void setIOMode(byte pin, IOState state, GTI.ResistorMode resistorMode) { switch (resistorMode) { case GTI.ResistorMode.Disabled: this.setIOMode(pin, state, ResistorMode.Floating); break; case GTI.ResistorMode.PullDown: this.setIOMode(pin, state, ResistorMode.PullDown); break; case GTI.ResistorMode.PullUp: this.setIOMode(pin, state, ResistorMode.PullUp); break; } }
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); }
public DigitalInputImplementation(byte pin, GTI.GlitchFilterMode glitchFilter, GTI.ResistorMode resistorMode, IO60P16 io60) { this.io60 = io60; this.pin = pin; this.io60.setIOMode(this.pin, IO60P16.IOState.Input, resistorMode); }
/// <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)); }