From 8ee389c9b6e6757c228534b095e609d5a9501102 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 26 Nov 2016 13:11:40 +0700 Subject: My Promethium keyboard firmware --- keyboards/handwired/promethium/config.h | 164 ++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 keyboards/handwired/promethium/config.h (limited to 'keyboards/handwired/promethium/config.h') diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h new file mode 100644 index 0000000000..5a2afe6abd --- /dev/null +++ b/keyboards/handwired/promethium/config.h @@ -0,0 +1,164 @@ +/* +Copyright 2012 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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6660 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Priyadi +#define PRODUCT Promethium Keyboard +#define DESCRIPTION Promethium Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* default pin-out */ +#define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 } +#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* PS/2 mouse */ +#ifdef PS2_USE_BUSYWAIT +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 1 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 +#endif + +/* PS/2 mouse interrupt version */ +#ifdef PS2_USE_INT +/* uses INT1 for clock line(ATMega32U4) */ +#define PS2_CLOCK_PORT PORTD +#define PS2_CLOCK_PIN PIND +#define PS2_CLOCK_DDR DDRD +#define PS2_CLOCK_BIT 3 +#define PS2_DATA_PORT PORTD +#define PS2_DATA_PIN PIND +#define PS2_DATA_DDR DDRD +#define PS2_DATA_BIT 2 + +#define PS2_INT_INIT() do { \ + EICRA |= ((1< Date: Sat, 26 Nov 2016 13:47:03 +0700 Subject: remove ifdef on chip type --- keyboards/handwired/promethium/config.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'keyboards/handwired/promethium/config.h') diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 5a2afe6abd..473af67d34 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -116,7 +116,6 @@ along with this program. If not, see . /* PS/2 mouse USART version */ #ifdef PS2_USE_USART -#if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) /* XCK for clock line and RXD for data line */ #define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PIN PIND @@ -158,7 +157,6 @@ along with this program. If not, see . #define PS2_USART_ERROR (UCSR1A & ((1< Date: Sat, 10 Dec 2016 03:20:02 +0700 Subject: Pretend to be Thinkpad USB Keyboard --- keyboards/handwired/promethium/config.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'keyboards/handwired/promethium/config.h') diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 473af67d34..097920a548 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -20,9 +20,15 @@ along with this program. If not, see . #include "config_common.h" +#define USB_VENDOR_ID_LENOVO 0x17ef +#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009 +#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047 +#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048 +#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067 + /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6660 +#define VENDOR_ID USB_VENDOR_ID_LENOVO +#define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD #define DEVICE_VER 0x0001 #define MANUFACTURER Priyadi #define PRODUCT Promethium Keyboard -- cgit v1.2.3 From 0b54b32361ca0bb32086f0a8f74a9beedd3b6fa1 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 10 Dec 2016 19:39:27 +0700 Subject: Enable Adafruit BLE support --- keyboards/handwired/promethium/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/handwired/promethium/config.h') diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 097920a548..23fbfd0b9a 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Priyadi #define PRODUCT Promethium Keyboard -#define DESCRIPTION Promethium Keyboard +#define DESCRIPTION /* key matrix size */ #define MATRIX_ROWS 8 -- cgit v1.2.3