[bknr-cvs] hans changed trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.

BKNR Commits bknr at bknr.net
Tue Apr 7 06:03:07 UTC 2009


Revision: 4360
Author: hans
URL: http://bknr.net/trac/changeset/4360

add version report local key
UU  trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.c
U   trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.hex

Modified: trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.c
===================================================================
--- trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.c	2009-04-07 05:51:18 UTC (rev 4359)
+++ trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.c	2009-04-07 06:03:07 UTC (rev 4360)
@@ -98,7 +98,26 @@
   asm("jmp 0x3000");
 }
 
+const char revision[] PROGMEM = "$Revision$";
+
 void
+report_version(void)
+{
+  int i = 0;
+  for (;;) {
+    uint8_t c = pgm_read_byte(&revision[i++]);
+    if (c == 0) {
+      break;
+    } else if (c >= '0' && c <= '9') {
+      usb_keyboard_press((c == '0')
+                         ? KEY_0
+                         : (KEY_1 + (c - '1')),
+                         0);
+    }
+  }
+}
+
+void
 handle_local_keys(void)
 {
   // Local processing.  LOCAL acts as a modifier key that can be used to execute in the keyboard controller.
@@ -114,6 +133,10 @@
   switch (keyboard_keys[0]) {
   case KEY_B:
     jump_to_loader();
+    break;
+  case KEY_V:
+    report_version();
+    break;
   }
 }
 
