Skip to content

Commit d60e585

Browse files
committed
Configure for latest Arduino Library Manager versions
Tidy up conditionals for adding platforms Simplify examples
1 parent d4fec79 commit d60e585

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

examples/SimpleTest/SimpleTest.ino

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ PS2KeyRaw keyboard;
6969
void setup() {
7070
keyboard.begin( DATAPIN, IRQPIN );
7171
Serial.begin( 115200 );
72-
#if defined(ARDUINO_ARCH_AVR)
73-
Serial.println( F( "PS2 Raw Test of PS2 Keyboard codes" ) );
74-
#elif defined(ARDUINO_ARCH_SAM)
7572
Serial.println( "PS2 Raw Test of PS2 Keyboard codes" );
76-
#endif
7773
}
7874

7975
void loop()

library.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name=PS2KeyRaw
2-
version=1.0.2
2+
version=1.0.5
33
author=Paul Carpenter <[email protected]>
44
maintainer=Paul Carpenter <[email protected]>
55
sentence=PS2 keyboard control and raw data receiving
66
paragraph=Controls and decodes the communication from the keyboard for testing purposes.
77
category=Other
88
url=https://github.com/techpaul/PS2KeyRaw.git
9-
architectures=avr,sam
9+
architectures=avr,sam
10+
includes=PS2KeyRaw.h

src/PS2KeyRaw.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/* Version V1.0.4
1+
/* Version V1.0.5
22
PS2KeyRaw.cpp - PS2KeyRaw library
33
Copyright (c) 2007 Free Software Foundation. All right reserved.
44
Written by Paul Carpenter, PC Services <[email protected]>
5+
Update Jan-2020 Paul Carpenter, Improve conditionals for other platform support
56
67
Stripped down version of PS2Keyboard to get every key code byte from a PS2
78
Keyboard for testing purposes. Enables capture of all bytes see example.
@@ -110,7 +111,8 @@ void ps2interrupt( void )
110111
head = val;
111112
}
112113
}
113-
// fall through to default
114+
bitcount = 0;
115+
break;
114116
default: // in case of weird error and end of byte reception re-sync
115117
bitcount = 0;
116118
}

src/PS2KeyRaw.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/* Version V1.0.2
1+
/* Version V1.0.5
22
PS2KeyRaw.h - PS2KeyRaw library
33
Copyright (c) 2007 Free Software Foundation. All right reserved.
44
Written by Paul Carpenter, PC Services <[email protected]>
5+
Update Jan-2020 Paul Carpenter, Improve conditionals for other platform support
56
67
Stripped down version of PS2Keyboard to get every key code byte from a PS2
78
Keyboard for testing purposes. Enables capture of all bytes see examples.
@@ -57,6 +58,7 @@
5758
** Modified for easy interrupt pin assignment on method begin(datapin,irq_pin). Cuningan <[email protected]> **
5859
V1.0.1 Modified September 2014 Paul Carpenter for easier state machines and parity checks
5960
V1.0.2 Modified January 2016 to improve interrupt assignment with new Arduino macros
61+
V1.0.5 Modified January 2020 to match newer Library Manager and reduce warning errors
6062
6163
This library is free software; you can redistribute it and/or
6264
modify it under the terms of the GNU Lesser General Public
@@ -79,7 +81,7 @@
7981

8082
/**
8183
* Purpose: Provides an easy access to PS2 keyboards
82-
* Author: Christian Weichel
84+
* Based On: Christian Weichel
8385
*/
8486
class PS2KeyRaw {
8587
public:

0 commit comments

Comments
 (0)