public GetRisingUpdate ( bool trigger ) : bool | ||
trigger | bool | Current value of edge triggered state |
return | bool |
public bool GetRisingUpdate(bool trigger)
{
bool toReturn = (trigger && !m_feedback);
m_feedback = trigger;
return toReturn;
}
public void AutoUpdateRisingToFalling() { EdgeTrigger t = new EdgeTrigger(); t.Update(false); Assert.IsTrue(t.GetRisingUpdate(true)); Assert.IsTrue(t.GetFallingUpdate(false)); }