コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: GPIOPin.cs プロジェクト: xiongzhaoxu/BCM2835Managed
 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);
     }
 }
コード例 #3
0
 public static extern void clearPinEventDetector(RPiGPIOPin pin);
コード例 #4
0
ファイル: GPIOPin.cs プロジェクト: xiongzhaoxu/BCM2835Managed
 public GPIOPin(RPiGPIOPin PhysicalPin)
 {
     currentPin  = PhysicalPin;
     Function    = GPIOFunction.Input;
     PullControl = GPIOPullControl.Off;
 }
コード例 #5
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern void bcm2835_gpio_write(RPiGPIOPin pin, Byte on);
コード例 #6
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern void bcm2835_gpio_clr_afen(RPiGPIOPin pin);
コード例 #7
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern Byte bcm2835_gpio_eds(RPiGPIOPin pin);
コード例 #8
0
 public static unsafe extern void readBitBangBuffer(byte *Buffer, UInt32 Length, RPiGPIOPin DataPin, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #9
0
 public static extern void writeBitBangByte(byte Data, RPiGPIOPin DataPin, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #10
0
 public static extern byte manualEventDetect(RPiGPIOPin pin);
コード例 #11
0
 public static extern byte readBitBangByte(RPiGPIOPin DataPin, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #12
0
 public static extern byte prepareManualEventDetector(RPiGPIOPin pin);
コード例 #13
0
 public static extern byte exportPin(RPiGPIOPin pin);
コード例 #14
0
 public static extern void setDetectEdge(RPiGPIOPin pin, DetectEdge Edge);
コード例 #15
0
ファイル: RaspPin.cs プロジェクト: komornik/RaspiSharp
 public RaspPin(RPiGPIOPin PhysicalPin, GPIOFunctionSelect InitialFunction = GPIOFunctionSelect.Function_INPT, PullUpDownControl InitialPullUpDown = PullUpDownControl.Pull_OFF)
 {
     currentPin = PhysicalPin;
     Function   = InitialFunction;
     PullUpDown = InitialPullUpDown;
 }
コード例 #16
0
 public static extern byte readNibbleByte(RPiGPIOPin DataPin0, RPiGPIOPin DataPin1, RPiGPIOPin DataPin2, RPiGPIOPin DataPin3, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #17
0
 public RaspPin(RPiGPIOPin PhysicalPin, bcm2835FunctionSelect InitialFunction = bcm2835FunctionSelect.BCM2835_GPIO_FSEL_INPT, bcm2835PUDControl InitialPullUpDown = bcm2835PUDControl.BCM2835_GPIO_PUD_OFF)
 {
     currentPin = PhysicalPin;
     Function   = InitialFunction;
     PullUpDown = InitialPullUpDown;
 }
コード例 #18
0
 public static extern void writeNibbleByte(byte Data, RPiGPIOPin DataPin0, RPiGPIOPin DataPin1, RPiGPIOPin DataPin2, RPiGPIOPin DataPin3, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #19
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern void bcm2835_gpio_fsel(RPiGPIOPin pin, bcm2835FunctionSelect mode);
コード例 #20
0
 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);
コード例 #21
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern void bcm2835_gpio_set_eds(RPiGPIOPin pin);
コード例 #22
0
 public static extern byte readOctetByte(RPiGPIOPin[] DataPins, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #23
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern void bcm2835_gpio_pudclk(RPiGPIOPin pin, Byte on);
コード例 #24
0
 public static extern void writeOctetByte(byte Data, RPiGPIOPin[] DataPins, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #25
0
ファイル: BCM2835.cs プロジェクト: dranger003/BCM2835
 public static extern void bcm2835_gpio_set_pud(RPiGPIOPin pin, bcm2835PUDControl pud);
コード例 #26
0
 public static unsafe extern void writeOctetBuffer(byte *Buffer, UInt32 Length, RPiGPIOPin[] DataPins, RPiGPIOPin ClockPin, bool Polarity, UInt32 LowDelay, UInt32 HighDelay);
コード例 #27
0
ファイル: GPIOPin.cs プロジェクト: xiongzhaoxu/BCM2835Managed
 public GPIOPin(RPiGPIOPin PhysicalPin, GPIOFunction Function, GPIOPullControl PullControl)
 {
     currentPin       = PhysicalPin;
     this.Function    = Function;
     this.PullControl = PullControl;
 }
コード例 #28
0
 public static extern byte bcm2835_gpio_lev(RPiGPIOPin pin);
コード例 #29
0
ファイル: RaspGPIO.cs プロジェクト: komornik/RaspiSharp
 public RaspPin this[RPiGPIOPin Key]
 {
     get { return(internalPins[Key]); }
 }
コード例 #30
0
 public static extern byte setPinEventDetector(RPiGPIOPin pin, PinEventDelegate callback);