示例#1
0
        public void ControlDisableState_CheckAddresses()
        {
            var reg = new ClockDisableState(0, 0);

            Assert.Equal(Address.CLK30DISSTATE, reg.Address);
            Assert.Equal(2, reg.Addresses.Length);
            Assert.Equal(Address.CLK30DISSTATE, reg.Addresses[0]);
            Assert.Equal(Address.CLK74DISSTATE, reg.Addresses[1]);
        }
示例#2
0
        public void ClockDisableState_InitializeFromSettings_CheckPropertiesAndRegisterValue(DisableState state0,
                                                                                             DisableState state1,
                                                                                             DisableState state2,
                                                                                             DisableState state3,
                                                                                             DisableState state4,
                                                                                             DisableState state5,
                                                                                             DisableState state6,
                                                                                             DisableState state7,
                                                                                             byte regVal30,
                                                                                             byte regVal74)
        {
            var reg = new ClockDisableState(state0, state1, state2, state3, state4, state5, state6, state7);

            Assert.Equal(2, reg.ToBytes().Length);
            Assert.Equal(regVal30, reg.ToBytes()[0]);
            Assert.Equal(regVal74, reg.ToBytes()[1]);
        }
示例#3
0
        public void ClockDisableState_InitializeFromRegisterValue(byte regVal30,
                                                                  byte regVal74,
                                                                  DisableState state0,
                                                                  DisableState state1,
                                                                  DisableState state2,
                                                                  DisableState state3,
                                                                  DisableState state4,
                                                                  DisableState state5,
                                                                  DisableState state6,
                                                                  DisableState state7)
        {
            var register = new ClockDisableState(regVal30, regVal74);

            Assert.Equal(state0, register.ClockOutput0);
            Assert.Equal(state1, register.ClockOutput1);
            Assert.Equal(state2, register.ClockOutput2);
            Assert.Equal(state3, register.ClockOutput3);
            Assert.Equal(state4, register.ClockOutput4);
            Assert.Equal(state5, register.ClockOutput5);
            Assert.Equal(state6, register.ClockOutput6);
            Assert.Equal(state7, register.ClockOutput7);
        }