コード例 #1
0
        private Motherboard()
        {
            if (InvkSMBCtrl.LibInitial() != 0)
            {
                throw new DeviceInitializationException();
            }

            ledId    = InvkSMBCtrl.GetLEDId();
            identity = (MBIdentify)InvkSMBCtrl.GetMBId();
            ConnectMcu();
            LoadMemoryModules();
        }
コード例 #2
0
        private RgbLedController()
        {
            var ledIdv3 = InvkSMBCtrl.GetSIVId();

            ledIdv4 = InvkSMBCtrl.GetLEDId();

            if (ledIdv4 != 0)
            {
                var siv_Pid = ledIdv3 >> 28;
                ledFuncType = ((ledIdv4 >> 20) & 0xF);

                if (IsLedFunctionNotSuported(siv_Pid))
                {
                    throw new NotSupportedException("Led function not supported");
                }

                if (siv_Pid == 4)
                {
                    var ledCtrlBy = GetLedCtrlBy(siv_Pid, ledFuncType);
                    if (ledCtrlBy == LedCtrlBy.Unknown)
                    {
                        throw new NotSupportedException("Unknown controller");
                    }

                    if (ledCtrlBy == LedCtrlBy.IT8688)
                    {
                        controller = new MncLedCtrl
                        {
                            iManufacter       = (int)GetPlatform(),
                            uPid              = siv_Pid,
                            uChipId           = ledIdv4 >> 27,
                            GpioPinConfigType = ((ledIdv4 >> 16) & 0xF)
                        };
                    }
                }
            }
        }