/* Heavily modified by WS PS2Keyboard.h - PS2Keyboard library Copyright (c) 2007 Free Software Foundation. All right reserved. Written by Christian Weichel ** Mostly rewritten Paul Stoffregen , June 2010 ** Modified for use with Arduino 13 by L. Abraham Smith, * ** Modified for easy interrup pin assignement on method begin(datapin,irq_pin). Cuningan ** This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "Arduino.h" #define PS2Keyboard_h #define PS2_KEYMAP_SIZE 136 typedef struct { uint8_t noshift[PS2_KEYMAP_SIZE]; uint8_t shift[PS2_KEYMAP_SIZE]; uint8_t uses_altgr; uint8_t altgr[PS2_KEYMAP_SIZE]; } PS2Keymap_t; extern const PROGMEM PS2Keymap_t PS2Keymap_US; class PS2Keyboard { public: static void begin(uint8_t dataPin, uint8_t irq_pin, const PS2Keymap_t &map = PS2Keymap_US); static bool available(); static int read(); };