Advertisement
Guest User

Untitled

a guest
Sep 6th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 00001c76 <KBD_Scan>:
  2.  
  3. uint8_t KBD_Scan() {
  4.     uint8_t keyb, nokey;
  5.     nokey=1;
  6.     keyb=0;
  7.     CLEARBIT(PORTA, KBV1);
  8.     1c76:   dd 98           cbi 0x1b, 5 ; 27
  9.     //_delay_us(1);
  10.     if (!CHECKBIT(PINA,KBH1)) {
  11.     1c78:   c9 99           sbic    0x19, 1 ; 25
  12.     1c7a:   02 c0           rjmp    .+4         ; 0x1c80 <KBD_Scan+0xa>
  13.         keyb=42;
  14.     1c7c:   8a e2           ldi r24, 0x2A   ; 42
  15.     1c7e:   01 c0           rjmp    .+2         ; 0x1c82 <KBD_Scan+0xc>
  16. //static uint8_t keycode;
  17.  
  18. uint8_t KBD_Scan() {
  19.     uint8_t keyb, nokey;
  20.     nokey=1;
  21.     keyb=0;
  22.     1c80:   80 e0           ldi r24, 0x00   ; 0
  23.     //_delay_us(1);
  24.     if (!CHECKBIT(PINA,KBH1)) {
  25.         keyb=42;
  26.         nokey=0;
  27.     }
  28.     if (!CHECKBIT(PINA,KBH2)) {
  29.     1c82:   c8 9b           sbis    0x19, 0 ; 25
  30.         keyb=55;
  31.     1c84:   87 e3           ldi r24, 0x37   ; 55
  32.         nokey=0;
  33.     }
  34.     if (!CHECKBIT(PING,KBH3)) {
  35.     1c86:   90 91 63 00     lds r25, 0x0063
  36.     1c8a:   90 ff           sbrs    r25, 0
  37.         keyb=52;
  38.     1c8c:   84 e3           ldi r24, 0x34   ; 52
  39.         nokey=0;
  40.     }
  41.     if (!CHECKBIT(PING,KBH4)) {
  42.     1c8e:   90 91 63 00     lds r25, 0x0063
  43.     1c92:   91 ff           sbrs    r25, 1
  44.         keyb=49;
  45.     1c94:   81 e3           ldi r24, 0x31   ; 49
  46.         nokey=0;
  47.     }
  48.     SETBIT(PORTA, KBV1);
  49.     1c96:   dd 9a           sbi 0x1b, 5 ; 27
  50.     CLEARBIT(PORTA, KBV2);
  51.     1c98:   dc 98           cbi 0x1b, 4 ; 27
  52.     #else
  53.         //round up by default
  54.         __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
  55.     #endif
  56.  
  57.     __builtin_avr_delay_cycles(__ticks_dc);
  58.     1c9a:   95 e0           ldi r25, 0x05   ; 5
  59.     1c9c:   9a 95           dec r25
  60.     1c9e:   f1 f7           brne    .-4         ; 0x1c9c <KBD_Scan+0x26>
  61.     _delay_us(1);
  62.     if (!CHECKBIT(PINA,KBH1)) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement