[Keyboard] add rartlice (#10495)

* Create bootloader_defs.h

* Create chconf.h

* Create config.h

* Create halconf.h

* Create info.json

* Create mcuconf.h

* Create rartlice.c

* Create rartlice.h

* Create readme.md

* Update readme.md

* Create rules.mk

* Create keymap.c

* Update config.h

* Update rules.mk

* Update config.h

* Update keymap.c

* Update rules.mk

* Delete bootloader_defs.h

* Update rules.mk
This commit is contained in:
Alabahuy
2020-10-19 03:41:53 +07:00
committed by GitHub
parent 8456625655
commit e468380be6
10 changed files with 1755 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
/*
Copyright 2020 Alabahuy
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
/* USB Device descriptor parameter */
#define VENDOR_ID 0x414C
#define PRODUCT_ID 0x0065
#define DEVICE_VER 0x0001
#define MANUFACTURER Alabahuy
#define PRODUCT Rartlice
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
#define MATRIX_COL_PINS { B12, B8, B5, B4, B3, B11, B10, B1, B0, A7, A6, A5, A3, A4, A1 }
#define MATRIX_ROW_PINS { B13, A15, B9, A2, A0 }
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
#define RGB_DI_PIN B15
#define RGBLED_NUM 11
#define WS2812_SPI SPID2
/*
* 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
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,84 @@
{
"keyboard_name": "Rartlice",
"url": "",
"maintainer": "Alabahuy",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT_all": {
"layout": [
{"label" : " ", "x":0, "y":0},
{"label" : "Esc", "x":1.25, "y":0},
{"label" : "1", "x":2.25, "y":0},
{"label" : "2", "x":3.25, "y":0},
{"label" : "3", "x":4.25, "y":0},
{"label" : "4", "x":5.25, "y":0},
{"label" : "5", "x":6.25, "y":0},
{"label" : "6", "x":7.25, "y":0},
{"label" : "7", "x":9.25, "y":0},
{"label" : "8", "x":10.25, "y":0},
{"label" : "9", "x":11.25, "y":0},
{"label" : "0", "x":12.25, "y":0},
{"label" : "-", "x":13.25, "y":0},
{"label" : "=", "x":14.25, "y":0},
{"label" : "|", "x":15.25, "y":0},
{"label" : "Delete", "x":16.25, "y":0},
{"label" : " ", "x":0, "y":1},
{"label" : "Tab", "x":1.25, "y":1, "w":1.5},
{"label" : "Q", "x":2.75, "y":1},
{"label" : "W", "x":3.75, "y":1},
{"label" : "E", "x":4.75, "y":1},
{"label" : "R", "x":5.75, "y":1},
{"label" : "T", "x":6.75, "y":1},
{"label" : "Y", "x":8.75, "y":1},
{"label" : "U", "x":9.75, "y":1},
{"label" : "I", "x":10.75, "y":1},
{"label" : "O", "x":11.75, "y":1},
{"label" : "P", "x":12.75, "y":1},
{"label" : "[", "x":13.75, "y":1},
{"label" : "]", "x":14.75, "y":1},
{"label" : "|", "x":15.75, "y":1, "w":1.5},
{"label" : " ", "x":0, "y":2},
{"label" : "Caps lock", "x":1.25, "y":2, "w":1.75},
{"label" : "A", "x":3, "y":2},
{"label" : "S", "x":4, "y":2},
{"label" : "D", "x":5, "y":2},
{"label" : "F", "x":6, "y":2},
{"label" : "G", "x":8, "y":2},
{"label" : "H", "x":9, "y":2},
{"label" : "J", "x":10, "y":2},
{"label" : "K", "x":11, "y":2},
{"label" : "L", "x":12, "y":2},
{"label" : ";", "x":13, "y":2},
{"label" : "'", "x":14, "y":2},
{"label" : "Enter", "x":15, "y":2, "w":2.25},
{"label" : "Shift", "x":1.25, "y":3, "w":2.25},
{"label" : "Z", "x":3.5, "y":3},
{"label" : "X", "x":4.5, "y":3},
{"label" : "C", "x":5.5, "y":3},
{"label" : "V", "x":6.5, "y":3},
{"label" : "B", "x":7.5, "y":3},
{"label" : "N", "x":9.5, "y":3},
{"label" : "M", "x":10.5, "y":3},
{"label" : ",", "x":11.5, "y":3},
{"label" : ".", "x":12.5, "y":3},
{"label" : "/", "x":13.5, "y":3},
{"label" : "Shift", "x":14.5, "y":3, "w":1.75},
{"label" : "Up", "x":16.5, "y":3.25},
{"label" : "Ctrl", "x":1.25, "y":4, "w":1.25},
{"label" : "Alt", "x":4.25, "y":4, "w":1.25},
{"label" : "Space", "x":5.5, "y":4, "w":2},
{"label" : "Fn", "x":7.5, "y":4},
{"label" : "Space", "x":9.5, "y":4, "w":2.75},
{"label" : "Ctrl", "x":12.25, "y":4, "w":1.5},
{"label" : "Left", "x":15.5, "y":4.25 },
{"label" : "Down", "x":16.5, "y":4.25 },
{"label" : "Right", "x":17.5, "y":4.25 }
]
}
}
}

View File

@ -0,0 +1,60 @@
/*
Copyright 2020 Alabahuy
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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_GESC, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_DEL,
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_all(
KC_NLCK, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
KC_SLCK, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______,
_______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
#ifdef OLED_DRIVER_ENABLE
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("R A R T L I C E\nLayer: "), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("Default\n"), false);
break;
case 1:
oled_write_P(PSTR("FN\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined\n"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
#endif

View File

@ -0,0 +1,206 @@
/*
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef _MCUCONF_H_
#define _MCUCONF_H_
#define STM32F103_MCUCONF
/*
* STM32F103 drivers configuration.
* The following settings override the default settings present in
* the various device driver implementation headers.
* Note that the settings for each driver only have effect if the whole
* driver is enabled in halconf.h.
*
* IRQ priorities:
* 15...0 Lowest...Highest.
*
* DMA priorities:
* 0...3 Lowest...Highest.
*/
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
#define STM32_PLLMUL_VALUE 9
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2
#define STM32_ADCPRE STM32_ADCPRE_DIV4
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
#define STM32_RTCSEL STM32_RTCSEL_HSEDIV
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
/*
* ADC driver system settings.
*/
#define STM32_ADC_USE_ADC1 FALSE
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_ADC1_IRQ_PRIORITY 6
/*
* CAN driver system settings.
*/
#define STM32_CAN_USE_CAN1 FALSE
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM4 FALSE
#define STM32_GPT_USE_TIM5 FALSE
#define STM32_GPT_USE_TIM8 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
/*
* I2C driver system settings.
*/
#define STM32_I2C_USE_I2C1 TRUE
#define STM32_I2C_USE_I2C2 FALSE
#define STM32_I2C_BUSY_TIMEOUT 50
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
#define STM32_I2C_I2C1_DMA_PRIORITY 3
#define STM32_I2C_I2C2_DMA_PRIORITY 3
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 FALSE
#define STM32_ICU_USE_TIM2 FALSE
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
#define STM32_ICU_TIM5_IRQ_PRIORITY 7
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 TRUE
#define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM5 FALSE
#define STM32_PWM_USE_TIM8 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
* RTC driver system settings.
*/
#define STM32_RTC_IRQ_PRIORITY 15
/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12
#define STM32_SERIAL_UART4_PRIORITY 12
#define STM32_SERIAL_UART5_PRIORITY 12
/*
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 FALSE
#define STM32_SPI_USE_SPI2 TRUE
#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI3_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
/*
* ST driver system settings.
*/
#define STM32_ST_IRQ_PRIORITY 8
#define STM32_ST_USE_TIMER 2
/*
* UART driver system settings.
*/
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 FALSE
#define STM32_UART_USART1_IRQ_PRIORITY 12
#define STM32_UART_USART2_IRQ_PRIORITY 12
#define STM32_UART_USART3_IRQ_PRIORITY 12
#define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_USART3_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
/*
* USB driver system settings.
*/
#define STM32_USB_USE_USB1 TRUE
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
#endif /* _MCUCONF_H_ */

View File

@ -0,0 +1,36 @@
/* Copyright 2020 Alabahuy
* 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 "rartlice.h"
void keyboard_pre_init_kb(void) {
led_init_ports();
keyboard_pre_init_user();
}
void led_init_ports(void) {
setPinOutput(A8);
setPinOutput(B14);
setPinOutput(A9);
}
bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
writePin(A8, !led_state.num_lock);
writePin(B14, !led_state.caps_lock);
writePin(A9, !led_state.scroll_lock);
}
return true;
}

View File

@ -0,0 +1,27 @@
#pragma once
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_all( \
K00, K01, K02, K03, K04, K14, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
K10, K11, K12, K13, K24, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K34, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
K31, K32, K33, K44, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, \
K41, K43, K45, K46, K48, K4A, K4C, K4D, K4E \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
{ KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \
{ KC_NO, K41, KC_NO, K43, K44, K45, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, K4E }, \
}

View File

@ -0,0 +1,15 @@
# Rartlice
![TOP](https://user-images.githubusercontent.com/30220306/94159843-3a0e4600-feae-11ea-94e0-7babe43f83a4.png)
A 65% Ergo Layout Mechanical Keyboard with Blue Pill STM32F103C8T6-based inspired by TGR Alice, Arisu and Cannon keys Practice60 based on [IMKG](https://www.facebook.com/groups/indomechanicalkeyboard/) (Indonesia Mechanical Keyboard Group)
* Keyboard Maintainer: [Alabahuy](https://github.com/alabahuy)
* Hardware Supported: RARTLICE PCB, Mini USB, Blue Pill STM32F103C8T6, RGB underglow
* Hardware Availability: Private GB
Make example for this keyboard (after setting up your build environment):
make rart/rartlice:default
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).

View File

@ -0,0 +1,27 @@
# MCU name
MCU = STM32F103
# Bootloader selection
BOOTLOADER = stm32duino
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
WS2812_DRIVER = spi
OLED_DRIVER_ENABLE = yes
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE