From 3d9fda3629c09819f2b7c07c68e3504bdf4cd0d3 Mon Sep 17 00:00:00 2001 From: Wilba6582 Date: Sat, 14 Jul 2018 16:51:34 +1000 Subject: Added M10-B implementation --- keyboards/rama/m10_b/config.h | 189 +++++++++++++++++++++++++ keyboards/rama/m10_b/info.json | 23 +++ keyboards/rama/m10_b/keymaps/default/config.h | 24 ++++ keyboards/rama/m10_b/keymaps/default/keymap.c | 26 ++++ keyboards/rama/m10_b/keymaps/default/readme.md | 7 + keyboards/rama/m10_b/keymaps/knops/config.h | 24 ++++ keyboards/rama/m10_b/keymaps/knops/keymap.c | 64 +++++++++ keyboards/rama/m10_b/keymaps/knops/readme.md | 7 + keyboards/rama/m10_b/m10_b.c | 44 ++++++ keyboards/rama/m10_b/m10_b.h | 29 ++++ keyboards/rama/m10_b/readme.md | 15 ++ keyboards/rama/m10_b/rules.mk | 68 +++++++++ 12 files changed, 520 insertions(+) create mode 100644 keyboards/rama/m10_b/config.h create mode 100644 keyboards/rama/m10_b/info.json create mode 100644 keyboards/rama/m10_b/keymaps/default/config.h create mode 100644 keyboards/rama/m10_b/keymaps/default/keymap.c create mode 100644 keyboards/rama/m10_b/keymaps/default/readme.md create mode 100644 keyboards/rama/m10_b/keymaps/knops/config.h create mode 100644 keyboards/rama/m10_b/keymaps/knops/keymap.c create mode 100644 keyboards/rama/m10_b/keymaps/knops/readme.md create mode 100644 keyboards/rama/m10_b/m10_b.c create mode 100644 keyboards/rama/m10_b/m10_b.h create mode 100644 keyboards/rama/m10_b/readme.md create mode 100644 keyboards/rama/m10_b/rules.mk (limited to 'keyboards/rama/m10_b') diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h new file mode 100644 index 0000000000..de626dba53 --- /dev/null +++ b/keyboards/rama/m10_b/config.h @@ -0,0 +1,189 @@ +/* +Copyright 2018 Wilba + +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 0x5241 // "RW" +#define PRODUCT_ID 0x00AB // 10-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA.WORKS +#define PRODUCT RAMA M10-B +#define DESCRIPTION RAMA M10-B Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6 } +#define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN C6 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/rama/m10_b/info.json b/keyboards/rama/m10_b/info.json new file mode 100644 index 0000000000..fb144030d0 --- /dev/null +++ b/keyboards/rama/m10_b/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "m10-b", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 1, "y": 3, "w": 2.0 } + ] + } + } +} diff --git a/keyboards/rama/m10_b/keymaps/default/config.h b/keyboards/rama/m10_b/keymaps/default/config.h new file mode 100644 index 0000000000..d150575c1a --- /dev/null +++ b/keyboards/rama/m10_b/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Wilba + * + * 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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/rama/m10_b/keymaps/default/keymap.c b/keyboards/rama/m10_b/keymaps/default/keymap.c new file mode 100644 index 0000000000..8002b8c7cd --- /dev/null +++ b/keyboards/rama/m10_b/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0 ) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +} + +void matrix_init_user(void) +{ +} + +void matrix_scan_user(void) +{ +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + return true; +} diff --git a/keyboards/rama/m10_b/keymaps/default/readme.md b/keyboards/rama/m10_b/keymaps/default/readme.md new file mode 100644 index 0000000000..3b3d6c3970 --- /dev/null +++ b/keyboards/rama/m10_b/keymaps/default/readme.md @@ -0,0 +1,7 @@ +![RAMA M10-B Layout Image](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/5b4997390e2e72d65f7a8e83/5b49993d6d2a732ab3595146/1531550014142/M10-Layout.jpg) + +# Default RAMA M10-B Layout + +This is an example layout. + + diff --git a/keyboards/rama/m10_b/keymaps/knops/config.h b/keyboards/rama/m10_b/keymaps/knops/config.h new file mode 100644 index 0000000000..d150575c1a --- /dev/null +++ b/keyboards/rama/m10_b/keymaps/knops/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Wilba + * + * 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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/rama/m10_b/keymaps/knops/keymap.c b/keyboards/rama/m10_b/keymaps/knops/keymap.c new file mode 100644 index 0000000000..b90ca686fb --- /dev/null +++ b/keyboards/rama/m10_b/keymaps/knops/keymap.c @@ -0,0 +1,64 @@ +#include QMK_KEYBOARD_H + +/*KNOPS_MISC*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /*KNOPS_LAYOUT*/ + +}; + +// M10-B LEDs are all in parallel and controlled by the QMK backlight +// functionality. LED functions here are for possible future use +// as layer indicators, etc. and not implemented yet. +// +// To implement LED functions here, QMK backlight functionality +// will need to be disabled either via rules.mk or config.h +// or overriding the backlight functions to do nothing. +// +// LEDs are driven by a transistor connected to pin C6. +// + +void set_led_state(int ledId, bool state) +{ +} + +void led_init_ports() +{ +} + +void led_set_layer(int layer) +{ + led_init_ports(); + + led_set_layer(0); + + /*KNOPS_SIMPLELED_STATES*/ +} + +void matrix_init_user(void) +{ + /*KNOPS_INIT*/ +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + /*KNOPS_MACRO*/ + return NULL; +} + +void matrix_scan_user(void) +{ + /*KNOPS_SCAN*/ +} + +void led_set_user(uint8_t usb_led) +{ + /*KNOPS_FUNCTIONALLED_STATES*/ +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + /*KNOPS_PROCESS_STATE*/ + return NULL; +} diff --git a/keyboards/rama/m10_b/keymaps/knops/readme.md b/keyboards/rama/m10_b/keymaps/knops/readme.md new file mode 100644 index 0000000000..3b3d6c3970 --- /dev/null +++ b/keyboards/rama/m10_b/keymaps/knops/readme.md @@ -0,0 +1,7 @@ +![RAMA M10-B Layout Image](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/5b4997390e2e72d65f7a8e83/5b49993d6d2a732ab3595146/1531550014142/M10-Layout.jpg) + +# Default RAMA M10-B Layout + +This is an example layout. + + diff --git a/keyboards/rama/m10_b/m10_b.c b/keyboards/rama/m10_b/m10_b.c new file mode 100644 index 0000000000..f43f6e2a19 --- /dev/null +++ b/keyboards/rama/m10_b/m10_b.c @@ -0,0 +1,44 @@ +/* Copyright 2018 Wilba + * + * 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 . + */ +#include "m10_b.h" +/* +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} +*/ diff --git a/keyboards/rama/m10_b/m10_b.h b/keyboards/rama/m10_b/m10_b.h new file mode 100644 index 0000000000..d55ad598ca --- /dev/null +++ b/keyboards/rama/m10_b/m10_b.h @@ -0,0 +1,29 @@ +/* Copyright 2018 Wilba + * + * 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 . + */ +#include "quantum.h" + +#ifndef RAMA_M10_B_H +#define RAMA_M10_B_H + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 ) \ + { \ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09}, \ + } +#endif // RAMA_M10_B diff --git a/keyboards/rama/m10_b/readme.md b/keyboards/rama/m10_b/readme.md new file mode 100644 index 0000000000..6fb04c6042 --- /dev/null +++ b/keyboards/rama/m10_b/readme.md @@ -0,0 +1,15 @@ +# RAMA M10-B + +![RAMA M10-B](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/5b4997390e2e72d65f7a8e83/5b499748352f534ffb40392b/1531549522790/RAMA-M10-B-04.572.jpg?format=1500w) + +Mechanical Mini Pad. [More info at Massdrop](https://www.massdrop.com/buy/rama-m10-a) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA M10-B PCB +Hardware Availability: [Massdrop](https://www.massdrop.com/buy/rama-m10-a) + +Make example for this keyboard (after setting up your build environment): + + make rama/m10_b:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file diff --git a/keyboards/rama/m10_b/rules.mk b/keyboards/rama/m10_b/rules.mk new file mode 100644 index 0000000000..24df4632dd --- /dev/null +++ b/keyboards/rama/m10_b/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches -- cgit v1.2.3