Пример #1
0
 public void DmdDraw(byte[] bytes)
 {
     if (!dmdConfigured)
     {
         DMDConfig dmdConfig = new DMDConfig(kDMDColumns, kDMDRows);
         DMDConfigPopulateDefaults(ref dmdConfig);
         PinProc.PRDMDUpdateConfig(ProcHandle, ref dmdConfig);
         dmdConfigured = true;
     }
     PinProc.PRDMDDraw(ProcHandle, bytes);
 }
Пример #2
0
 public void DmdDraw(Frame frame)
 {
     if (!dmdConfigured)
     {
         DMDConfig dmdConfig = new DMDConfig(kDMDColumns, kDMDRows);
         DMDConfigPopulateDefaults(ref dmdConfig);
         PinProc.PRDMDUpdateConfig(ProcHandle, ref dmdConfig);
         dmdConfigured = true;
     }
     //dmd_draw(testFrame);
     byte[] dots = new byte[4 * kDMDColumns * kDMDRows / 8];
     DMDGlobals.DMDFrameCopyPROCSubframes(ref frame.frame, dots, kDMDColumns, kDMDRows, 4, dmdMapping);
     DmdDraw(dots);
 }
Пример #3
0
        public void DmdUpdateConfig(ushort[] high_cycles)
        {
            DMDConfig dmdConfig = new DMDConfig();

            DMDConfigPopulateDefaults(ref dmdConfig);
            if (high_cycles == null || high_cycles.Length != 4)
            {
                return;
            }

            for (int i = 0; i < 4; i++)
            {
                dmdConfig.DeHighCycles[i] = high_cycles[i];
            }
            lock (procSyncObject)
            {
                PinProc.PRDMDUpdateConfig(ProcHandle, ref dmdConfig);
            }
            dmdConfigured = true;
        }
Пример #4
0
        private void DMDConfigPopulateDefaults(ref DMDConfig dmdConfig)
        {
            dmdConfig.EnableFrameEvents  = true;
            dmdConfig.NumRows            = kDMDRows;
            dmdConfig.NumColumns         = kDMDColumns;
            dmdConfig.NumSubFrames       = kDMDSubFrames;
            dmdConfig.NumFrameBuffers    = kDMDFrameBuffers;
            dmdConfig.AutoIncBufferWrPtr = true;

            for (int i = 0; i < dmdConfig.NumSubFrames; i++)
            {
                dmdConfig.RclkLowCycles[i]    = 15;
                dmdConfig.LatchHighCycles[i]  = 15;
                dmdConfig.DotclkHalfPeriod[i] = 1;
            }
            dmdConfig.DeHighCycles[0] = 90;
            dmdConfig.DeHighCycles[1] = 190;
            dmdConfig.DeHighCycles[2] = 50;
            dmdConfig.DeHighCycles[3] = 377;
        }
Пример #5
0
 public static extern Result PRDMDUpdateConfig(IntPtr handle, ref DMDConfig config);