/// <summary>
        /// This command switches the default 63 multiplex mode to any multiplex ratio, ranging from 15 to 127.
        /// The output pads COM0-COM63 will be switched to the corresponding COM signal.
        /// </summary>
        /// <param name="multiplexRatio">Multiplex ratio with a range of 15-127.</param>
        public SetMultiplexRatio(byte multiplexRatio = 63)
        {
            if (!Ssd13xx.InRange(multiplexRatio, 0x0F, 0x7F))
            {
                throw new ArgumentException("The multiplex ratio is invalid.", nameof(multiplexRatio));
            }

            MultiplexRatio = multiplexRatio;
        }
Beispiel #2
0
        private void CheckPeriods(byte phase1Period, byte phase2Period)
        {
            if (!Ssd13xx.InRange(phase1Period, 0x01, 0x0F))
            {
                throw new ArgumentOutOfRangeException(nameof(phase1Period));
            }

            if (!Ssd13xx.InRange(phase2Period, 0x01, 0x0F))
            {
                throw new ArgumentOutOfRangeException(nameof(phase2Period));
            }
        }
Beispiel #3
0
        private void CheckPeriods(byte phase1Period, byte phase2Period)
        {
            if (!Ssd13xx.InRange(phase1Period, 0x01, 0x0F))
            {
                throw new ArgumentException("The phase 1 period is invalid.", nameof(phase1Period));
            }

            if (!Ssd13xx.InRange(phase2Period, 0x01, 0x0F))
            {
                throw new ArgumentException("The phase 2 period is invalid.", nameof(phase2Period));
            }
        }
Beispiel #4
0
        /// <summary>
        /// This command is used to set the duration of the pre-charge period.
        /// The interval is counted in number of DCLK, where RESET equals 2 DCLKs.
        /// </summary>
        /// <param name="phase1Period">Phase 1 period with a range of 1-15.</param>
        /// <param name="phase2Period">Phase 2 period with a range of 1-15.</param>
        public SetPreChargePeriod(byte phase1Period = 0x02, byte phase2Period = 0x02)
        {
            if (!Ssd13xx.InRange(phase1Period, 0x01, 0x0F))
            {
                throw new ArgumentOutOfRangeException(nameof(phase1Period));
            }

            if (!Ssd13xx.InRange(phase2Period, 0x01, 0x0F))
            {
                throw new ArgumentOutOfRangeException(nameof(phase2Period));
            }

            Phase1Period = phase1Period;
            Phase2Period = phase2Period;
        }
Beispiel #5
0
        /// <summary>
        /// This command is used to set the duration of the pre-charge period.
        /// The interval is counted in number of DCLK, where RESET equals 2 DCLKs.
        /// </summary>
        /// <param name="phase1Period">Phase 1 period with a range of 1-15.</param>
        /// <param name="phase2Period">Phase 2 period with a range of 1-15.</param>
        public SetPreChargePeriod(byte phase1Period = 0x02, byte phase2Period = 0x02)
        {
            if (!Ssd13xx.InRange(phase1Period, 0x01, 0x0F))
            {
                throw new ArgumentException("The phase 1 period is invalid.", nameof(phase1Period));
            }

            if (!Ssd13xx.InRange(phase2Period, 0x01, 0x0F))
            {
                throw new ArgumentException("The phase 2 period is invalid.", nameof(phase2Period));
            }

            Phase1Period = phase1Period;
            Phase2Period = phase2Period;
        }