From f51d929bd9dff0c11b2cca515d7a2f28fc5995d4 Mon Sep 17 00:00:00 2001 From: Dino Fizzotti Date: Sat, 3 Jul 2021 04:56:23 +0100 Subject: [Keyboard] Add FnRow v1 keyboard by dinofizz (#11817) Co-authored-by: Drashna Jaelre Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: Dino Fizzotti --- keyboards/dinofizz/fnrow/v1/chconf.h | 35 ++++++++++ keyboards/dinofizz/fnrow/v1/config.h | 36 ++++++++++ keyboards/dinofizz/fnrow/v1/halconf.h | 51 ++++++++++++++ keyboards/dinofizz/fnrow/v1/info.json | 78 ++++++++++++++++++++++ .../dinofizz/fnrow/v1/keymaps/default/keymap.c | 22 ++++++ .../dinofizz/fnrow/v1/keymaps/default/readme.md | 1 + keyboards/dinofizz/fnrow/v1/keymaps/via/keymap.c | 34 ++++++++++ keyboards/dinofizz/fnrow/v1/keymaps/via/rules.mk | 1 + keyboards/dinofizz/fnrow/v1/mcuconf.h | 28 ++++++++ keyboards/dinofizz/fnrow/v1/readme.md | 28 ++++++++ keyboards/dinofizz/fnrow/v1/rules.mk | 25 +++++++ keyboards/dinofizz/fnrow/v1/v1.c | 36 ++++++++++ keyboards/dinofizz/fnrow/v1/v1.h | 25 +++++++ 13 files changed, 400 insertions(+) create mode 100644 keyboards/dinofizz/fnrow/v1/chconf.h create mode 100644 keyboards/dinofizz/fnrow/v1/config.h create mode 100644 keyboards/dinofizz/fnrow/v1/halconf.h create mode 100644 keyboards/dinofizz/fnrow/v1/info.json create mode 100644 keyboards/dinofizz/fnrow/v1/keymaps/default/keymap.c create mode 100644 keyboards/dinofizz/fnrow/v1/keymaps/default/readme.md create mode 100644 keyboards/dinofizz/fnrow/v1/keymaps/via/keymap.c create mode 100644 keyboards/dinofizz/fnrow/v1/keymaps/via/rules.mk create mode 100644 keyboards/dinofizz/fnrow/v1/mcuconf.h create mode 100644 keyboards/dinofizz/fnrow/v1/readme.md create mode 100644 keyboards/dinofizz/fnrow/v1/rules.mk create mode 100644 keyboards/dinofizz/fnrow/v1/v1.c create mode 100644 keyboards/dinofizz/fnrow/v1/v1.h (limited to 'keyboards/dinofizz') diff --git a/keyboards/dinofizz/fnrow/v1/chconf.h b/keyboards/dinofizz/fnrow/v1/chconf.h new file mode 100644 index 0000000000..4f26862ffa --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/chconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confupdate -i keyboards/dinofizz/fnrow/v1/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_USE_TM FALSE + +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +#define CH_CFG_USE_DYNAMIC FALSE + +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +#include_next + diff --git a/keyboards/dinofizz/fnrow/v1/config.h b/keyboards/dinofizz/fnrow/v1/config.h new file mode 100644 index 0000000000..fb7e4e91db --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/config.h @@ -0,0 +1,36 @@ +/* +Copyright 2021 Dino Fizzotti + +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" + +#define VENDOR_ID 0xD1F1 +#define PRODUCT_ID 0x0100 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Dino Fizzotti +#define PRODUCT FnRow v1 + +#define MATRIX_ROWS 2 +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { A0, A1 } +#define MATRIX_COL_PINS {B0, B1, B3, B4, B5, B6, B7 } + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 5 diff --git a/keyboards/dinofizz/fnrow/v1/halconf.h b/keyboards/dinofizz/fnrow/v1/halconf.h new file mode 100644 index 0000000000..68dc2abdf5 --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/halconf.h @@ -0,0 +1,51 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confupdate -i keyboards/dinofizz/fnrow/v1/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_DAC FALSE + +#define HAL_USE_GPT FALSE + +#define HAL_USE_I2C FALSE + +#define HAL_USE_PWM FALSE + +#define HAL_USE_SERIAL_USB FALSE + +#define HAL_USE_SPI FALSE + +#define PAL_USE_CALLBACKS FALSE + +#define PAL_USE_WAIT FALSE + +#define ADC_USE_WAIT FALSE + +#define ADC_USE_MUTUAL_EXCLUSION FALSE + +#define SERIAL_USB_BUFFERS_SIZE 256 + +#define SPI_USE_WAIT FALSE + +#define SPI_USE_MUTUAL_EXCLUSION FALSE + +#include_next + diff --git a/keyboards/dinofizz/fnrow/v1/info.json b/keyboards/dinofizz/fnrow/v1/info.json new file mode 100644 index 0000000000..3cebfd079d --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "FnRow v1", + "maintainer": "dinofizz", + "url": "https://github.com/dinofizz/fnrow-pcb", + "width": 15, + "height": 1, + "layouts": { + "LAYOUT_fn_row": { + "layout": [ + { + "label": "SW1", + "x": 0, + "y": 0 + }, + { + "label": "SW3", + "x": 2, + "y": 0 + }, + { + "label": "SW5", + "x": 3, + "y": 0 + }, + { + "label": "SW7", + "x": 4, + "y": 0 + }, + { + "label": "SW9", + "x": 5, + "y": 0 + }, + { + "label": "SW11", + "x": 6.5, + "y": 0 + }, + { + "label": "SW13", + "x": 7.5, + "y": 0 + }, + { + "label": "SW2", + "x": 8.5, + "y": 0 + }, + { + "label": "SW4", + "x": 9.5, + "y": 0 + }, + { + "label": "SW6", + "x": 11, + "y": 0 + }, + { + "label": "SW8", + "x": 12, + "y": 0 + }, + { + "label": "SW10", + "x": 13, + "y": 0 + }, + { + "label": "SW12", + "x": 14, + "y": 0 + } + ] + } + } +} diff --git a/keyboards/dinofizz/fnrow/v1/keymaps/default/keymap.c b/keyboards/dinofizz/fnrow/v1/keymaps/default/keymap.c new file mode 100644 index 0000000000..653d03619a --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/keymaps/default/keymap.c @@ -0,0 +1,22 @@ +/* Copyright 2021 Dino Fizzotti + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fn_row( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 + ), +}; diff --git a/keyboards/dinofizz/fnrow/v1/keymaps/default/readme.md b/keyboards/dinofizz/fnrow/v1/keymaps/default/readme.md new file mode 100644 index 0000000000..4652577934 --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for FnRow v1 diff --git a/keyboards/dinofizz/fnrow/v1/keymaps/via/keymap.c b/keyboards/dinofizz/fnrow/v1/keymaps/via/keymap.c new file mode 100644 index 0000000000..025b730b46 --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/keymaps/via/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 Dino Fizzotti + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fn_row( + MO(1), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 + ), + + [1] = LAYOUT_fn_row( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_HOME, KC_END + ), + + [2] = LAYOUT_fn_row( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_fn_row( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/dinofizz/fnrow/v1/keymaps/via/rules.mk b/keyboards/dinofizz/fnrow/v1/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/dinofizz/fnrow/v1/mcuconf.h b/keyboards/dinofizz/fnrow/v1/mcuconf.h new file mode 100644 index 0000000000..6c4685668f --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/mcuconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confupdate -i keyboards/dinofizz/fnrow/v1/mcuconf.h -r platforms/chibios/GENERIC_STM32_F042X6/configs/mcuconf.h` + */ + +#pragma once + +#include_next + +#undef STM32_SERIAL_USE_USART2 +#define STM32_SERIAL_USE_USART2 TRUE + diff --git a/keyboards/dinofizz/fnrow/v1/readme.md b/keyboards/dinofizz/fnrow/v1/readme.md new file mode 100644 index 0000000000..707cbdcbfe --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/readme.md @@ -0,0 +1,28 @@ +# FnRow v1 + +A keyboard featuring a single horizontal row of switches in the style of a "function row" layout. + +* Keyboard Maintainer: [Dino Fizzotti](https://www.dinofizzotti.com) +* [PCB Schematic and layout](https://github.com/dinofizz/fnrow-pcb) +* [Blog post](https://www.dinofizzotti.com/blog/2021-02-07-fnrow-v1-a-configurable-function-row-layout-mechanical-keyboard/) + +## Features + +* USB-C +* USB ESD and overcurrent protection +* Dedicated reset switch to enable DFU mode +* Optional status LED + +## Compilation + +Make compilation example for this keyboard (after setting up your build environment): + + make dinofizz/fnrow/v1:default + +# Flashing + +The FnRow features a hardware reset push-button to the left of the USB-C port. To flash new firmware you will need to enter the bootloader mode first. Plug the FnRow in to your computer using a USB cable and press the reset button momentarily. The board will then show up as an STM32 flash bootloader device. You can then use the following command to flash new firmware to the board. + + make dinofizz/fnrow/v1:default:flash + +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/dinofizz/fnrow/v1/rules.mk b/keyboards/dinofizz/fnrow/v1/rules.mk new file mode 100644 index 0000000000..3ee041a7fd --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F042 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/dinofizz/fnrow/v1/v1.c b/keyboards/dinofizz/fnrow/v1/v1.c new file mode 100644 index 0000000000..a5c5b21eac --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/v1.c @@ -0,0 +1,36 @@ +/* Copyright 2021 Dino Fizzotti + * + * 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 "v1.h" + +void keyboard_pre_init_kb(void) { + // Immediately set the LED pin as an output and set it ON + setPinOutput(A15); + writePinHigh(A15); + + keyboard_pre_init_user(); +} + +void keyboard_post_init_kb(void) { + // Blink the LED so we know everything is running OK + // Finish with LED OFF + writePinLow(A15); + wait_ms(100); + writePinHigh(A15); + wait_ms(100); + writePinLow(A15); + + keyboard_post_init_user(); +} diff --git a/keyboards/dinofizz/fnrow/v1/v1.h b/keyboards/dinofizz/fnrow/v1/v1.h new file mode 100644 index 0000000000..ce9209cad9 --- /dev/null +++ b/keyboards/dinofizz/fnrow/v1/v1.h @@ -0,0 +1,25 @@ +/* Copyright 2021 Dino Fizzotti + * + * 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" + +#define LAYOUT_fn_row( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, }, \ + { K007, K008, K009, K010, K011, K012, KC_NO }, \ +} -- cgit v1.2.1