Changeset 87ab18e in avrstuff for libs/ps2_keyboard/ps2_keyboard.c
- Timestamp:
- Jul 31, 2014, 11:00:37 PM (10 years ago)
- Branches:
- main
- Children:
- 0010058
- Parents:
- ea32107
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libs/ps2_keyboard/ps2_keyboard.c
rea32107 r87ab18e 30 30 #endif 31 31 32 static volatile uint8_t kbd_data;33 32 static volatile uint8_t char_waiting; 34 33 static uint8_t started; 35 34 static uint8_t bit_count; 36 static uint8_t caps_lock;37 35 static uint8_t extended; 38 36 39 uint8_t shift;37 volatile uint8_t kbd_data; 40 38 uint8_t release; 41 39 … … 79 77 kbd_data = 0; 80 78 return; 81 } else if (kbd_data == 0x12) { //hanlde shift key82 if(release == 0){83 shift = 1;84 } else {85 shift = 0;86 release = 0;87 }88 return;89 79 } else { //not a special character 90 if(release){ //we were in release mode - exit release mode91 release = 0;92 //ignore that character93 } else {94 char_waiting = 1;95 80 #ifdef CALLBACK 96 81 CALLBACK 97 82 #endif 83 if(release){ //we were in release mode - exit release mode 84 release = 0; 85 } else { 86 // Notify callback that there's a new char waiting 87 char_waiting = 1; 98 88 } 99 89 }
Note:
See TracChangeset
for help on using the changeset viewer.