Пример #1
0
        static MbedTLS()
        {
            string dllPath = (DllName);

            try {
                if (!File.Exists(dllPath))
                {
                    FileManager.UncompressFile(dllPath, Resources.libsscrypto_dll);
                }
            } catch (IOException ex) {
                logger.Error("failed to write to file {0}. Exception message: {1}",
                             dllPath, ex.Message);
                throw;
            }
            Interops.LoadLibrary(dllPath);
        }
Пример #2
0
 public void SetValue(bool value) =>
 Interops.GPIO_SetValue(
     this.Identity,
     value ? GPIO_Value_Type.GPIO_Value_High : GPIO_Value_Type.GPIO_Value_Low);
Пример #3
0
 public GpioInput(int gpioId)
     : base(Interops.GPIO_OpenAsInput(gpioId))
 {
 }