Skip to content

Commit

Permalink
add Eureka75 and hotdox76_V2
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaxin96 committed Aug 15, 2021
1 parent d9ab3ed commit 8fea4d1
Show file tree
Hide file tree
Showing 39 changed files with 2,738 additions and 157 deletions.
1 change: 1 addition & 0 deletions keyboards/bastardkb/scylla/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
SPLIT_KEYBOARD = yes

8 changes: 8 additions & 0 deletions keyboards/kmac/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ SRC += matrix.c

# Supported layouts
LAYOUTS = tkl_ansi








52 changes: 52 additions & 0 deletions keyboards/yandrstudio/Eureka75/Eureka75.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* 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/>.
*/
#include QMK_KEYBOARD_H


#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}
},
{
// LED Index to Physical Position
{0,0}
},
{
// LED Index to Flag
4
}
};


#endif

#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
}

void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
#endif
34 changes: 34 additions & 0 deletions keyboards/yandrstudio/Eureka75/Eureka75.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Copyright 2020 zvecr <[email protected]>
*
* 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( \
K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K413, \
K500, K501, K502, K503, K504, K505, K509, K510, K511, K512, K513, K514 \
) { \
{ K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, K412, K413, KC_NO }, \
{ K500, K501, K502, K503, K504, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514 } \
}
44 changes: 44 additions & 0 deletions keyboards/yandrstudio/Eureka75/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* 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 0xAAAA
#define DEVICE_VER 0x0001
#define MANUFACTURER JasonRen biu
#define PRODUCT Eureka75

// 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 DEBUG_MATRIX_SCAN_RATE

#define USB_POLLING_INTERVAL_MS 1
#define QMK_KEYS_PER_SCAN 4

#define TAP_CODE_DELAY 15
25 changes: 25 additions & 0 deletions keyboards/yandrstudio/Eureka75/f401/board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2020 Nick Brassel (tzarc)
*
* 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 3 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 <https://www.gnu.org/licenses/>.
*/
#pragma once

#include_next "board.h"


#undef STM32_HSECLK
#define STM32_HSECLK 16000000


#define BOARD_YANDR_BIU_F401
36 changes: 36 additions & 0 deletions keyboards/yandrstudio/Eureka75/f401/chconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright 2020 QMK
*
* 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 CH_CFG_ST_FREQUENCY 10000

#define CH_CFG_ST_RESOLUTION 16

#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE

#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE

#define CH_CFG_FACTORY_SEMAPHORES TRUE

#define CH_CFG_FACTORY_MAILBOXES TRUE

#define CH_CFG_FACTORY_OBJ_FIFOS TRUE

#define CH_CFG_FACTORY_PIPES TRUE

#include_next <chconf.h>

89 changes: 89 additions & 0 deletions keyboards/yandrstudio/Eureka75/f401/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/* 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"

/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 15

// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
#define MATRIX_COL_PINS { A13, A14, A15, A0, A1, A2, A3, B12, B13, B14, B15, B4, A8, A9, A10}
#define MATRIX_ROW_PINS { A5, A6, A7, B0, B4, B1}

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL


/* RGN Matrix */
#ifdef RGB_MATRIX_ENABLE

# define RGB_DI_PIN B5
# define RGBLED_NUM 1
# define DRIVER_LED_TOTAL RGBLED_NUM


#define WS2812_PWM_DRIVER PWMD3 // default: PWMD2
#define WS2812_PWM_CHANNEL 2 // default: 2
#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.


# 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 RGB_DI_PIN B5
# define RGBLED_NUM 1
# define DRIVER_LED_TOTAL RGBLED_NUM
# define RGBLIGHT_LIMIT_VAL 150
# define RGBLIGHT_SLEEP

#define WS2812_PWM_DRIVER PWMD3 // default: PWMD2
#define WS2812_PWM_CHANNEL 2 // default: 2
#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.



// # define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB

#endif



#ifdef ENCODER_ENABLE

#define ENCODERS_PAD_A { B7 }
#define ENCODERS_PAD_B { B6 }

#define ENCODER_RESOLUTIONS { 4 }

#endif
Loading

0 comments on commit 8fea4d1

Please sign in to comment.