Skip to content

Commit

Permalink
add r65ble-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaxin96 committed May 22, 2021
1 parent 02028fb commit 374885b
Show file tree
Hide file tree
Showing 49 changed files with 5,647 additions and 4 deletions.
109 changes: 109 additions & 0 deletions keyboards/yandrstudio/r65ble/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/*
Copyright 2012 Jun Wako <[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:https://www.gnu.org/licenses/>.
*/

#ifndef CONFIG_H
#define CONFIG_H

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xAA96
#define PRODUCT_ID 0xAA03
#define DEVICE_VER 0x0001
#define RAW_USAGE_PAGE 0xFF60
#define MANUFACTURER YandR studio and Magic Mvp
#define PRODUCT r65ble

/* key matrix set */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15

#define MATRIX_ROW_PINS { B5, B4, A3, A2, B9 }
#define MATRIX_COL_PINS { A10, A9, A8, B14, B13, B12, B11, B10, B1, B0, A7, A6, A5, A4, B8 }


#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5



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

// fix VIA RGB_light
#define VIA_HAS_BROKEN_KEYCODES




#ifdef RGBLIGHT_ENABLE
# define RGB_DI_PIN B15
# define RGBLED_NUM 68
# define RGBLIGHT_ANIMATIONS
#endif // RGBLIGHT_ENABLE




/* RGN Matrix */
#ifdef RGB_MATRIX_ENABLE

# define RGB_DI_PIN B15
# define RGBLED_NUM 68
# define DRIVER_LED_TOTAL RGBLED_NUM
#define WS2812_SPI SPID2 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5

# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180
# define RGBLIGHT_VAL_STEP 18
# define RGB_DISABLE_WHEN_USB_SUSPENDED true
# define RGB_MATRIX_CENTER { 32, 96 }
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS

#endif

/* Encoder */
#ifdef ENCODER_ENABLE
# define ENCODERS_PAD_A { A15 }
# define ENCODERS_PAD_B { B3 }
# define ENCODER_RESOLUTION 4
//# define ENCODER_DIRECTION_FLIP
#endif

/* MOUSEKEY */
#ifdef MOUSEKEY_ENABLE
# define MOUSEKEY_DELAY 0
# define MOUSEKEY_INTERVAL 17
# define MK_3_SPEED
# define MK_MOMENTARY_ACCEL
# define MK_C_OFFSET_UNMOD 64
# define MK_C_INTERVAL_UNMOD 17
#endif



/* Others */
#define TAP_HOLD_CAPS_DELAY 20

#ifdef CONSOLE_ENABLE
# define DEBUG_MATRIX_SCAN_RATE
#endif

#endif


33 changes: 33 additions & 0 deletions keyboards/yandrstudio/r65ble/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* 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:https://www.gnu.org/licenses/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/cannonkeys/an_c/halconf.h -r platforms/chibios/common/configs/halconf.h`
*/

#pragma once

#include_next <halconf.h>

#undef HAL_USE_SERIAL
#define HAL_USE_SERIAL TRUE

#undef HAL_USE_I2C
#define HAL_USE_I2C TRUE

#undef HAL_USE_SPI
#define HAL_USE_SPI TRUE
157 changes: 157 additions & 0 deletions keyboards/yandrstudio/r65ble/info-via.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"name": "R65BLE_Y&R",
"vendorId": "0xAA96",
"productId": "0xAA03",
"lighting": {
"extends": "none",
"keycodes": "qmk"
},
"matrix": { "rows": 5, "cols": 15 },
"layouts": {
"keymap": [
{
"name": "via"
},
[
"0,0",
"0,1",
"0,2",
"0,3",
"0,4",
"0,5",
"0,6",
"0,7",
"0,8",
"0,9",
"0,10",
"0,11",
"0,12",
{
"w": 2
},
"0,13",
{
"x": 1
},
"0,14"
],
[
{
"y": -0.75,
"x": 15.25,
"w": 0.75,
"h": 0.75
},
"4,3",
{
"x": 1,
"w": 0.75,
"h": 0.75
},
"4,4"
],
[
{
"y": -0.25,
"w": 1.5
},
"1,0",
"1,1",
"1,2",
"1,3",
"1,4",
"1,5",
"1,6",
"1,7",
"1,8",
"1,9",
"1,10",
"1,11",
"1,12",
{
"w": 1.5
},
"1,13"
],
[
{
"w": 1.75
},
"2,0",
"2,1",
"2,2",
"2,3",
"2,4",
"2,5",
"2,6",
"2,7",
"2,8",
"2,9",
"2,10",
"2,11",
{
"w": 2.25
},
"2,12"
],
[
{
"w": 2.25
},
"3,0",
"3,1",
"3,2",
"3,3",
"3,4",
"3,5",
"3,6",
"3,7",
"3,8",
"3,9",
"3,10",
{
"w": 1.75
},
"3,11"
],
[
{
"y": -0.75,
"x": 14.25
},
"3,12"
],
[
{
"y": -0.25,
"w": 1.25
},
"4,0",
{
"w": 1.25
},
"4,1",
{
"w": 1.25
},
"4,2",
{
"w": 6.25
},
"4,5",
"4,8",
"4,9",
"4,10"
],
[
{
"y": -0.75,
"x": 13.25
},
"4,11",
"4,12",
"4,13"
]
]
}
}
12 changes: 12 additions & 0 deletions keyboards/yandrstudio/r65ble/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"keyboard_name": "rainbow65",
"url": "https://github.com/Oh-My-Mechanical-Keyboard",
"maintainer": "jiaxin96",
"width": 16.25,
"height": 5.25,
"layouts": {
"LAYOUT": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}]
}
}
}
Loading

0 comments on commit 374885b

Please sign in to comment.