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 rev2 #21478

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
1577008
add dp3000 macropad rev2
depermana12 Jul 8, 2023
b72d44b
using `last_input_activity_elapsed()` for checking the timer
depermana12 Jul 8, 2023
14c6ba7
formatted `info.json`
depermana12 Jul 8, 2023
ec5da21
formatted `info.json`
depermana12 Jul 8, 2023
9075ad1
Update dp3000.h
depermana12 Jul 8, 2023
a505bd2
Update info.json
depermana12 Jul 8, 2023
f116b93
Delete config.h
depermana12 Jul 9, 2023
6ae67ca
include quantum.h dp3000.h
depermana12 Jul 9, 2023
336d42b
delete include quantum.h dp3000.c
depermana12 Jul 9, 2023
c1ff1a6
move usb `device_version` and `pid` to rev level
depermana12 Jul 9, 2023
6f88a8c
add usb `device_version` and `pid` rev1 `info.json`
depermana12 Jul 9, 2023
690539c
add different usb `device_version` and `pid` for rev2 `info.json`
depermana12 Jul 9, 2023
fbcb53c
Update info.json
depermana12 Jul 9, 2023
50f24f6
remove default value rgblight hue_steps
depermana12 Jul 21, 2023
ab5d385
Merge branch 'qmk:master' into revision-2
depermana12 Aug 17, 2023
c43966a
Merge branch 'qmk:master' into revision-2
depermana12 Aug 26, 2023
221cea6
Merge branch 'develop' into revision-2
depermana12 Aug 26, 2023
11a8101
Fix compilation of dynamic_keymap.c without VIA (#21858)
zvecr Aug 29, 2023
af2d6ea
fix 60_hhkb ASCII diagram (#21813)
dunk2k Aug 29, 2023
4769f6d
chore(ferris/test): visually format keymap (#21851)
komidore64 Aug 29, 2023
6d73444
fix 60_jis keymap.c (#21820)
dunk2k Aug 30, 2023
281541f
Fix invalid encoder_map declaration (#21868)
zvecr Aug 30, 2023
fbb61c3
Update keymap.c to add encoder (#21469)
Laneware Aug 30, 2023
ce51fdf
doio/kb16: Added timeout option for OLED boot logo. (#21823)
luttermann Aug 30, 2023
c2a81d8
Revert "fix 60_hhkb ASCII diagram (#21813)" (#21869)
zvecr Aug 30, 2023
adef366
CannonKeys Meetup Pad 2023 (#21806)
Aug 30, 2023
9614c3a
[keyboard] add sweeq, a ferris/sweep variant with diodes (#21597)
idank Aug 30, 2023
d92ef59
Update macOS install script (#21854)
fauxpark Aug 31, 2023
ab9e74a
Abko AK84BT Layout Touch-Up (#21876)
noroadsleft Sep 1, 2023
742143a
Update info.json
depermana12 Sep 1, 2023
4b1aa16
AH Haven65 Community Layout support (#21880)
noroadsleft Sep 1, 2023
81ea4f9
nullbitsco/snap: fix broken keymaps (#21877)
jaygreco Sep 1, 2023
633d92a
chore: ignore virtual environment directory (#20905)
frankebel Sep 3, 2023
b03b49f
Add 1upkeyboards Super16v3 (#21665)
ziptyze Sep 3, 2023
04ce349
[keyboard] add redragon/k667 (#21417)
temp4gh Sep 3, 2023
47e72a9
Add M6-C Keyboard Firmware (#21852)
ToastyStoemp Sep 3, 2023
8ad43a9
Added kiserdesigns keyboard folder and Madeline keyboard (#21857)
NCKiser Sep 3, 2023
e26442f
redragon/k667: Remove 2 layer VIA restriction (#21889)
zvecr Sep 3, 2023
dd17b6b
AH Haven80 Community Layout support (#21885)
noroadsleft Sep 4, 2023
9eaa8a2
ANAVI Macro Pad 12: rename LAYOUT to LAYOUT_ortho_4x3 (#21886)
noroadsleft Sep 4, 2023
fd095bb
Chosfox CF81: correct layout data (#21902)
noroadsleft Sep 4, 2023
b2ded61
Auto-label data-driven efforts (#21900)
zvecr Sep 4, 2023
2f51704
CannonKeys Bastion75 Layout Additions (#21899)
noroadsleft Sep 5, 2023
2f243e2
CannonKeys Bastion60 Layout Additions (#21887)
noroadsleft Sep 5, 2023
809865e
CannonKeys Bastion65 Layout Additions (#21888)
noroadsleft Sep 5, 2023
6aa3814
CannonKeys BastionTKL Layout Additions (#21901)
noroadsleft Sep 5, 2023
8779539
Merge branch 'qmk:master' into revision-2
depermana12 Sep 5, 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
80 changes: 71 additions & 9 deletions keyboards/dp3000/dp3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,84 @@
* 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) {
if (!oled_task_user()) {
return false;
}
#include "dp3000.h"

#define LOGO_TIMEOUT 3000
#define CUSTOM_OLED_TIMEOUT 30000

static uint32_t logo_timer = 0;
static bool display_logo = true;

void dp3000_logo(void) {
static const char PROGMEM dp3000_logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x60, 0x7c, 0x7c, 0x60, 0x60, 0x60, 0x60,
0x7c, 0x7c, 0x60, 0x60, 0x60, 0x60, 0x7c, 0x7c, 0x60, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x86, 0x86, 0x86, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0xf0, 0xe0,
0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0xf8, 0xf0, 0x00, 0x00, 0xff, 0xff, 0x86, 0x86, 0x86, 0x00,
0x00, 0x00, 0x00, 0x18, 0x18, 0x98, 0x98, 0xf8, 0xf0, 0x00, 0xf0, 0xf8, 0x18, 0x18, 0xf8, 0xf0,
0x00, 0xf0, 0xf8, 0x18, 0x18, 0xf8, 0xf0, 0x00, 0xf0, 0xf8, 0x18, 0x18, 0xf8, 0xf0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x61, 0x61, 0x61, 0xff, 0xff, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x0f, 0x07,
0x00, 0x00, 0x1f, 0x1f, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0x61, 0x61, 0x00,
0x00, 0x00, 0x00, 0x18, 0x18, 0x19, 0x19, 0x1f, 0x0f, 0x00, 0x0f, 0x1f, 0x18, 0x18, 0x1f, 0x0f,
0x00, 0x0f, 0x1f, 0x18, 0x18, 0x1f, 0x0f, 0x00, 0x0f, 0x1f, 0x18, 0x18, 0x1f, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x3e, 0x3e, 0x06, 0x06, 0x06, 0x06,
0x3e, 0x3e, 0x06, 0x06, 0x06, 0x06, 0x3e, 0x3e, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
oled_write_raw_P(dp3000_logo, sizeof(dp3000_logo));
}

void default_status(void) {
oled_set_cursor(0, 0);
oled_write_P(PSTR("LAYER: "), false);
oled_write_char('0' + get_highest_layer(layer_state), false);

led_t led_state = host_keyboard_led_state();
oled_set_cursor(0, 1);
oled_write_P(PSTR("LOCK: "), false);
led_t led_state = host_keyboard_led_state();
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);
}

bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
if (timer_elapsed32(logo_timer) > LOGO_TIMEOUT) {
display_logo = false;
oled_clear();
logo_timer = timer_read32();
}
if (last_input_activity_elapsed() > CUSTOM_OLED_TIMEOUT) {
oled_off();
}else {
oled_on();
}
if (display_logo) {
dp3000_logo();
} else {
default_status();
}

return false;
}
24 changes: 24 additions & 0 deletions keyboards/dp3000/dp3000.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

#include "quantum.h"

void default_status(void);
void dp3000_logo(void);
bool oled_task_kb(void);
59 changes: 5 additions & 54 deletions keyboards/dp3000/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"manufacturer": "depermana12",
"keyboard_name": "dp3000",
"maintainer": "depermana12",
"diode_direction": "COL2ROW",
"development_board": "promicro",
Expand All @@ -10,7 +9,6 @@
"console": false,
"extrakey": true,
"encoder": true,
"rgb_matrix": true,
"oled": true,
"mousekey": false,
"nkro": false
Expand All @@ -20,64 +18,17 @@
},
"url": "https://github.com/depermana12",
"usb": {
"device_version": "1.0.1",
"vid": "0x4450",
"pid": "0x6470"
"vid": "0x4450"
},
"encoder": {
"rotary": [
{ "pin_a": "B2", "pin_b": "B1"},
{ "pin_a": "F4", "pin_b": "F5"}
{ "pin_a": "B2", "pin_b": "B1" },
{ "pin_a": "F4", "pin_b": "F5" }
]
},
"ws2812": {
"pin": "B5"
},
"rgb_matrix":{
"driver":"WS2812",
"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 }
]
},
"matrix_pins": {
"cols": ["D4", "D7", "B4", "C6"],
"rows": ["F6", "F7", "B3"]
"cols": [ "D4", "D7", "B4", "C6" ],
"rows": [ "F6", "F7", "B3" ]
},
"layouts": {
"LAYOUT": {
Expand Down
13 changes: 8 additions & 5 deletions keyboards/dp3000/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@
![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.

* Rev. 1 Support RGB matrix
* Rev. 2 Support RGB light (underglow)
* Keyboard Maintainer: [Deddia Permana](https://github.com/depermana12)
* Hardware Supported: DP3000 PCB, ATmega32u4
* Hardware Supported: DP3000 PCB rev1 and rev2, 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
make dp3000/rev1:default
make dp3000/rev2:default

Flashing example for this keyboard:

make dp3000:default:flash
make dp3000/rev1:default:flash
make dp3000/rev2: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
* Bootmagic reset: Hold down the key at (0,0) in the matrix (left rotary encoder push switch) 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
59 changes: 59 additions & 0 deletions keyboards/dp3000/rev1/info.json
drashna marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"keyboard_name": "dp3000",
"features": {
"rgb_matrix": true
},
"usb": {
"device_version": "1.0.1",
"pid": "0x6470"
},
"rgb_matrix": {
"animations": {
"alphas_mods": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"rainbow_moving_chevron": true,
"raindrops": true,
"solid_color": true,
"solid_reactive": true,
"solid_reactive_multinexus": true,
"solid_reactive_simple": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
},
"driver": "WS2812",
drashna marked this conversation as resolved.
Show resolved Hide resolved
"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}
],
"max_brightness": 180,
"sat_steps": 8,
"speed_steps": 10,
"val_steps": 8
},
"ws2812": {
"pin": "B5"
}
}
1 change: 1 addition & 0 deletions keyboards/dp3000/rev1/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file intentionally left blank
31 changes: 31 additions & 0 deletions keyboards/dp3000/rev2/info.json
drashna marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"keyboard_name": "dp3000 rev2",
"features": {
"rgblight": true
},
"usb": {
"device_version": "2.0.0",
"pid": "0x3132"
},
"rgblight": {
"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
},
"led_count": 4,
"max_brightness": 180,
"saturation_steps": 8,
"sleep": true
},
"ws2812": {
"pin": "B6"
}
}
1 change: 1 addition & 0 deletions keyboards/dp3000/rev2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file intentionally left blank
2 changes: 1 addition & 1 deletion keyboards/dp3000/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# This file intentionally left blank
DEFAULT_FOLDER = dp3000/rev1