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 9 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
27 changes: 27 additions & 0 deletions keyboards/dp3000/README.md
depermana12 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# DP3000

<img src="https://i.imgur.com/uBHS8EY.jpg" alt="dp3000 macropad" title="dp3000 macropad">
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

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
27 changes: 27 additions & 0 deletions keyboards/dp3000/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* 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 DRIVER_LED_TOTAL 8
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
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180
depermana12 marked this conversation as resolved.
Show resolved Hide resolved
29 changes: 29 additions & 0 deletions keyboards/dp3000/dp3000.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* 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"

led_config_t g_led_config = {{
{ NO_LED, NO_LED, NO_LED, NO_LED},
{ 3, 2, 1, 0 },
{ 4, 5, 6, 7 }
}, {
{ 0, 32 }, { 25, 32 }, { 37, 32 }, { 75, 32 },
{ 75, 16 }, { 37, 16 }, { 25, 16 }, { 0, 16 }
}, {
4, 4, 4, 4, 4, 4, 4, 4
}
};
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

89 changes: 89 additions & 0 deletions keyboards/dp3000/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"manufacturer": "depermana12",
"keyboard_name": "dp3000",
"maintainer": "depermana12",
"diode_direction": "COL2ROW",
"processor": "atmega32u4",
"bootloader": "caterina",
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
"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
"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
}
},
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 }
]
}
}
}
84 changes: 84 additions & 0 deletions keyboards/dp3000/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
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, MO(1),
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
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)},
};
bool oled_task_user(void) {
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;
}

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;
}
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
84 changes: 84 additions & 0 deletions keyboards/dp3000/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
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, MO(1),
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
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)},
};
bool oled_task_user(void) {
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;
}

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;
}
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
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
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