Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyboards/anavi: Add ANAVI Macro Pad 10 #18620

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions keyboards/anavi/macropad10/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2022 Leon Anavi <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "config_common.h"

/* Double tap reset button to enter bootloader */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
72 changes: 72 additions & 0 deletions keyboards/anavi/macropad10/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"keyboard_name": "Macro Pad 10",
"manufacturer": "ANAVI",
"url": "https://github.com/AnaviTechnology/anavi-macro-pad-10",
"maintainer": "leon-anavi",
"processor": "RP2040",
"bootloader": "rp2040",
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["GP6", "GP7", "GP0"],
"rows": ["GP29", "GP28", "GP27"]
},
"features": {
"bootmagic": false,
"command": false,
"console": false,
"extrakey": true,
"mousekey": false,
"nkro": true,
"rgblight": true
},
"rgblight": {
"pin": "GP3",
"led_count": 4,
"hue_steps": 10,
"saturation_steps": 17,
"brightness_steps": 17,
"max_brightness": 255,
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
}
},
"encoder": {
"enabled": true,
"rotary": [
{
"pin_a": "GP1",
"pin_b": "GP2",
"resolution": 2
}
]
},
"layouts": {
"LAYOUT_mp10": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 1], "x": 1, "y": 0 },
{ "matrix": [0, 2], "x": 2, "y": 0 },
{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 2, "y": 1 },
{ "matrix": [2, 0], "x": 0, "y": 2 },
{ "matrix": [2, 1], "x": 1, "y": 2 },
{ "matrix": [2, 2], "x": 2, "y": 2 }
]
}
},
"usb": {
"device_version": "1.0.0",
"pid": "0x9A25",
"vid": "0xFEED"
}
}
16 changes: 16 additions & 0 deletions keyboards/anavi/macropad10/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2022 Leon Anavi <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

enum layer_names {
_BASE
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_mp10(
KC_A , KC_B , KC_C ,
KC_D , KC_E , KC_F ,
RGB_M_R , RGB_MOD , RGB_TOG
)
};
16 changes: 16 additions & 0 deletions keyboards/anavi/macropad10/macropad10.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2022 Leon Anavi <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "encoder.h"

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return true;
}
#endif

21 changes: 21 additions & 0 deletions keyboards/anavi/macropad10/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ANAVI Macro Pad 10

Mini hot-swappable mechanical keyboard with a clickable rotary encoder, 9 Cherry MX compatible switches, translucent key caps, USB-C, RP2040 microcontroller, backlighting and under lighting.

* Keyboard Maintainer: [Leon Anavi](https://github.com/leon-anavi)
* Hardware Supported: ANAVI Macro Pad 10
* Hardware Availability: [Crowd Supply](https://www.crowdsupply.com/anavi-technology/anavi-macro-pad-10), [GitHub repository](https://github.com/AnaviTechnology/anavi-macro-pad-10)

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

qmk compile -kb anavi/macropad10 -km default

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 top left key on the left half, or top right key on the right half, and then plug in the USB cable on that keyboard half.
* **Physical reset button**: Double tap the reset button on the XIAO RP2040.
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available.
1 change: 1 addition & 0 deletions keyboards/anavi/macropad10/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WS2812_DRIVER = vendor