From 863d9c35feb583356c92aaa04c1b0f234febabc1 Mon Sep 17 00:00:00 2001 From: Andrew Braini Date: Fri, 24 Sep 2021 12:27:29 -0400 Subject: [Keyboard] Create the battleship gamepad keyboard. (#14551) Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/handwired/battleship_gamepad/config.h | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 keyboards/handwired/battleship_gamepad/config.h (limited to 'keyboards/handwired/battleship_gamepad/config.h') diff --git a/keyboards/handwired/battleship_gamepad/config.h b/keyboards/handwired/battleship_gamepad/config.h new file mode 100644 index 0000000000..1cbfbf87e9 --- /dev/null +++ b/keyboards/handwired/battleship_gamepad/config.h @@ -0,0 +1,52 @@ +/* Copyright 2021 Andrew Braini + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4142 +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER arbraini +#define PRODUCT Battleship Gamepad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } +#define UNUSED_PINS + +/* joystick configuration */ +#define JOYSTICK_BUTTON_COUNT 25 +#define JOYSTICK_AXES_COUNT 2 +#define JOYSTICK_AXES_RESOLUTION 10 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 -- cgit v1.2.3