p;&nbsp;&nbsp;&nbsp;&nbsp;
+---------+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+---------+&nbsp; 1<br>
<br>
&nbsp;&nbsp; */<br>
<br>
&nbsp;&nbsp; static int levA=0, levB=0, lastGpio = -1;<br>
<br>
&nbsp;&nbsp; if (gpio == ENCODER_A) levA = level; else levB =
level;<br>
<br>
&nbsp;&nbsp; if (gpio != lastGpio) /* debounce */<br>
&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lastGpio = gpio;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((gpio == ENCODER_A) &amp;&amp;
(level == 0))<br>
&nbsp;&nbsp;&nb