Exemplo n.º 1
0
        public DMD(IPiGPIO gpio, DMDPinLayout layout, int panelsWide, int panelsHigh) : base(gpio, layout)
        {
            if (panelsWide < 1)
            {
                throw new ArgumentOutOfRangeException(nameof(panelsWide));
            }
            if (panelsHigh < 1)
            {
                throw new ArgumentOutOfRangeException(nameof(panelsHigh));
            }
            this.m_displaysWide  = panelsWide;
            this.m_displaysHigh  = panelsHigh;
            this.m_displaysTotal = this.m_displaysWide * this.m_displaysHigh;

            this.row1 = this.m_displaysTotal << 4;
            this.row2 = this.m_displaysTotal << 5;
            this.row3 = ((this.m_displaysTotal << 2) * 3) << 2;

            this.bDMDScreenRAM = new byte[this.m_displaysTotal * DMD_RAM_SIZE_BYTES];
        }
Exemplo n.º 2
0
 public DMDBase(IPiGPIO gpio, DMDPinLayout layout) : base(gpio)
 {
     this.m_layout = layout ?? throw new ArgumentNullException(nameof(layout));
 }