Beispiel #1
0
 public void dmd_draw(byte[] bytes)
 {
     if (!dmdConfigured)
     {
         DMDConfig dmdConfig = new DMDConfig(kDMDColumns, kDMDRows);
         DMDConfigPopulateDefaults(ref dmdConfig);
         PinProc.PRDMDUpdateConfig(ProcHandle, ref dmdConfig);
         dmdConfigured = true;
     }
     PinProc.PRDMDDraw(ProcHandle, bytes);
 }
Beispiel #2
0
 public void dmd_draw(dmd.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];
     dmd.DMDGlobals.DMDFrameCopyPROCSubframes(ref frame.frame, dots, kDMDColumns, kDMDRows, 4, dmdMapping);
     dmd_draw(dots);
 }
Beispiel #3
0
        public void dmd_update_config(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;
        }