SHARE
TWEET

kabel pod ziemio

a guest May 16th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void key_press(uint8_t * klock, volatile uint8_t * KPIN, uint8_t key_mask, void (*kfun)(void) ) {
  2.  
  3.  register uint8_t key_press = (*KPIN & key_mask);
  4.  
  5.  if( !*klock && !key_press ) {
  6.   *klock=1;
  7.  
  8.   // reakcja na PRESS (wcinięcie przycisku)
  9.   if(kfun) kfun();
  10.  
  11.  } else if( *klock && key_press ) (*klock)++;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top