From 05792e2b83ea99009d895a4caad0e40b5395aff3 Mon Sep 17 00:00:00 2001 From: Benjamin Gould Date: Wed, 27 Nov 2013 00:24:57 -0500 Subject: Added bluefruit protocol and converter for 70% M --- converter/terminal_bluefruit/config.h | 112 ++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 converter/terminal_bluefruit/config.h (limited to 'converter/terminal_bluefruit/config.h') diff --git a/converter/terminal_bluefruit/config.h b/converter/terminal_bluefruit/config.h new file mode 100644 index 0000000000..8bf139d35f --- /dev/null +++ b/converter/terminal_bluefruit/config.h @@ -0,0 +1,112 @@ +/* +Converter for 70% IBM Terminal Keyboard +Author: Benjamin Gould, 2013 +Based on code Copyright 2011 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6535 +#define DEVICE_VER 0x0100 +#define MANUFACTURER t.m.k. +#define PRODUCT 70% IBM Terminal Keyboard Converter w/ Bluetooth +#define DESCRIPTION USB converter for IBM Terminal Keyboard w/ Bluetooth + + +/* matrix size */ +#define MATRIX_ROWS 17 // keycode bit: 3-0 +#define MATRIX_COLS 8 // keycode bit: 6-4 + + +/* legacy keymap support */ +// #define USE_LEGACY_KEYMAP + + +/* key combination for command */ +#define IS_COMMAND() ( \ + (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) || \ + (keyboard_report->mods == (MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL))) \ +) + +/* USART configuration + * asynchronous, 9600baud, 8-data bit, non parity, 1-stop bit, no flow control + */ +#ifdef __AVR_ATmega32U4__ + #define SERIAL_UART_BAUD 9600 + #define SERIAL_UART_DATA UDR1 + #define SERIAL_UART_UBRR ((F_CPU/(16UL*SERIAL_UART_BAUD))-1) + #define SERIAL_UART_RXD_VECT USART1_RX_vect + #define SERIAL_UART_TXD_READY (UCSR1A&(1<>8); /* baud rate */ \ + UCSR1B = (1<