// wait_for_release(PORTA,0) void wait_for_release(char port, short pin) { char x=0; while(x != 5) { if (!bit_test(port,pin)) x++; else x=0; delay_ms(50); } } // wait_for_press(PORTA,0) void wait_for_press(char port, short pin) { char x=0; while (x!=5) { if (!bit_test(port,pin)) x=0; else x++; delay_ms(50); } }
Questions:
Interested: