Exemple #1
0
 public DriverState driver_state_pulse(DriverState state, byte milliseconds)
 {
     lock (procSyncObject)
     {
         PinProc.PRDriverStatePulse(ref state, milliseconds);
     }
     return(state);
 }
Exemple #2
0
        ///////////////////////////////////////////////////////////////////////////////
        /// DRIVER FUNCTIONS
        ///////////////////////////////////////////////////////////////////////////////

        public Result driver_pulse(ushort number, byte milliseconds)
        {
            DriverState state = this.driver_get_state(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);
        }