本文整理汇总了C#中Pin.DelayToggle方法的典型用法代码示例。如果您正苦于以下问题:C# Pin.DelayToggle方法的具体用法?C# Pin.DelayToggle怎么用?C# Pin.DelayToggle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pin
的用法示例。
在下文中一共展示了Pin.DelayToggle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
//.........这里部分代码省略.........
{
pin.Toggle();
done = true;
}
break;
case NodeCommands.CMD_TIMED_DIGITAL:
index = stack.PopByte();
width = stack.PopByte();
value = stack.PopByte();
pin = GetPin(index, PinTypes.Output);
if (pin != null)
{
pin.TimedOutput(width, value);
done = true;
}
break;
case NodeCommands.CMD_DELAY_DIGITAL:
index = stack.PopByte();
delay = stack.PopByte();
value = stack.PopByte();
pin = GetPin(index, PinTypes.Output);
if (pin != null)
{
pin.DelayOutput(delay, value);
done = true;
}
break;
case NodeCommands.CMD_DELAY_TOGGLE_DIGITAL:
index = stack.PopByte();
delay = stack.PopByte();
pin = GetPin(index, PinTypes.Output);
if (pin != null)
{
pin.DelayToggle(delay);
done = true;
}
break;
case NodeCommands.CMD_PULSE_DIGITAL:
index = stack.PopByte();
delay = stack.PopByte();
width = stack.PopByte();
value = stack.PopByte();
pin = GetPin(index, PinTypes.Output);
if (pin != null)
{
pin.PulsedOutput(delay, width, value);
done = true;
}
break;
case NodeCommands.CMD_CYCLE_DIGITAL:
index = stack.PopByte();
delay = stack.PopByte();
width = stack.PopByte();
value = stack.PopByte(); //cycles
pin = GetPin(index, PinTypes.Output);
if (pin != null)
{
pin.CycledOutput(delay, width, value);
done = true;
}
break;
#endregion
#region Pins analog/pwm write commands
case NodeCommands.CMD_CHANGE_PWM:
index = stack.PopByte();