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

Add dp3000 macropad #21413

Merged
merged 30 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
01281a7
add dp3000
depermana12 Jun 30, 2023
7ec551e
add dp3000
depermana12 Jun 30, 2023
7cbec37
add dp3000
depermana12 Jun 30, 2023
cdd9e91
Update copyright keymap.c
depermana12 Jun 30, 2023
fc16ca7
Updatea copyright keymap.c
depermana12 Jun 30, 2023
81a2e10
move rgb_matrix animation to info.json
depermana12 Jun 30, 2023
5343b5e
Update info.json
depermana12 Jun 30, 2023
9e25330
move to info.json
depermana12 Jun 30, 2023
1999e6f
Update rules.mk
depermana12 Jun 30, 2023
59a76ed
Update README.md
depermana12 Jul 1, 2023
3d2a4cc
remove driver_led_total config.h
depermana12 Jul 1, 2023
fc7b86d
Update dp3000.c
depermana12 Jul 1, 2023
f1abe68
Update info.json
depermana12 Jul 1, 2023
6e2103a
Update keymap.c
depermana12 Jul 1, 2023
6891648
Update keymap.c
depermana12 Jul 1, 2023
b0e12d9
Update README.md
depermana12 Jul 1, 2023
040b566
Rename README.md to readme.md
depermana12 Jul 1, 2023
5a7a093
Update dp3000.c
depermana12 Jul 1, 2023
d02b7d0
moved max_brightness to info.json
depermana12 Jul 1, 2023
cd787df
Update rgb_matrix max_brightness info.json
depermana12 Jul 1, 2023
ca7e070
remove encoder_map
depermana12 Jul 3, 2023
86ed233
Update layer indicator dp3000.c
depermana12 Jul 3, 2023
a082ae4
remove 8bit bitmask config.h
depermana12 Jul 3, 2023
e2723ae
Update rules.mk
depermana12 Jul 3, 2023
b755844
Update encoder_map keymap.c
depermana12 Jul 3, 2023
fb95251
Update encoder_map keymap.c
depermana12 Jul 3, 2023
7117e26
Update encoder_map rules.mk
depermana12 Jul 3, 2023
7436de4
Update config.h
depermana12 Jul 3, 2023
dce715f
remove encoder_map from keyboard level
depermana12 Jul 6, 2023
0ae4c40
added rules.mk enabled encoder map at default keymap level
depermana12 Jul 6, 2023
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
25 changes: 25 additions & 0 deletions keyboards/dp3000/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2023 deddia permana (@depermana12)
*
* 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 <http://www.gnu.org/licenses/>.
*/

#pragma once

#define LAYER_STATE_8BIT
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
#define RGB_MATRIX_LED_COUNT 8
#define RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_KEYRELEASES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_WHEN_USB_SUSPENDED
47 changes: 47 additions & 0 deletions keyboards/dp3000/dp3000.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* Copyright 2023 deddia permana (@depermana12)
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"

bool oled_task_kb(void) {
depermana12 marked this conversation as resolved.
Show resolved Hide resolved
if (!oled_task_user()) {
return false;
}
oled_write_P(PSTR("LAYER: "), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("0"), false);
break;
case 1:
oled_write_P(PSTR("1"), false);
break;
case 2:
oled_write_P(PSTR("2"), false);
break;
case 3:
oled_write_P(PSTR("3"), false);
break;
}
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

led_t led_state = host_keyboard_led_state();
oled_set_cursor(0, 1);
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_set_cursor(0, 2);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_set_cursor(0, 3);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);