@@ -199,7 +222,18 @@
   }
 
   {
-    // Process caps lock key.
+    // Process caps lock key.  This key is a switch on the Symbolics
+    // keyboard, so we must make sure that the current switch setting
+    // always matches the caps lock state of the host.
+
+    // If the host set LED 2, it indicates that caps lock has been
+    // pressed.  If the caps lock state reported by the host does not
+    // match the caps lock key state of the Symbolics keyboard, send a
+    // "caps lock" key press and release to the host to make the two
+    // match.  As a result, if caps lock is depressed on another
+    // keyboard connected to the host, it will quickly be cleared
+    // again.
+
     uint8_t prev_caps_lock_pressed = (keyboard_leds & 2) ? 1 : 0;
     if (caps_lock_pressed ^ prev_caps_lock_pressed) {
       usb_keyboard_press(KEY_CAPS_LOCK, 0);


Property changes on: trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.c
___________________________________________________________________
Name: svn:keywords
   + Revision

Modified: trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.hex
===================================================================
--- trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.hex	2009-04-07 05:51:18 UTC (rev 4359)
+++ trunk/projects/symbolics-keyboard/teensy-firmware/symbolics.hex	2009-04-07 06:03:07 UTC (rev 4360)
@@ -1,11 +1,11 @@
-:1000000023C100003CC100003AC1000038C100001B
-:1000100036C1000034C1000032C1000030C1000010
-:100020002EC100002CC100002AC10000A6C20000A1
-:1000300010C3000024C1000022C1000020C1000044
-:100040001EC100001CC100001AC1000018C1000040
-:1000500016C1000014C1000012C1000010C1000050
-:100060000EC100000CC100000AC1000008C1000060
-:1000700006C1000000888A41828463428900000032
+:1000000029C1000042C1000040C100003EC1000003
+:100010003CC100003AC1000038C1000036C10000F8
+:1000200034C1000032C1000030C10000CDC2000068
+:1000300037C300002AC1000028C1000026C100000B
+:1000400024C1000022C1000020C100001EC1000028
+:100050001CC100001AC1000018C1000016C1000038
+:1000600014C1000012C1000010C100000EC1000048
+:100070000CC1000000888A4182846342890000002C
 :100080003A6040802C8657590000001D0605103745
 :1000900085543F000000811B191136385D45000072
 :1000A000004C16090B0E3328440000003B04070ADD
@@ -21,133 +21,138 @@
 :1001400000002B14081718122F2A000000551F2139
 :100150002325272E310000001E202224262D35566F
 :1001600000000029625C5B5A433D3E000000000035
-:100170000000000000010000AB011200020000BD01
-:10018000012200220000DF013F00210000CF010911
-:10019000000300001E0204010309042202100203EE
-:1001A0000904340212000001C1060012010002001D
-:1001B000000020C0167C0400010102000109022297
-:1001C00000010100C032090400000103010100091F
-:1001D0002111010001223F000705830308000105EA
-:1001E000010906A10175019508050719E029E71520
-:1001F00000250181029501750881039505750105AA
-:100200000819012905910295017503910395067559
-:1002100008150025680507190029688100C0040336
-:10022000090410034D00660067004E0061006D0078
-:100230006500000012034B006500790062006F004A
-:10024000610072006400000011241FBECFEFD2E0F5
-:10025000DEBFCDBF11E0A0E0B1E0EAE6F9E002C008
-:1002600005900D92A230B107D9F711E0A2E0B1E0FC
-:1002700001C01D92AD32B107E1F7D6D074C3C0CE34
-:10028000FB01DC0104C08D910190801921F44150E3
-:100290005040C8F7881B990B08955E9825E32A956E
-:1002A000F1F75E9AE0E9F1E03197F1F760E070E094
-:1002B000B5E3A5ED19C056955D984B2F4A95F1F71A
-:1002C0005D9A4A2F4A95F1F74C9B50682F5F3F4F3C
-:1002D0002830310581F7FC01E60FF71F50836F5F6F
-:1002E0007F4F6031710521F050E020E030E0E3CF36
-:1002F0000895AF92BF92CF92DF92EF92FF920F9349
-:100300001F93CF93DF93EC0100E0FF2464E770E0DC
-:1003100053E2A52E51E0B52E46E0E42E31E0C32E87
-:10032000D12C10922201F5018E2D11928A95E9F7B8
-:1003300050E020E030E080E0FE01E20FF31FB081EA
-:10034000A0912201482F182F185FFB01E40FF11D27
-:100350004F5F8491B0FF2FC0882369F187FF23C0CE
-:1003600090E08F7790708830910549F08930910541
-:1003700044F08930910569F00A97E9F411C001E071
-:100380001AC0F60102C0EE0FFF1F8A95E2F7AE2BEE
-:1003900012C0F0E064377F0771F464EF70E0C1CF02
-:1003A000FF24F39408C0563030F4E52FF0E0ED5D03
-:1003B000FE4F80835F5F411711F0B695C6CFA093C3
-:1003C00022012F5F3F4F2031310511F0842FB4CF30
-:1003D000002399F0E4E2F1E003C08191882371F4F5
-:1003E00081E0E932F807C9F780912301853031F4C3
-:1003F0001092D8000C94001801C06AD08091290195
-:1004000090E0969587958170F81619F089E360E081
-:10041000A7D0DF91CF911F910F91FF90EF90DF90C8
-:10042000CF90BF90AF900895CF93DF9380E88093F3
-:1004300061001092610080E68AB980E78BB931D003
-:1004400044D08823E9F380E395E720E931E0F9011E
-:100450003197F1F70197D9F780E1E2E0F1E0DF01B0
-:100460001D928A95E9F7C0E4DCE982E191E015DFAD
-:1004700082E191E062E071E040E150E001DF00974D
-:1004800061F082E191E035DFA2E0B1E0E2E1F1E08C
-:1004900080E101900D928150E1F7CE010197F1F7D3
-:1004A000E4CF80EA8093D80086E089BD09B400FEDD
-:1004B000FDCF80E88093D8001092E00010922A01CE
-:1004C0008CE08093E2007894089580912A01089549
-:1004D00080912A01882309F441C02FB7F89483E062
-:1004E0008093E9009091E4009E5C33E08091E80005
-:1004F00085FD0EC02FBF80912A01882379F180915C
-:10050000E400891759F12FB7F8943093E900EECF42
-:10051000809122018093F1001092F10080912301DB
-:100520008093F100809124018093F1008091250156
-:100530008093F100809126018093F1008091270142
-:100540008093F100809128018093F1008AE38093E9
-:10055000E80010922B012FBF80E008958FEF0895DF
-:100560006093220180932301B3DF882329F4109242
-:10057000220110922301ACCF08951F920F920FB663
-:100580000F9211242F938F939F938091E1001092EB
-:10059000E100982F83FF0FC01092E90081E0809363
-:1005A000EB001092EC0082E28093ED0088E08093F3
-:1005B000F00010922A0192FF44C080912A01882302
-:1005C00009F43FC0209100012223D9F180912C0130
-:1005D0008F5F80932C0190E083709070892B89F558
-:1005E00083E08093E9008091E80085FF2AC0809134
-:1005F0002B018F5F80932B01821719F510922B012D
-:10060000809122018093F1001092F10080912301EA
-:100610008093F100809124018093F1008091250165
-:100620008093F100809126018093F1008091270151
-:100630008093F100809128018093F1008AE38093F8
-:10064000E8009F918F912F910F900FBE0F901F90F8
-:1006500018951F920F920FB60F9211240F931F93AC
-:100660002F933F934F935F936F937F938F939F93BA
-:10067000AF93BF93EF93FF931092E9008091E8004E
-:1006800083FF5BC14091F1003091F1008091F10056
-:10069000682F70E02091F100922F80E0682B792B79
-:1006A0008091F100A82FB0E02091F100922F80E01E
-:1006B000A82BB92B1091F1000091F10082EF8093EB
-:1006C000E800363009F05AC02BE731E0A901455067
-:1006D0005040F9013797859194918617970701F556
-:1006E000FA01859194918A179B07D1F49A012E5FA4
-:1006F0003F4FF901659174912E5F3F4FF90144918D
-:10070000212F30E0902F80E0282B392B2F3F31050F
-:1007100019F010F02FEF30E0241758F4422F09C0E1
-:10072000295F3F4F495F5F4FF1E02C3A3F0789F661
-:1007300004C15EEF8091E800282F30E0C901857088
-:100740009070892BB9F322FDFBC0342F413208F0A1
-:1007500030E2232FCB0106C0FC010196E491E09327
-:10076000F10021502223C1F7630F711D431B5093E9
-:10077000E8004423F9F63032E9F2E2C0353061F4A2
-:100780008EEF8093E8008091E80080FFFCCF862FF9
-:1007900080688093E300D4C0393031F5442309F0F8
-:1007A00071C060932A018EEF8093E80085EA91E0A2
-:1007B00021E02093E900FC010196E491E093EB0035
-:1007C000EE2369F0AC014F5F5F4FFC018491809391
-:1007D000EC00CA010196FA0134913093ED002F5FCD
-:1007E000253039F78EE149C0383051F4403809F0EE
-:1007F00049C08091E80080FFFCCF80912A017BC036
-:100800003323D1F48091E80080FFFCCF423811F00F
-:1008100080E00DC0A093E9008091EB0090E025E01E
-:10082000969587952A95E1F781701092E90080935B
-:10083000F1001092F1007DC0313011F0333011F52C
-:10084000423001F561157105E9F42A2F2F77822FC7
-:1008500081508430B8F48EEF8093E8002093E90053
-:10086000333009F46AC089E18093EB0081E090E0C5
-:1008700002C0880F991F2A95E2F78093EA00109230
-:10088000EA005EC0AB2B09F058C0413AB9F53130EF
-:1008900009F58091E80080FFFCCF809122018093D0
-:1008A000F1001092F100809123018093F10080917A
-:1008B00024018093F100809125018093F1008091C3
-:1008C00026018093F100809127018093F1008091AF
-:1008D000280111C0323039F48091E80080FFFCCF4C
-:1008E0008091000108C0333041F58091E80080FF1D
-:1008F000FCCF809101018093F1001BC04132E9F4EB
-:10090000393061F48091E80082FFFCCF8091F100E2
-:10091000809329018BEF8093E8000BC03A3029F4D3
-:100920007093000110922B0104C03B3031F46093AE
-:1009300001018EEF8093E80003C081E28093EB0019
-:10094000FF91EF91BF91AF919F918F917F916F91A7
-:100950005F914F913F912F911F910F910F900FBE7B
-:0A0960000F901F901895F894FFCF38
-:02096A007D010D
+:1001700000000000245265766973696F6E240000E8
+:10018000010000B6011200020000C8012200220096
+:1001900000EA013F00210000DA0109000300002904
+:1001A0000204010309042D0210020309043F021294
+:1001B000000001C106001201000200000020C0166C
+:1001C0007C0400010102000109022200010100C0BB
+:1001D000320904000001030101000921110100019D
+:1001E000223F000705830308000105010906A1015C
+:1001F00075019508050719E029E715002501810219
+:1002000095017508810395057501050819012905F2
+:1002100091029501750391039506750815002568EF
+:100220000507190029688100C00403090410034D63
+:1002300000660067004E0061006D0065000000125E
+:10024000034B006500790062006F0061007200647A
+:100250000000000011241FBECFEFD2E0DEBFCDBFF3
+:1002600011E0A0E0B1E0E8EBF9E002C005900D92EA
+:10027000A230B107D9F711E0A2E0B1E001C01D92B0
+:10028000AD32B107E1F7F7D095C3BACEFB01DC017F
+:1002900004C08D910190801921F441505040C8F75D
+:1002A000881B990B08955E9825E32A95F1F75E9ACD
+:1002B000E0E9F1E03197F1F760E070E0B5E3A5ED3A
+:1002C00019C056955D984B2F4A95F1F75D9A4A2FC4
+:1002D0004A95F1F74C9B50682F5F3F4F283031050E
+:1002E00081F7FC01E60FF71F50836F5F7F4F60318E
+:1002F000710521F050E020E030E0E3CF0895CF9386
+:10030000DF93C4E7D1E001C02196FE0194919923C7
+:1003100069F0892F80538A30B8F7903311F487E25F
+:1003200002C0892F835160E042D1EECFDF91CF919F
+:100330000895E4E2F1E003C08191882389F481E02B
+:10034000E932F807C9F780912301853019F0893126
+:1003500039F405C01092D8000C9400180895CFCF3E
+:100360000895AF92BF92CF92DF92EF92FF920F93D8
+:100370001F93CF93DF93EC0100E0FF2464E770E06C
+:1003800053E2A52E51E0B52E46E0E42E31E0C32E17
+:10039000D12C10922201F5018E2D11928A95E9F748
+:1003A00050E080E020E030E0FE01E20FF31FB0817A
+:1003B000A0912201482F182F185FFB01E40FF11DB7
+:1003C0004F5F8491B0FF2FC0882369F187FF23C05E
+:1003D00090E08F7790708830910549F089309105D1
+:1003E00044F08930910569F00A97E9F411C001E001
+:1003F0001AC0F60102C0EE0FFF1F8A95E2F7AE2B7E
+:1004000012C0F0E064377F0771F464EF70E0C1CF91
+:10041000FF24F39408C0563030F4E52FF0E0ED5D92
+:10042000FE4F80835F5F411711F0B695C6CFA09352
+:1004300022012F5F3F4F2031310511F0842FB4CFBF
+:10044000002311F076DF01C06AD08091290190E08D
+:10045000969587958170F81619F089E360E0A7D02A
+:10046000DF91CF911F910F91FF90EF90DF90CF9090
+:10047000BF90AF900895CF93DF9380E880936100A1
+:100480001092610080E68AB980E78BB931D044D000
+:100490008823E9F380E395E720E931E0F90131971A
+:1004A000F1F70197D9F780E1E2E0F1E0DF011D9279
+:1004B0008A95E9F7C0E4DCE982E191E0F4DE82E1CB
+:1004C00091E062E071E040E150E0E0DE009761F031
+:1004D00082E191E046DFA2E0B1E0E2E1F1E080E11B
+:1004E00001900D928150E1F7CE010197F1F7E4CF31
+:1004F00080EA8093D80086E089BD09B400FEFDCF74
+:1005000080E88093D8001092E00010922A018CE0DD
+:100510008093E2007894089580912A010895809153
+:100520002A01882309F441C02FB7F89483E080930F
+:10053000E9009091E4009E5C33E08091E80085FD45
+:100540000EC02FBF80912A01882379F18091E400A9
+:10055000891759F12FB7F8943093E900EECF8091C5
+:1005600022018093F1001092F10080912301809389
+:10057000F100809124018093F10080912501809306
+:10058000F100809126018093F100809127018093F2
+:10059000F100809128018093F1008AE38093E800C4
+:1005A00010922B012FBF80E008958FEF0895609384
+:1005B000220180932301B3DF882329F410922201C2
+:1005C00010922301ACCF08951F920F920FB60F9295
+:1005D00011242F938F939F938091E1001092E1005B
+:1005E000982F83FF0FC01092E90081E08093EB0009
+:1005F0001092EC0082E28093ED0088E08093F0009E
+:1006000010922A0192FF44C080912A01882309F4A4
+:100610003FC0209100012223D9F180912C018F5FEE
+:1006200080932C0190E083709070892B89F583E092
+:100630008093E9008091E80085FF2AC080912B011A
+:100640008F5F80932B01821719F510922B018091F7
+:1006500022018093F1001092F10080912301809398
+:10066000F100809124018093F10080912501809315
+:10067000F100809126018093F10080912701809301
+:10068000F100809128018093F1008AE38093E800D3
+:100690009F918F912F910F900FBE0F901F901895E3
+:1006A0001F920F920FB60F9211240F931F932F9347
+:1006B0003F934F935F936F937F938F939F93AF93EA
+:1006C000BF93EF93FF931092E9008091E80083FFBE
+:1006D0005BC14091F1003091F1008091F100682FF1
+:1006E00070E02091F100922F80E0682B792B8091AF
+:1006F000F100A82FB0E02091F100922F80E0A82B0C
+:10070000B92B1091F1000091F10082EF8093E80085
+:10071000363009F05AC026E831E0A9014550504072
+:10072000F9013797859194918617970701F5FA019A
+:10073000859194918A179B07D1F49A012E5F3F4FC0
+:10074000F901659174912E5F3F4FF9014491212F7A
+:1007500030E0902F80E0282B392B2F3F310519F006
+:1007600010F02FEF30E0241758F4422F09C0295F12
+:100770003F4F495F5F4FF1E0273B3F0789F604C1D8
+:100780005EEF8091E800282F30E0C90185709070FD
+:10079000892BB9F322FDFBC0342F413208F030E23F
+:1007A000232FCB0106C0FC010196E491E093F100F8
+:1007B00021502223C1F7630F711D431B5093E800A2
+:1007C0004423F9F63032E9F2E2C0353061F48EEFBD
+:1007D0008093E8008091E80080FFFCCF862F80683E
+:1007E0008093E300D4C0393031F5442309F071C05F
+:1007F00060932A018EEF8093E80080EB91E021E086
+:100800002093E900FC010196E491E093EB00EE23D4
+:1008100069F0AC014F5F5F4FFC0184918093EC0065
+:10082000CA010196FA0134913093ED002F5F253013
+:1008300039F78EE149C0383051F4403809F049C0E9
+:100840008091E80080FFFCCF80912A017BC0332398
+:10085000D1F48091E80080FFFCCF423811F080E0B5
+:100860000DC0A093E9008091EB0090E025E0969503
+:1008700087952A95E1F781701092E9008093F10045
+:100880001092F1007DC0313011F0333011F542305B
+:1008900001F561157105E9F42A2F2F77822F815018
+:1008A0008430B8F48EEF8093E8002093E900333071
+:1008B00009F46AC089E18093EB0081E090E002C016
+:1008C000880F991F2A95E2F78093EA001092EA00B8
+:1008D0005EC0AB2B09F058C0413AB9F5313009F58B
+:1008E0008091E80080FFFCCF809122018093F1008D
+:1008F0001092F100809123018093F10080912401F6
+:100900008093F100809125018093F1008091260170
+:100910008093F100809127018093F100809128015C
+:1009200011C0323039F48091E80080FFFCCF809113
+:10093000000108C0333041F58091E80080FFFCCF12
+:10094000809101018093F1001BC04132E9F43930FC
+:1009500061F48091E80082FFFCCF8091F1008093E8
+:1009600029018BEF8093E8000BC03A3029F4709393
+:10097000000110922B0104C03B3031F4609301015F
+:100980008EEF8093E80003C081E28093EB00FF913B
+:10099000EF91BF91AF919F918F917F916F915F91F7
+:1009A0004F913F912F911F910F910F900FBE0F907C
+:0809B0001F901895F894FFCF89
+:0209B8007D01BF
 :00000001FF





More information about the Bknr-cvs mailing list