Cosmetic changes.

This commit is contained in:
Tomek Rękawek 2016-11-26 17:19:44 +01:00
parent ebd1577636
commit a7b983542c
2 changed files with 6 additions and 5 deletions

View File

@ -19,11 +19,11 @@ The order of RJ10 pins is the same as in the computer connector:
For the Mini-DIN 6 plug, pins should be connected as follows:
1. +DATA -> pin 2,
1. +DATA -> pin 3,
2. -,
3. GND -> GND,
4. Vcc -> +5V,
5. +CLK -> pin 3,
5. +CLK -> pin 2,
6. -
Pinout for the female connector from front (copied from [Wikipedia](https://en.wikipedia.org/wiki/PS/2_port)):
@ -34,4 +34,4 @@ Pinout for the female connector from front (copied from [Wikipedia](https://en.w
* [Similar project based on stm32f0discovery kit](http://www.synack.net/~bbraun/mackbd/index.html),
* [Mac Plus technical information](http://www.mac.linux-m68k.org/devel/plushw.php) - contains the description of the protocol,
* [Mac Plus scancodes](https://github.com/altercation/tmk_firrmware_hhkb_teensy2/blob/master/protocol/m0110.c).
* [Mac Plus keyboard rawcodes](https://github.com/altercation/tmk_firrmware_hhkb_teensy2/blob/master/protocol/m0110.c).

View File

@ -66,6 +66,7 @@ void loop() {
}
}
// reads the command, operates the diagnostic LED and switches pin mode back to OUTPUT
byte readCmd() {
digitalWrite(LED_BUILTIN, LOW);
pinMode(MAC_DATA_PIN, INPUT_PULLUP);
@ -162,8 +163,6 @@ unsigned int getExtendedTransition() {
}
}
boolean capsLockPressed = false;
unsigned int translate(byte scanCode, boolean extended, boolean released) {
unsigned int translated = extended ? extScanCodesTable[scanCode] : scanCodesTable[scanCode];
if (translated == NULL_TRANSITION) {
@ -179,6 +178,8 @@ unsigned int translate(byte scanCode, boolean extended, boolean released) {
}
}
boolean capsLockPressed = false;
unsigned int handleCapsLockRelease() {
if (capsLockPressed) {
capsLockPressed = false;