private void eventCallback(RPiGPIOPin pin, short value) { try { if (eventDetected != null) { eventDetected(this, new SignalEventArgs { Signal = value == 0 ? false : true }); } } catch (Exception e) { Console.WriteLine(e.Message); } }
private void eventCallback(RPiGPIOPin pin, short value) { try { if (eventDetected != null) { eventDetected(this, new SignalEventArgs { Signal = (value & 1) == 1 ? true : false, Pin = currentPin }); } } catch (Exception e) { Console.WriteLine(e.Message); } }
public static extern void clearPinEventDetector(RPiGPIOPin pin);
public GPIOPin(RPiGPIOPin PhysicalPin) { currentPin = PhysicalPin; Function = GPIOFunction.Input; PullControl = GPIOPullControl.Off; }
public static extern void bcm2835_gpio_write(RPiGPIOPin pin, Byte on);
public static extern void bcm2835_gpio_clr_afen(RPiGPIOPin pin);
public static extern Byte bcm2835_gpio_eds(RPiGPIOPin pin);
public static unsafe extern void readBitBangBuffer(byte *Buffer, UInt32 Length, RPiGPIOPin DataPin, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern void writeBitBangByte(byte Data, RPiGPIOPin DataPin, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern byte manualEventDetect(RPiGPIOPin pin);
public static extern byte readBitBangByte(RPiGPIOPin DataPin, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern byte prepareManualEventDetector(RPiGPIOPin pin);
public static extern byte exportPin(RPiGPIOPin pin);
public static extern void setDetectEdge(RPiGPIOPin pin, DetectEdge Edge);
public RaspPin(RPiGPIOPin PhysicalPin, GPIOFunctionSelect InitialFunction = GPIOFunctionSelect.Function_INPT, PullUpDownControl InitialPullUpDown = PullUpDownControl.Pull_OFF) { currentPin = PhysicalPin; Function = InitialFunction; PullUpDown = InitialPullUpDown; }
public static extern byte readNibbleByte(RPiGPIOPin DataPin0, RPiGPIOPin DataPin1, RPiGPIOPin DataPin2, RPiGPIOPin DataPin3, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public RaspPin(RPiGPIOPin PhysicalPin, bcm2835FunctionSelect InitialFunction = bcm2835FunctionSelect.BCM2835_GPIO_FSEL_INPT, bcm2835PUDControl InitialPullUpDown = bcm2835PUDControl.BCM2835_GPIO_PUD_OFF) { currentPin = PhysicalPin; Function = InitialFunction; PullUpDown = InitialPullUpDown; }
public static extern void writeNibbleByte(byte Data, RPiGPIOPin DataPin0, RPiGPIOPin DataPin1, RPiGPIOPin DataPin2, RPiGPIOPin DataPin3, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern void bcm2835_gpio_fsel(RPiGPIOPin pin, bcm2835FunctionSelect mode);
public static extern unsafe void writeNibbleBuffer(byte *Buffer, UInt32 Length, RPiGPIOPin DataPin0, RPiGPIOPin DataPin1, RPiGPIOPin DataPin2, RPiGPIOPin DataPin3, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern void bcm2835_gpio_set_eds(RPiGPIOPin pin);
public static extern byte readOctetByte(RPiGPIOPin[] DataPins, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern void bcm2835_gpio_pudclk(RPiGPIOPin pin, Byte on);
public static extern void writeOctetByte(byte Data, RPiGPIOPin[] DataPins, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public static extern void bcm2835_gpio_set_pud(RPiGPIOPin pin, bcm2835PUDControl pud);
public static unsafe extern void writeOctetBuffer(byte *Buffer, UInt32 Length, RPiGPIOPin[] DataPins, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
public GPIOPin(RPiGPIOPin PhysicalPin, GPIOFunction Function, GPIOPullControl PullControl) { currentPin = PhysicalPin; this.Function = Function; this.PullControl = PullControl; }
public static extern byte bcm2835_gpio_lev(RPiGPIOPin pin);
public RaspPin this[RPiGPIOPin Key] { get { return(internalPins[Key]); } }
public static extern byte setPinEventDetector(RPiGPIOPin pin, PinEventDelegate callback);