From d5f4d2695729494365d09a6dd22206bfe9357c14 Mon Sep 17 00:00:00 2001 From: joedinkle Date: Sun, 18 Sep 2022 08:02:17 -0700 Subject: [PATCH] Adding EOD RP2040 board humble40 --- keyboards/eyeohdesigns/humble40/config.h | 63 +++++++++++++++++++ keyboards/eyeohdesigns/humble40/humble40.c | 24 +++++++ keyboards/eyeohdesigns/humble40/humble40.h | 39 ++++++++++++ keyboards/eyeohdesigns/humble40/info.json | 10 +++ .../humble40/keymaps/default/keymap.c | 50 +++++++++++++++ keyboards/eyeohdesigns/humble40/readme.md | 24 +++++++ keyboards/eyeohdesigns/humble40/rules.mk | 23 +++++++ 7 files changed, 233 insertions(+) create mode 100644 keyboards/eyeohdesigns/humble40/config.h create mode 100644 keyboards/eyeohdesigns/humble40/humble40.c create mode 100644 keyboards/eyeohdesigns/humble40/humble40.h create mode 100644 keyboards/eyeohdesigns/humble40/info.json create mode 100644 keyboards/eyeohdesigns/humble40/keymaps/default/keymap.c create mode 100644 keyboards/eyeohdesigns/humble40/readme.md create mode 100644 keyboards/eyeohdesigns/humble40/rules.mk diff --git a/keyboards/eyeohdesigns/humble40/config.h b/keyboards/eyeohdesigns/humble40/config.h new file mode 100644 index 00000000000..8369f686002 --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2021 sekigon-gonnoc + +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 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER eye oh designs +#define PRODUCT humble40 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define DEBUG_MATRIX_SCAN_RATE +#define DEBUG_ACTION + +#define MATRIX_ROW_PINS { 29, 20, 10, 12 } +#define MATRIX_COL_PINS { 19, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN 28 +#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + + + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/eyeohdesigns/humble40/humble40.c b/keyboards/eyeohdesigns/humble40/humble40.c new file mode 100644 index 00000000000..f9855644806 --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/humble40.c @@ -0,0 +1,24 @@ +/* Copyright 2021 sekigon-gonnoc + * + * 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 "humble40.h" + +void keyboard_post_init_kb(void) { + debug_enable = true; + debug_keyboard = true; + + keyboard_post_init_user(); +} diff --git a/keyboards/eyeohdesigns/humble40/humble40.h b/keyboards/eyeohdesigns/humble40/humble40.h new file mode 100644 index 00000000000..552c16c1285 --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/humble40.h @@ -0,0 +1,39 @@ +/* Copyright 2021 sekigon-gonnoc + * + * 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 "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k36, k37, k39, k3b \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, KC_NO, KC_NO, k36, k37, KC_NO, k39, KC_NO, k3b } \ +} diff --git a/keyboards/eyeohdesigns/humble40/info.json b/keyboards/eyeohdesigns/humble40/info.json new file mode 100644 index 00000000000..e60fd89e5df --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "humble40", + "url": "", + "maintainer": "Eye Oh Designs", + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.25}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":2}, {"x":6.25, "y":3, "w":2.25}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":11.25, "y":3, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/eyeohdesigns/humble40/keymaps/default/keymap.c b/keyboards/eyeohdesigns/humble40/keymaps/default/keymap.c new file mode 100644 index 00000000000..084dace0a7f --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2021 sekigon-gonnoc + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(3), MO(2), KC_LGUI + ), + + [1] = LAYOUT( + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______ + ), + + [2] = LAYOUT( + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______ + ), + + [3] = LAYOUT( + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______, + _______, _______,_______, _______,_______, _______,_______, _______ + ), +}; diff --git a/keyboards/eyeohdesigns/humble40/readme.md b/keyboards/eyeohdesigns/humble40/readme.md new file mode 100644 index 00000000000..3b26c5235db --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/readme.md @@ -0,0 +1,24 @@ +# rp2040_example + +* Sample implementation for RP2040. + +* Keyboard Maintainer: [sekigon-gonnoc](https://github.com/sekigon-gonnoc) + +Make example for this keyboard (after setting up your build environment): + + make rp2040_example:default + +Flashing example for this keyboard by `picotool`: + + make rp2040_example:default:flash + +Convert firmware into uf2 format: + + make rp2040_example:default:uf2 + +To replace Pro Micro to Pico Micro, use `CTPIM=yes` (`CONVERT_TO_PICO_MICRO=yes`): + + make :: CTPIM=yes + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/eyeohdesigns/humble40/rules.mk b/keyboards/eyeohdesigns/humble40/rules.mk new file mode 100644 index 00000000000..a44dd59d4b9 --- /dev/null +++ b/keyboards/eyeohdesigns/humble40/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU_FAMILY = PICO +MCU_SERIES = RP2040 +MCU = cortex-m0plus +BOOTLOADER = RP2040 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # 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 +BACKLIGHT_DRIVER = software +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output