Skip to content

Commit

Permalink
add Mecx Labs mp1 macropad (qmk#19064)
Browse files Browse the repository at this point in the history
* add mecxlabs mp1 macropad
Co-authored-by: Joel Challis <[email protected]>
  • Loading branch information
patrykf03 committed Feb 1, 2023
1 parent e296d67 commit 252b041
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
46 changes: 46 additions & 0 deletions keyboards/mecxlabs/mp1/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"keyboard_name": "mp1",
"manufacturer": "Mecx Labs",
"maintainer": "patrykf03",
"usb": {
"vid": "0xC6C6",
"pid": "0x6C6C",
"device_version": "0.0.1"
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"encoder": true
},
"encoder": {
"rotary": [
{ "pin_a": "A10", "pin_b": "A9", "resolution": 2 }
]
},
"matrix_pins": {
"direct": [
["B14", "A14", "A15"],
["B13", "B12", "A2"],
["A5", "A4", "A3"]
]
},
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [
{ "matrix": [0, 0], "x": 0.0, "y": 0.0 },
{ "matrix": [0, 1], "x": 1.0, "y": 0.0 },
{ "matrix": [0, 2], "x": 2.0, "y": 0.0 },
{ "matrix": [1, 0], "x": 0.0, "y": 1.0 },
{ "matrix": [1, 1], "x": 1.0, "y": 1.0 },
{ "matrix": [1, 2], "x": 2.0, "y": 1.0 },
{ "matrix": [2, 0], "x": 0.0, "y": 2.0 },
{ "matrix": [2, 1], "x": 1.0, "y": 2.0 },
{ "matrix": [2, 2], "x": 2.0, "y": 2.0 }
]
}
}
}
22 changes: 22 additions & 0 deletions keyboards/mecxlabs/mp1/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[0] = LAYOUT_ortho_3x3(
KC_1, KC_2, KC_3,
KC_4, KC_5, KC_6,
KC_7, KC_8, KC_9
)

};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return true;
}
23 changes: 23 additions & 0 deletions keyboards/mecxlabs/mp1/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# mecxlabs mp1

* Keyboard Maintainer: [Patrykf03](https://github.com/Patrykf03)
* Hardware Supported: Mecx Labs mp1 macropad (STM32/APM32F072)
* Hardware Availability: [mecxlabs.com](https://mecxlabs.com/products/mp1-framework)

Make example for this keyboard (after setting up your build environment):

make mecxlabs/mp1:default

Flashing example for this keyboard:

make mecxlabs/mp1: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 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (encoder in top left) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `RESET` if it is available
4 changes: 4 additions & 0 deletions keyboards/mecxlabs/mp1/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -v FFFF -p FFFF
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

0 comments on commit 252b041

Please sign in to comment.