Talk:Control
Revision as of 07:01, 2 March 2007 by Quisme Amat (talk | contribs)
Is this code snippet right?
integer start = level & edge;
integer end = ~level & edge;
integer held = level & ~edge;
integer unheld = ~(level & edge);
unheld
would be true for any bit that had a falling edge, was held high, or was held low. I think that last line should be...
integer unheld = ~(level | edge);
...or the equivalent...
integer unheld = ~level & ~edge;
With this new code, unheld
would be true for any bit that was held low.