예제 #1
0
        private PiGpiodIf2(string address, string port)
        {
            short ret = PiGpiodIf2NativeMethods.Start(address, port);

            if (ret < 0)
            {
                throw new PiGPIOException(ret);
            }
            this.m_handle = ret;
        }
예제 #2
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.m_handle != short.MinValue)
         {
             PiGpiodIf2NativeMethods.Stop(this.m_handle);
             this.m_handle = short.MinValue;
         }
     }
 }
예제 #3
0
 public int PigpioVersion()
 {
     return(unchecked ((int)PiGpiodIf2NativeMethods.PiGpioVersion(this.m_handle)));
 }
예제 #4
0
 public int HardwareRevision()
 {
     return(unchecked ((int)PiGpiodIf2NativeMethods.HardwareRevision(this.m_handle)));
 }