Browse Source

[Keyboard] handwired/m40/5x5_macropad (#16288)

* Adding the custom handwired 5x5 macropad.

* Update keyboards/handwired/m40/5x5_macropad/readme.md

* Update keyboards/handwired/m40/5x5_macropad/rules.mk

* Update keyboards/handwired/m40/5x5_macropad/readme.md

* Update readme.md

fixed the github link to my profile

* Update keyboards/handwired/m40/5x5_macropad/5x5_macropad.c

* Update keyboards/handwired/m40/5x5_macropad/5x5_macropad.h

* Update keyboards/handwired/m40/5x5_macropad/5x5_macropad.h

* Update keyboards/handwired/m40/5x5_macropad/config.h

* Update keyboards/handwired/m40/5x5_macropad/readme.md

* Update keyboards/handwired/m40/5x5_macropad/config.h

* Update keyboards/handwired/m40/5x5_macropad/readme.md

* Update keyboards/handwired/m40/5x5_macropad/keymaps/default/keymap.c

* Apply suggestions from code review

* added discord Id for maintainer contact

* Update keyboards/handwired/m40/5x5_macropad/readme.md

* Update keyboards/handwired/m40/5x5_macropad/info.json
pull/16749/head
m40-dev 2 years ago
committed by GitHub
parent
commit
6cdf230a20
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 235 additions and 0 deletions
  1. +4
    -0
      keyboards/handwired/m40/5x5_macropad/5x5_macropad.c
  2. +27
    -0
      keyboards/handwired/m40/5x5_macropad/5x5_macropad.h
  3. +88
    -0
      keyboards/handwired/m40/5x5_macropad/config.h
  4. +41
    -0
      keyboards/handwired/m40/5x5_macropad/info.json
  5. +26
    -0
      keyboards/handwired/m40/5x5_macropad/keymaps/default/keymap.c
  6. +1
    -0
      keyboards/handwired/m40/5x5_macropad/keymaps/default/readme.md
  7. +26
    -0
      keyboards/handwired/m40/5x5_macropad/readme.md
  8. +22
    -0
      keyboards/handwired/m40/5x5_macropad/rules.mk

+ 4
- 0
keyboards/handwired/m40/5x5_macropad/5x5_macropad.c View File

@ -0,0 +1,4 @@
// Copyright 2022 Tomek (@m40-dev)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "5x5_macropad.h"

+ 27
- 0
keyboards/handwired/m40/5x5_macropad/5x5_macropad.h View File

@ -0,0 +1,27 @@
// Copyright 2022 Tomek (@m40-dev)
// SPDX-License-Identifier: GPL-2.0-or-later
#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_ortho_5x5( \
K000, K001, K002, K003, K004, \
K100, K101, K102, K103, K104, \
K200, K201, K202, K203, K204, \
K300, K301, K302, K303, K304, \
K400, K401, K402, K403, K404 ) { \
{ K000, K001, K002, K003, K004 }, \
{ K100, K101, K102, K103, K104 }, \
{ K200, K201, K202, K203, K204 }, \
{ K300, K301, K302, K303, K304 }, \
{ K400, K401, K402, K403, K404 } \
}

+ 88
- 0
keyboards/handwired/m40/5x5_macropad/config.h View File

@ -0,0 +1,88 @@
// Copyright 2022 Tomek (@m40-dev)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER m40
#define PRODUCT macropad
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 5
/*
* 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 { B5, B4, E6, D7, C6 }
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* 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 useful 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
/*
* 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

+ 41
- 0
keyboards/handwired/m40/5x5_macropad/info.json View File

@ -0,0 +1,41 @@
{
"keyboard_name": "5x5_macropad",
"url": "https://www.thingiverse.com/thing:5239739",
"maintainer": "m40-dev",
"layouts": {
"LAYOUT_ortho_5x5": {
"layout": [
{"label":"K000", "x":0, "y":0},
{"label":"K001", "x":1, "y":0},
{"label":"K002", "x":2, "y":0},
{"label":"K003", "x":3, "y":0},
{"label":"K004", "x":4, "y":0},
{"label":"K100", "x":0, "y":1},
{"label":"K101", "x":1, "y":1},
{"label":"K102", "x":2, "y":1},
{"label":"K103", "x":3, "y":1},
{"label":"K104", "x":4, "y":1},
{"label":"K200", "x":0, "y":2},
{"label":"K201", "x":1, "y":2},
{"label":"K202", "x":2, "y":2},
{"label":"K203", "x":3, "y":2},
{"label":"K204", "x":4, "y":2},
{"label":"K300", "x":0, "y":3},
{"label":"K301", "x":1, "y":3},
{"label":"K302", "x":2, "y":3},
{"label":"K303", "x":3, "y":3},
{"label":"K304", "x":4, "y":3},
{"label":"K400", "x":0, "y":4},
{"label":"K401", "x":1, "y":4},
{"label":"K402", "x":2, "y":4},
{"label":"K403", "x":3, "y":4},
{"label":"K404", "x":4, "y":4}
]
}
}
}

+ 26
- 0
keyboards/handwired/m40/5x5_macropad/keymaps/default/keymap.c View File

@ -0,0 +1,26 @@
// Copyright 2022 Tomek (@m40-dev)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_ortho_5x5(
//
KC_ESC, KC_1, KC_2, KC_3, RESET,
//
KC_1, KC_2, KC_3, KC_4, KC_5,
//
KC_1, KC_2, KC_3, KC_4, KC_5,
//
KC_1, KC_2, KC_3, KC_4, KC_5,
//
KC_1, KC_2, KC_3, KC_4, KC_5 )
//
};

+ 1
- 0
keyboards/handwired/m40/5x5_macropad/keymaps/default/readme.md View File

@ -0,0 +1 @@
# The default keymap for 5x5_macropad

+ 26
- 0
keyboards/handwired/m40/5x5_macropad/readme.md View File

@ -0,0 +1,26 @@
# 5x5_macropad
![m40](https://i.imgur.com/bWXH3FVl.jpeg)
This is very simple 5x5 macropad for general use. It does not come with any particular layout, it is assumed that layouts will be built on the qmk configurator site. Row and column pins start on the edge of Arduino, if smaller board is required, you can simply connect only first x row/column pairs to the board and get the size of the board you need.
* Keyboard Maintainer: [Tomek](https://github.com/m40-dev) (discord: m40#4792)
* Hardware Supported: 3D Printed, handwired, using Arduino Pro-Micro (Atmega32U4) for controller
* Hardware Availability: https://www.thingiverse.com/thing:5239739
Make example for this keyboard (after setting up your build environment):
make handwired/m40/5x5_macropad:default
Flashing example for this keyboard:
make handwired/m40/5x5_macropad: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).
## Bootloader
Enter the bootloader in 2 ways:
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `RESET` if it is available. In default layout (if you flashed it already once) it is the top-right button.

+ 22
- 0
keyboards/handwired/m40/5x5_macropad/rules.mk View File

@ -0,0 +1,22 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = caterina
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
# Disable unsupported hardware
AUDIO_SUPPORTED = no
BACKLIGHT_SUPPORTED = no

Loading…
Cancel
Save