예제 #1
0
        protected override void OnStart(string[] args)
        {
            if (IntelXhci.GetSupportState() != SupportState.Supported)
            {
                return;
            }

            _initialValue = IntelXhci.GetRouting();
            IntelXhci.SwitchTo20();
            _applied = true;
        }
예제 #2
0
            internal void Initialize()
            {
                BasicSupportState = IntelXhci.GetSupportState();

                if (BasicSupportState == SupportState.FailDriverLoad)
                {
                    return;
                }

                EhciControllersState = IntelXhci.GetEhciState();

                if (BasicSupportState != SupportState.Supported)
                {
                    return;
                }

                SwitchablePorts = IntelXhci.GetNumberOfSwitchablePorts();

                IsRunningOn30 = IntelXhci.IsRunningOn30();

                CanTest = SwitchablePorts > 0;

                var service = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == _serviceName);

                if (service == null)
                {
                    InstallService();
                }

                service = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == _serviceName);

                if (service != null)
                {
                    ServiceRunning = service.Status == ServiceControllerStatus.Running;
                }

                ServiceEnabled = GetServiceEnabled(_serviceName);
            }