Skip to content

Commit

Permalink
[Keyboard] IDOBAO ID80v3 code rewrite and include factory keymap (#17234
Browse files Browse the repository at this point in the history
)
  • Loading branch information
silvinor authored Jul 2, 2022
1 parent 7a8a4b1 commit 4aca94d
Show file tree
Hide file tree
Showing 19 changed files with 790 additions and 449 deletions.
76 changes: 76 additions & 0 deletions keyboards/idobao/id80/v3/ansi/ansi.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Copyright 2022 Vino Rodrigues (@vinorodrigues)
// SPDX-License-Identifier: GPL-2.0-or-later

#include "ansi.h"

#define __ NO_LED

#ifdef RGB_MATRIX_ENABLE

/* Per-key LED's
* ┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐┌───┐
* │79 ││78 │77 │76 │75 ││74 │73 │72 │71 ││70 │69 │68 │67 ││66 ││65 │
* ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤
* │64 │63 │62 │61 │60 │59 │58 │57 │56 │55 │54 │53 │52 │ 51 ││50 │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤
* │ 49 │48 │47 │46 │45 │44 │43 │42 │41 │40 │39 │38 │37 │ 36 ││35 │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘
* │ 34 │33 │32 │31 │30 │29 │28 │27 │26 │25 │24 │23 │ 22 │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘
* │ 21 │20 │19 │18 │17 │16 │15 │14 │13 │12 │11 │ 10 │┌───┐
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ 9 │
* │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │┌───┼───┼───┐
* └────┴────┴────┴────────────────────────┴─────┴─────┘│ 2 │ 1 │ 0 │
* └───┴───┴───┘
* Underglow (as seen from top)
* ┌────┬────┬────┬────┬────┬────┐
* │ 80 │ 81 │ 82 │ 83 │ 84 │ 85 │
* ├────┼────┴────┴────┴────┼────┤
* │ 93 │ │ 86 │
* ├────┼────┬────┬────┬────┼────┤
* │ 92 │ 91 │ 90 │ 89 │ 88 │ 87 │
* └────┴────┴────┴────┴────┴────┘
*/

led_config_t g_led_config = { {
// Key Matrix to LED Index
/* Generated with: https://xelus.netlify.app/guides/KLE_to_RGB_parser */
{ 8, 21, 34, 49, 64, 79, __, __, __, __, __ },
{ 7, __, 33, 48, 63, 78, __, __, __, __, __ },
{ 6, 20, 32, 47, 62, 77, __, __, 35, 50, 65 },
{ 0, 19, 31, 46, 61, 76, 9, __, 36, __, 67 },
{ 1, 18, 30, 45, 60, 75, 10, 22, 37, 52, 68 },
{ 2, 17, 29, 44, 59, 74, 11, 23, 38, 53, 69 },
{ 5, 16, 28, 43, 58, 73, __, __, __, 51, 66 },
{ 3, 15, 27, 42, 57, 72, 12, 24, 39, 54, 70 },
{ 4, 14, 26, 41, 56, 71, 13, 25, 40, 55, __ },
}, {
/* NB: Reversed order */
// per-key
{224,64 }, {209,64 }, {195,64 }, {173,61 }, {151,61 }, { 94,61 }, { 39,61 }, { 20,61 }, { 2,61 },
{209,52 }, {185,49 }, {165,49 }, {151,49 }, {136,49 }, {121,49 }, {106,49 }, { 92,49 }, { 77,49 }, { 62,49 }, { 48,49 }, { 33,49 }, { 9,49 },
{196,38 }, {173,38 }, {158,38 }, {143,38 }, {129,38 }, {114,38 }, { 99,38 }, { 84,38 }, { 70,38 }, { 55,38 }, { 40,38 }, { 26,38 }, { 6,38 },
{224,26 }, {202,26 }, {184,26 }, {169,26 }, {154,26 }, {140,26 }, {125,26 }, {110,26 }, { 95,26 }, { 81,26 }, { 66,26 }, { 51,26 }, { 37,26 }, { 22,26 }, { 4,26 },
{224,15 }, {198,15 }, {176,15 }, {162,15 }, {147,15 }, {132,15 }, {118,15 }, {103,15 }, { 88,15 }, { 73,15 }, { 59,15 }, { 44,15 }, { 29,15 }, { 15,15 }, { 0,15 },
{224,0 }, {206,0 }, {187,0 }, {173,0 }, {158,0 }, {143,0 }, {125,0 }, {110,0 }, { 95,0 }, { 81,0 }, { 62,0 }, { 48,0 }, { 33,0 }, { 18,0 }, { 0,0 },
// underglow
{ 0,0 }, { 45,0 }, { 90,0 }, {134,0 }, {179,0 }, {224,0 },
{224,32 },
{224,64 }, {179,64 }, {134,64 }, { 90,64 }, { 45,64 }, { 0,64 },
{ 0,32 }
}, {
/* NB: Reversed order */
4, 4, 4, 4, 4, 1, 4, 4, 4,
4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
//
2, 2, 2, 2, 2, 2,
2,
2, 2, 2, 2, 2, 2,
2
} };

#endif
6 changes: 6 additions & 0 deletions keyboards/idobao/id80/v3/ansi/ansi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2022 Vino Rodrigues (@vinorodrigues)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "quantum.h"
97 changes: 97 additions & 0 deletions keyboards/idobao/id80/v3/ansi/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright 2022 Vino Rodrigues (@vinorodrigues)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "config_common.h"

/* --------------------------------
* Bootmagic Lite key configuration
* use the Esc key
* -------------------------------- */

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 5

/* ----------------
* RGB Matrix stuff
* ---------------- */

#define RGB_DI_PIN E2

// RGB Matrix config
#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE)

#define DRIVER_LED_TOTAL 94

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255

#define RGB_MATRIX_KEYPRESSES

#define ENABLE_RGB_MATRIX_SOLID_COLOR // Static single color
#define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes
#define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation
#define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right
#define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness
#define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard
#define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard
#define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation
#define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back
#define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left
#define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right

/* don't need `#if`, animation modes themselves check defines
* #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) */
// #define ENABLE_RGB_MATRIX_TYPING_HEATMAP
// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN
/* #endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS */

/* don't need `#if`, animation modes themselves check defines
* #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) */
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
/* #endif // RGB_MATRIX_KEYPRESSES | RGB_MATRIX_KEYRELEASES */
#endif // RGB_MATRIX_ENABLE

/* -----------------------
* Feature disable options
* These options are also useful to firmware size reduction.
* ----------------------- */

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
121 changes: 121 additions & 0 deletions keyboards/idobao/id80/v3/ansi/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"manufacturer": "IDOBAO",
"keyboard_name": "IDOBAO ID80v3",
"maintainer": "vinorodrigues",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"console": false,
"command": false,
"nkro": true,
"backlight": false,
"rgblight": false
},
"matrix_pins": {
"cols": ["B7", "B3", "B2", "B1", "B0", "E6", "F1", "F4", "F5", "F6", "F7"],
"rows": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"]
},
"processor": "atmega32u4",
"url": "https://idobao.net/search?type=product&q=id80*",
"usb": {
"vid": "0x6964",
"pid": "0x0380",
"device_version": "3.0.0"
},
"layouts": {
"LAYOUT_80_ansi": {
"layout": [
{ "matrix": [0, 5], "x": 0, "y": 0 },
{ "matrix": [1, 5], "x": 1.25, "y": 0 },
{ "matrix": [2, 5], "x": 2.25, "y": 0 },
{ "matrix": [3, 5], "x": 3.25, "y": 0 },
{ "matrix": [4, 5], "x": 4.25, "y": 0 },
{ "matrix": [5, 5], "x": 5.5, "y": 0 },
{ "matrix": [6, 5], "x": 6.5, "y": 0 },
{ "matrix": [7, 5], "x": 7.5, "y": 0 },
{ "matrix": [8, 5], "x": 8.5, "y": 0 },
{ "matrix": [7, 10], "x": 9.75, "y": 0 },
{ "matrix": [5, 10], "x": 10.75, "y": 0 },
{ "matrix": [4, 10], "x": 11.75, "y": 0 },
{ "matrix": [3, 10], "x": 12.75, "y": 0 },
{ "matrix": [6, 10], "x": 14, "y": 0 },
{ "matrix": [2, 10], "x": 15.25, "y": 0 },

{ "matrix": [0, 4], "x": 0, "y": 1.25 },
{ "matrix": [1, 4], "x": 1, "y": 1.25 },
{ "matrix": [2, 4], "x": 2, "y": 1.25 },
{ "matrix": [3, 4], "x": 3, "y": 1.25 },
{ "matrix": [4, 4], "x": 4, "y": 1.25 },
{ "matrix": [5, 4], "x": 5, "y": 1.25 },
{ "matrix": [6, 4], "x": 6, "y": 1.25 },
{ "matrix": [7, 4], "x": 7, "y": 1.25 },
{ "matrix": [8, 4], "x": 8, "y": 1.25 },
{ "matrix": [8, 9], "x": 9, "y": 1.25 },
{ "matrix": [7, 9], "x": 10, "y": 1.25 },
{ "matrix": [5, 9], "x": 11, "y": 1.25 },
{ "matrix": [4, 9], "x": 12, "y": 1.25 },
{ "matrix": [6, 9], "x": 13, "y": 1.25, "w": 2 },
{ "matrix": [2, 9], "x": 15.25, "y": 1.25 },

{ "matrix": [0, 3], "x":0, "y":2.25, "w":1.5},
{ "matrix": [1, 3], "x":1.5, "y":2.25},
{ "matrix": [2, 3], "x":2.5, "y":2.25},
{ "matrix": [3, 3], "x":3.5, "y":2.25},
{ "matrix": [4, 3], "x":4.5, "y":2.25},
{ "matrix": [5, 3], "x":5.5, "y":2.25},
{ "matrix": [6, 3], "x":6.5, "y":2.25},
{ "matrix": [7, 3], "x":7.5, "y":2.25},
{ "matrix": [8, 3], "x":8.5, "y":2.25},
{ "matrix": [8, 8], "x":9.5, "y":2.25},
{ "matrix": [7, 8], "x":10.5, "y":2.25},
{ "matrix": [5, 8], "x":11.5, "y":2.25},
{ "matrix": [4, 8], "x":12.5, "y":2.25},
{ "matrix": [3, 8], "x":13.5, "y":2.25, "w":1.5},
{ "matrix": [2, 8], "x":15.25, "y":2.25},

{ "matrix": [0, 2], "x":0, "y":3.25, "w":1.75},
{ "matrix": [1, 2], "x":1.75, "y":3.25},
{ "matrix": [2, 2], "x":2.75, "y":3.25},
{ "matrix": [3, 2], "x":3.75, "y":3.25},
{ "matrix": [4, 2], "x":4.75, "y":3.25},
{ "matrix": [5, 2], "x":5.75, "y":3.25},
{ "matrix": [6, 2], "x":6.75, "y":3.25},
{ "matrix": [7, 2], "x":7.75, "y":3.25},
{ "matrix": [8, 2], "x":8.75, "y":3.25},
{ "matrix": [8, 7], "x":9.75, "y":3.25},
{ "matrix": [7, 7], "x":10.75, "y":3.25},
{ "matrix": [5, 7], "x":11.75, "y":3.25},
{ "matrix": [4, 7], "x":12.75, "y":3.25, "w":2.25},

{ "matrix": [0, 1], "x":0, "y":4.25, "w":2.25},
{ "matrix": [2, 1], "x":2.25, "y":4.25},
{ "matrix": [3, 1], "x":3.25, "y":4.25},
{ "matrix": [4, 1], "x":4.25, "y":4.25},
{ "matrix": [5, 1], "x":5.25, "y":4.25},
{ "matrix": [6, 1], "x":6.25, "y":4.25},
{ "matrix": [7, 1], "x":7.25, "y":4.25},
{ "matrix": [8, 1], "x":8.25, "y":4.25},
{ "matrix": [8, 6], "x":9.25, "y":4.25},
{ "matrix": [7, 6], "x":10.25, "y":4.25},
{ "matrix": [5, 6], "x":11.25, "y":4.25},
{ "matrix": [4, 6], "x":12.25, "y":4.25, "w":1.75},

{ "matrix": [3, 6], "x":14.25, "y":4.5},

{ "matrix": [0, 0], "x":0, "y":5.25, "w":1.25},
{ "matrix": [1, 0], "x":1.25, "y":5.25, "w":1.25},
{ "matrix": [2, 0], "x":2.5, "y":5.25, "w":1.25},
{ "matrix": [6, 0], "y":5.25, "w":6.25},
{ "matrix": [8, 0], "x":10, "y":5.25, "w":1.5},
{ "matrix": [7, 0], "x":11.5, "y":5.25, "w":1.5},

{ "matrix": [5, 0], "x":13.25, "y":5.5},
{ "matrix": [4, 0], "x":14.25, "y":5.5},
{ "matrix": [3, 0], "x":15.25, "y":5.5}
]
}
}
}
Loading

0 comments on commit 4aca94d

Please sign in to comment.