mirror of
https://github.com/trekawek/mac-plus-ps2.git
synced 2025-01-15 02:30:12 +00:00
Cosmetic changes.
This commit is contained in:
parent
ebd1577636
commit
a7b983542c
@ -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).
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user