]> git.donarmstrong.com Git - tmk_firmware.git/commitdiff
Merge remote-tracking branch 'tmk/master' into cub_layout
authorOleg Kostyuk <cub.uanic@gmail.com>
Fri, 2 Jan 2015 21:55:55 +0000 (23:55 +0200)
committerOleg Kostyuk <cub.uanic@gmail.com>
Fri, 2 Jan 2015 21:55:55 +0000 (23:55 +0200)
common/command.c
common/keycode.h
common/report.h
converter/usb_usb/README
protocol.mk
protocol/ps2_io_avr.c

index 971ef7f0af4ba9f4ba1cbd5a80c4327818b424f9..1a507e3a462050ae07a7b3375ae39ac7351f284f 100644 (file)
@@ -194,6 +194,7 @@ static bool command_common(uint8_t code)
         case KC_CAPSLOCK:
             if (host_get_driver()) {
                 host_driver = host_get_driver();
+                clear_keyboard();
                 host_set_driver(0);
                 print("Locked.\n");
             } else {
index 08c3cbf42b55e6b34b9138e8e852b8384a21e5e0..ac4ef00db66f77237e5bcdfe60caffc05da44b0d 100644 (file)
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-/* 
+/*
  * Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes
  * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
  */
@@ -140,6 +140,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define KC_VOLD KC_AUDIO_VOL_DOWN
 #define KC_MNXT KC_MEDIA_NEXT_TRACK
 #define KC_MPRV KC_MEDIA_PREV_TRACK
+#define KC_MFFD KC_MEDIA_FAST_FORWARD
+#define KC_MRWD KC_MEDIA_REWIND
 #define KC_MSTP KC_MEDIA_STOP
 #define KC_MPLY KC_MEDIA_PLAY_PAUSE
 #define KC_MSEL KC_MEDIA_SELECT
@@ -390,7 +392,7 @@ enum hid_keyboard_keypad_usage {
     KC_RALT,
     KC_RGUI,
 
-    /* NOTE: 0xE8-FF are used for internal special purpose */ 
+    /* NOTE: 0xE8-FF are used for internal special purpose */
 };
 
 /* Special keycodes */
@@ -420,7 +422,9 @@ enum internal_special_keycodes {
     KC_WWW_FORWARD,
     KC_WWW_STOP,
     KC_WWW_REFRESH,
-    KC_WWW_FAVORITES,   /* 0xBA */
+    KC_WWW_FAVORITES,
+    KC_MEDIA_FAST_FORWARD,
+    KC_MEDIA_REWIND,    /* 0xBC */
 
     /* Fn key */
     KC_FN0              = 0xC0,
index 62190469a42bbd10d1c2ee82a26c4fb6a84d8293..f6c0a315de9307de6c62ac6e2489e3ce2e62e750 100644 (file)
@@ -61,6 +61,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* supplement for Bluegiga iWRAP HID(not supported by Windows?) */
 #define AL_LOCK                 0x019E
 #define TRANSPORT_RECORD        0x00B2
+#define TRANSPORT_FAST_FORWARD  0x00B3
 #define TRANSPORT_REWIND        0x00B4
 #define TRANSPORT_EJECT         0x00B8
 #define AC_MINIMIZE             0x0206
@@ -158,6 +159,8 @@ typedef struct {
     (key == KC_AUDIO_VOL_DOWN   ?  AUDIO_VOL_DOWN : \
     (key == KC_MEDIA_NEXT_TRACK ?  TRANSPORT_NEXT_TRACK : \
     (key == KC_MEDIA_PREV_TRACK ?  TRANSPORT_PREV_TRACK : \
+    (key == KC_MEDIA_FAST_FORWARD ?  TRANSPORT_FAST_FORWARD : \
+    (key == KC_MEDIA_REWIND     ?  TRANSPORT_REWIND : \
     (key == KC_MEDIA_STOP       ?  TRANSPORT_STOP : \
     (key == KC_MEDIA_EJECT      ?  TRANSPORT_STOP_EJECT : \
     (key == KC_MEDIA_PLAY_PAUSE ?  TRANSPORT_PLAY_PAUSE : \
@@ -171,7 +174,7 @@ typedef struct {
     (key == KC_WWW_FORWARD      ?  AC_FORWARD : \
     (key == KC_WWW_STOP         ?  AC_STOP : \
     (key == KC_WWW_REFRESH      ?  AC_REFRESH : \
-    (key == KC_WWW_FAVORITES    ?  AC_BOOKMARKS : 0)))))))))))))))))))
+    (key == KC_WWW_FAVORITES    ?  AC_BOOKMARKS : 0)))))))))))))))))))))
 
 #ifdef __cplusplus
 }
index 69caabb27888d49d7a46a9f31b47e62cfc83695a..30d5deb1e5817b1428a45721d82e85b145192eda 100644 (file)
@@ -7,7 +7,19 @@ Arduino Leonardo
     http://arduino.cc/en/Main/ArduinoBoardLeonardo 
 
 Circuit@Home USB Host Shield 2.0
-    http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino
+    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino-assembled/
+
+Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be the easiest way, you won't need even soldering iron.
+Arduino's Shield will also work well but I think Sparkfun's needs to be modified.
+
+    http://arduino.cc/en/Main/ArduinoUSBHostShield
+    https://www.sparkfun.com/products/9947
+
+Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing.
+    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini
+    https://www.sparkfun.com/products/12587
+    https://www.pjrc.com/teensy/td_libs_USBHostShield.html
+
 
 
 Build firmware
@@ -32,6 +44,8 @@ Limitation
 Only supports 'HID Boot protocol'.
 Not support keyboard LED yet.
 
+Note that the converter can host only USB "boot protocol" keyboard(6KRO) and not NKRO, it is possible to support NKRO keyboard but you will need to write HID report parser for that. Every NKRO keyboard can have different HID report and it is difficult to support all kind of NKRO keyboards in the market.
+
 
 
 Update
index e057d1d601e0f3d6af0fb5020491ca97686a3b39..d9194b2bfc0d731f5b0f417772a9bbee1fe84679 100644 (file)
@@ -15,11 +15,13 @@ endif
 
 ifdef PS2_USE_INT
     SRC += protocol/ps2_interrupt.c
+    SRC += protocol/ps2_io_avr.c
     OPT_DEFS += -DPS2_USE_INT
 endif
 
 ifdef PS2_USE_USART
     SRC += protocol/ps2_usart.c
+    SRC += protocol/ps2_io_avr.c
     OPT_DEFS += -DPS2_USE_USART
 endif
 
index be13d6696acfaea9436cba398c6ae44dccd98051..ed462345baf1e11648290af78218c718fbbf16c9 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdbool.h>
+#include <avr/io.h>
 #include <util/delay.h>
 
 /* Check port settings for clock and data line */