예제 #1
0
 public void driver_update_state(ref DriverState driver)
 {
     lock (procSyncObject)
     {
         PinProc.PRDriverUpdateState(ProcHandle, ref driver);
     }
 }
예제 #2
0
        public void DriverPulsedPatter(ushort number, ushort milliseconds_on, ushort milliseconds_off, ushort milliseconds_overall_patter_time)
        {
            DriverState state = this.DriverGetState(number);

            lock (procSyncObject)
            {
                PinProc.PRDriverStatePulsedPatter(ref state, milliseconds_on, milliseconds_off, milliseconds_overall_patter_time);
                PinProc.PRDriverUpdateState(ProcHandle, ref state);
                PinProc.PRFlushWriteData(ProcHandle);
            }
        }
예제 #3
0
        public void DriverDisable(ushort number)
        {
            DriverState state = this.DriverGetState(number);

            lock (procSyncObject)
            {
                PinProc.PRDriverStateDisable(ref state);
                PinProc.PRDriverUpdateState(ProcHandle, ref state);
                PinProc.PRFlushWriteData(ProcHandle);
            }
        }
예제 #4
0
        public void DriverSchedule(ushort number, uint schedule, ushort cycle_seconds, bool now)
        {
            DriverState state = this.DriverGetState(number);

            lock (procSyncObject)
            {
                PinProc.PRDriverStateSchedule(ref state, schedule, (byte)cycle_seconds, now);
                PinProc.PRDriverUpdateState(ProcHandle, ref state);
                PinProc.PRFlushWriteData(ProcHandle);
            }
        }
예제 #5
0
        public Result DriverPulse(ushort number, byte milliseconds)
        {
            DriverState state = this.DriverGetState(number);
            Result      res;

            lock (procSyncObject)
            {
                PinProc.PRDriverStatePulse(ref state, milliseconds);
                res = PinProc.PRDriverUpdateState(ProcHandle, ref state);
            }

            if (res == Result.Success)
            {
                lock (procSyncObject)
                {
                    res = PinProc.PRDriverWatchdogTickle(ProcHandle);
                    res = PinProc.PRFlushWriteData(ProcHandle);
                }
            }
            return(res);
        }