diff --git a/examples/SimpleTest/SimpleTest.ino b/examples/SimpleTest/SimpleTest.ino index 700c1a6..d05e189 100644 --- a/examples/SimpleTest/SimpleTest.ino +++ b/examples/SimpleTest/SimpleTest.ino @@ -69,11 +69,7 @@ PS2KeyRaw keyboard; void setup() { keyboard.begin( DATAPIN, IRQPIN ); Serial.begin( 115200 ); -#if defined(ARDUINO_ARCH_AVR) - Serial.println( F( "PS2 Raw Test of PS2 Keyboard codes" ) ); -#elif defined(ARDUINO_ARCH_SAM) Serial.println( "PS2 Raw Test of PS2 Keyboard codes" ); -#endif } void loop() diff --git a/library.properties b/library.properties index c4fb309..3773639 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,10 @@ name=PS2KeyRaw -version=1.0.2 +version=1.0.5 author=Paul Carpenter maintainer=Paul Carpenter sentence=PS2 keyboard control and raw data receiving paragraph=Controls and decodes the communication from the keyboard for testing purposes. category=Other url=https://github.com/techpaul/PS2KeyRaw.git -architectures=avr,sam \ No newline at end of file +architectures=avr,sam +includes=PS2KeyRaw.h \ No newline at end of file diff --git a/src/PS2KeyRaw.cpp b/src/PS2KeyRaw.cpp index 527a1cd..a361b19 100644 --- a/src/PS2KeyRaw.cpp +++ b/src/PS2KeyRaw.cpp @@ -1,7 +1,8 @@ -/* Version V1.0.4 +/* Version V1.0.5 PS2KeyRaw.cpp - PS2KeyRaw library Copyright (c) 2007 Free Software Foundation. All right reserved. Written by Paul Carpenter, PC Services + Update Jan-2020 Paul Carpenter, Improve conditionals for other platform support Stripped down version of PS2Keyboard to get every key code byte from a PS2 Keyboard for testing purposes. Enables capture of all bytes see example. @@ -110,7 +111,8 @@ void ps2interrupt( void ) head = val; } } - // fall through to default + bitcount = 0; + break; default: // in case of weird error and end of byte reception re-sync bitcount = 0; } diff --git a/src/PS2KeyRaw.h b/src/PS2KeyRaw.h index 4407d60..90470d9 100644 --- a/src/PS2KeyRaw.h +++ b/src/PS2KeyRaw.h @@ -1,7 +1,8 @@ -/* Version V1.0.2 +/* Version V1.0.5 PS2KeyRaw.h - PS2KeyRaw library Copyright (c) 2007 Free Software Foundation. All right reserved. Written by Paul Carpenter, PC Services + Update Jan-2020 Paul Carpenter, Improve conditionals for other platform support Stripped down version of PS2Keyboard to get every key code byte from a PS2 Keyboard for testing purposes. Enables capture of all bytes see examples. @@ -57,6 +58,7 @@ ** Modified for easy interrupt pin assignment on method begin(datapin,irq_pin). Cuningan ** V1.0.1 Modified September 2014 Paul Carpenter for easier state machines and parity checks V1.0.2 Modified January 2016 to improve interrupt assignment with new Arduino macros + V1.0.5 Modified January 2020 to match newer Library Manager and reduce warning errors This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -79,7 +81,7 @@ /** * Purpose: Provides an easy access to PS2 keyboards - * Author: Christian Weichel + * Based On: Christian Weichel */ class PS2KeyRaw { public: