Skip to content

Commit

Permalink
add hotdox76 v2 kb (prelim)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaxin96 committed Aug 8, 2021
1 parent b4e8c50 commit d9ab3ed
Show file tree
Hide file tree
Showing 19 changed files with 1,088 additions and 8 deletions.
6 changes: 3 additions & 3 deletions keyboards/yandrstudio/boy40ble/readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
m60ble
boy40ble
===

A 61 keys keyboard with rgb (keys and underground) and bluetooth 5.x.
A 40% keyboard with rgb (underground) and bluetooth 5.x.
This keyboard use 8mhz HSE and STM32F401 as MCU.

Keyboard Maintainer: https://github.com/jiaxin96
Hardware Supported: yp980ble
Hardware Supported: boy40ble
Hardware Availability: https://github.com/Oh-My-Mechanical-Keyboard

Make example for this keyboard (after setting up your build environment):
Expand Down
125 changes: 125 additions & 0 deletions keyboards/yandrstudio/hotdox76_V2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/* Copyright 2021 JasonRen(biu)
*
* 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

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xAA96
#define PRODUCT_ID 0xAAA9
#define DEVICE_VER 0x0002
#define MANUFACTURER JasonRen biu
#define PRODUCT hotdox76_V2

/* key matrix size */
#define MATRIX_ROWS 6*2
#define MATRIX_COLS 7

/* key matrix pins */
#define MATRIX_ROW_PINS { D6, D7, B4, B5, B6, C6 }
#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, E6 }
#define MATRIX_ROW_PINS_RIGHT { D6, D7, B4, B5, B6, C6 }
#define MATRIX_COL_PINS_RIGHT { F7, F6, F5, F4, F1, F0, E6 }

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW



// enable the nkro when using the VIA.
#define FORCE_NKRO

// fix VIA RGB_light
#define VIA_HAS_BROKEN_KEYCODES

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5


#define USB_POLLING_INTERVAL_MS 1
#define QMK_KEYS_PER_SCAN 4

#define TAP_CODE_DELAY 15


/* RGN Matrix */
#ifdef RGB_MATRIX_ENABLE

# define RGB_MATRIX_SPLIT {38, 38}
# define SPLIT_TRANSPORT_MIRROR

# define RGB_DI_PIN D3
# define RGBLED_NUM (38*2)
# define DRIVER_LED_TOTAL RGBLED_NUM

# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
# define RGBLIGHT_VAL_STEP 15
# define RGB_DISABLE_WHEN_USB_SUSPENDED true
# define RGB_MATRIX_CENTER { 32, 96 }

# define RGB_MATRIX_KEYPRESSES

# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGBLIGHT_ANIMATIONS

// # define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB
#endif


#ifdef RGBLIGHT_ENABLE

# define RGBLIGHT_SPLIT
# define RGBLED_SPLIT {38, 38}

# define RGB_DI_PIN D3
# define RGBLED_NUM (38*2)
# define DRIVER_LED_TOTAL RGBLED_NUM
# define RGBLIGHT_LIMIT_VAL 150
# define RGBLIGHT_SLEEP

// # define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB

#endif

#ifdef SPLIT_KEYBOARD

# define MASTER_LEFT

# define SOFT_SERIAL_PIN D2

# define SPLIT_MODS_ENABLE

# define SPLIT_USB_DETECT

#endif


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

/* disable action features */
#define NO_ACTION_LAYER
#define NO_ACTION_TAPPING
#define NO_ACTION_ONESHOT

/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
108 changes: 108 additions & 0 deletions keyboards/yandrstudio/hotdox76_V2/hotdox76_V2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#include QMK_KEYBOARD_H

#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
{ NO_LED, 34, 33, 32, 35, 37, 36 },
{ 27, 28, 29, 30, 31, NO_LED, NO_LED },
{ 26, 25, 24, 23, 22, 21, 20 },
{ 14, 15, 16, 17, 18, 19, NO_LED },
{ 13, 12, 11, 10, 9, 8, 7 },
{ 0, 1, 2, 3, 4, 5, 6 },
/*right*/
{ NO_LED, 72, 71, 70, 73, 75, 74 },
{ 65, 66, 67, 68, 69, NO_LED, NO_LED },
{ 64, 63, 62, 61, 60, 59, 58 },
{ 52, 53, 54, 55, 56, 57, NO_LED },
{ 51, 50, 49, 48, 47, 46, 45 },
{ 38, 39, 40, 41, 42, 43, 44 }
},
{
// LED Index to Physical Position
{0,0}, {17,0}, {34,0}, {52,0}, {69,0}, {86,0}, {103,0}, \
{103,13}, {86,13}, {69,13}, {52,13}, {34,13}, {17,13}, {0,13}, \
{0,26}, {17,26}, {34,26}, {52,26}, {69,26}, {86,26}, \
{103,38}, {86,38}, {69,38}, {52,38}, {34,38}, {17,38}, {0,38}, \
{0,51}, {17,51}, {34,51}, {52,51}, {69,51}, \
{86,64}, {69,64}, {52,64}, {34,64}, {17,64}, {0,64}, \
\
{224,0}, {207,0}, {190,0}, {172,0}, {155,0}, {138,0}, {121,0}, \
{121,13}, {138,13}, {155,13}, {172,13}, {190,13}, {207,13}, {224,13}, \
{224,26}, {207,26}, {190,26}, {172,26}, {155,26}, {138,26}, \
{121,38}, {138,38}, {155,38}, {172,38}, {190,38}, {207,38}, {224,38}, \
{224,51}, {207,51}, {190,51}, {172,51}, {155,51}, \
{138,64}, {155,64}, {172,64}, {190,64}, {207,64}, {224,64}\

},
{
// LED Index to Flag
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,\
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
}
};


#endif

#ifdef OLED_DRIVER_ENABLE
char wpm_str[10]; // limit WPM string length.

oled_rotation_t oled_init_user(oled_rotation_t rotation) {
// oled_scroll_set_area(0,2);
// oled_scroll_set_speed(4);
// oled_scroll_right();
# ifdef I_AM_LEFT
return OLED_ROTATION_0;
# else
return OLED_ROTATION_180;
# endif
}

void render_logo(void) {

}

void oled_task_user(void) {

# ifdef I_AM_LEFT


switch (biton32(layer_state)) {
case 0:
oled_write_ln("Layer: Base", false);
break;
case 1:
oled_write_ln("Layer: Function", false);
break;
case 2:
oled_write_ln("Layer: System", false);
break;
case 3:
oled_write_ln("Layer: User", false);
break;
default:
oled_write_ln("Layer: Undefine", false);
}
oled_write_P((get_mods() & MOD_MASK_SHIFT) ? "SF>* " : "SF>x ", false);
oled_write_P((get_mods() & MOD_MASK_CTRL) ? "CT>* " : "CT>x ", false);
oled_write_P((get_mods() & MOD_MASK_ALT) ? "AL>* " : "AL>x ", false);
oled_write_ln((get_mods() & MOD_MASK_GUI) ? "GU>*" : "GU>x", false);

# else



# endif
}
#endif


bool is_keyboard_left(void) {

#ifdef I_AM_LEFT
return true;
#else
return false;
#endif

}
53 changes: 53 additions & 0 deletions keyboards/yandrstudio/hotdox76_V2/hotdox76_V2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* Copyright 2021 JasonRen(biu)
*
* 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

#include "quantum.h"

#define LAYOUT( \
L500, L501, L502, L503, L504, L505, L506, \
L400, L401, L402, L403, L404, L405, L406, \
L300, L301, L302, L303, L304, L305, \
L200, L201, L202, L203, L204, L205, L206, \
L100, L101, L102, L103, L104, \
L005, L006, \
L004, \
L003, L002, L001, \
\
R116, R115, R114, R113, R112, R111, R110, \
R106, R105, R104, R103, R102, R101, R100, \
R905, R904, R903, R902, R901, R900, \
R806, R805, R804, R803, R802, R801, R800, \
R705, R704, R703, R701, R700, \
R606, R605, \
R604, \
R601, R602, R603 \
) { \
{ KC_NO, L001, L002, L003, L004, L005, L006 }, \
{ L100, L101, L102, L103, L104, KC_NO, KC_NO }, \
{ L200, L201, L202, L203, L204, L205, L206 }, \
{ L300, L301, L302, L303, L304, L305, KC_NO }, \
{ L400, L401, L402, L403, L404, L405, L406 }, \
{ L500, L501, L502, L503, L504, L505, L506 }, \
\
{ KC_NO, R601, R602, R603, R604, R605, R606 }, \
{ R700, R701, R703, R704, R705, KC_NO, KC_NO }, \
{ R800, R801, R802, R803, R804, R805, R806 }, \
{ R900, R901, R902, R903, R904, R905, KC_NO }, \
{ R100, R101, R102, R103, R104, R105, R106 }, \
{ R110, R111, R112, R113, R114, R115, R116 } \
}

Loading

0 comments on commit d9ab3ed

Please sign in to comment.