return false;
}
99 changes: 99 additions & 0 deletions keyboards/dp3000/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"manufacturer": "depermana12",
"keyboard_name": "dp3000",
"maintainer": "depermana12",
"diode_direction": "COL2ROW",
"development_board": "promicro",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"encoder": true,
"encoder_map": true,
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
"rgb_matrix": true,
"oled": true,
"mousekey": false,
"nkro": false
},
"build": {
"lto": true
},
"url": "https://github.com/depermana12",
"usb": {
"device_version": "1.0.1",
"vid": "0x4450",
"pid": "0x6470"
},
"encoder": {
"rotary": [
{ "pin_a": "B2", "pin_b": "B1"},
{ "pin_a": "F4", "pin_b": "F5"}
]
},
"ws2812": {
"pin": "B5"
},
"rgb_matrix":{
"driver":"WS2812",
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
"max_brightness": 180,
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron":true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"typing_heatmap": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_multinexus": true,
"splash": true,
"solid_splash": true
},
"layout":[
{ "matrix": [1, 0], "x": 0, "y": 32, "flags":4 },
{ "matrix": [1, 1], "x": 25, "y": 32, "flags":4 },
{ "matrix": [1, 2], "x": 37, "y": 32, "flags":4 },
{ "matrix": [1, 3], "x": 75, "y": 32, "flags":4 },
{ "matrix": [2, 0], "x": 75, "y": 16, "flags":4 },
{ "matrix": [2, 1], "x": 37, "y": 16, "flags":4 },
{ "matrix": [2, 2], "x": 25, "y": 16, "flags":4 },
{ "matrix": [2, 3], "x": 0, "y": 16, "flags":4 }
]
},
waffle87 marked this conversation as resolved.
Show resolved Hide resolved
"matrix_pins": {
"cols": ["D4", "D7", "B4", "C6"],
"rows": ["F6", "F7", "B3"]
},
"layouts": {
"LAYOUT": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 3], "x": 3, "y": 0 },
{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 2, "y": 1 },
{ "matrix": [1, 3], "x": 3, "y": 1 },
{ "matrix": [2, 0], "x": 0, "y": 2 },
{ "matrix": [2, 1], "x": 1, "y": 2 },
{ "matrix": [2, 2], "x": 2, "y": 2 },
{ "matrix": [2, 3], "x": 3, "y": 2 }
]
}
}
}
57 changes: 57 additions & 0 deletions keyboards/dp3000/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
Copyright 2023 deddia permana (@depermana12)

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 <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌─────────┐ ┌─────────┐
* │ mute │ │ MO(1) │
* ├─────────┼─────────┬─────────┼─────────┤
* │ 1 │ 2 │ 3 │ 4 │
* ├─────────┼─────────┼─────────┼─────────┤
* │ 5 │ 6 │ 7 │ 8 │
* └─────────┴─────────┴─────────┴─────────┘
*/
[0] = LAYOUT(
KC_MUTE, MO(1),
KC_1, KC_2, KC_3, KC_4,
KC_5, KC_6, KC_7, KC_8
),
[1] = LAYOUT(
QK_BOOT, _______,
KC_1, KC_2, KC_3, KC_4,
TO(0), TO(2), TO(3), RGB_TOG
),
[2] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______
),
[3] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______
)
};

const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
[1] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT)},
};
57 changes: 57 additions & 0 deletions keyboards/dp3000/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
Copyright 2023 deddia permana (@depermana12)

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 <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌─────────┐ ┌─────────┐
* │ mute │ │ MO(1) │
* ├─────────┼─────────┬─────────┼─────────┤
* │ 1 │ 2 │ 3 │ 4 │
* ├─────────┼─────────┼─────────┼─────────┤
* │ 5 │ 6 │ 7 │ 8 │
* └─────────┴─────────┴─────────┴─────────┘
*/
[0] = LAYOUT(
KC_MUTE, MO(1),
KC_1, KC_2, KC_3, KC_4,
KC_5, KC_6, KC_7, KC_8
),
[1] = LAYOUT(
QK_BOOT, _______,
KC_1, KC_2, KC_3, KC_4,
TO(0), TO(2), TO(3), RGB_TOG
),
[2] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______
),
[3] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______
)
};

const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
[1] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT)},
};
1 change: 1 addition & 0 deletions keyboards/dp3000/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
27 changes: 27 additions & 0 deletions keyboards/dp3000/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# DP3000

![dp3000 macropad](https://i.imgur.com/uBHS8EYh.jpg)

dp3000 is a simple yet elegant macropad, 2x4 (8 keys), dual encoder, embedded with an Atmel 32u4 chip, powered by QMK.

* Keyboard Maintainer: [Deddia Permana](https://github.com/depermana12)
* Hardware Supported: DP3000 PCB, ATmega32u4
* Hardware Availability: [tokopedia.com/gundamtricks](https://www.tokopedia.com/gundamtricks)

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

make dp3000:default

Flashing example for this keyboard:

make dp3000: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 (usually the top left key or Escape) and plug in the keyboard
* Physical reset button: Briefly press reset button twice, located in front of the first rotary encoder (left rotary encoder)
* Keycode in layout: Press the key mapped to QK_BOOT if it is available
1 change: 1 addition & 0 deletions keyboards/dp3000/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file intentionally left blank