Esempio n. 1
0
        // TODO: remove try catch after https://github.com/dotnet/corefx/issues/32015 deployed
        public static UnixDriver Create()
        {
            UnixDriver driver = null;

            try
            {
                driver = new LibGpiodDriver();
            }
            catch (DllNotFoundException)
            {
                driver = new SysfsDriver();
            }
            return(driver);
        }
Esempio n. 2
0
        // TODO: remove try catch after https://github.com/dotnet/corefx/issues/32015 deployed
        public static UnixDriver Create()
        {
            UnixDriver driver = null;

            try
            {
                driver = new LibGpiodDriver();
            }
            catch (PlatformNotSupportedException)
            {
                driver = new SysfsDriver();
            }
            return(driver);
        }