mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-05 14:08:39 +00:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
538874f90f | ||
![]() |
8a330b33ff | ||
![]() |
6d0dc910d9 | ||
![]() |
106de349fb | ||
![]() |
59dc31a737 | ||
![]() |
4099536c0e | ||
![]() |
4bb28d2df0 | ||
![]() |
ac4fd5e99e | ||
![]() |
3a0f3a5bd0 | ||
![]() |
da1afe152a | ||
![]() |
fe982caf5d | ||
![]() |
5d47231f2a | ||
![]() |
d5a06aec83 | ||
![]() |
dbc7761688 | ||
![]() |
0db6bb10e0 | ||
![]() |
1fd4546fff | ||
![]() |
064d9e2175 | ||
![]() |
a90331aec2 | ||
![]() |
0b0c98929b | ||
![]() |
75a51659ab | ||
![]() |
5803012eda | ||
![]() |
8c033497c6 |
@@ -225,6 +225,13 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||
OPT_DEFS += -DENCODER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||
SRC += DRV2605L.c
|
||||
SRC += i2c_master.c
|
||||
OPT_DEFS += -DDRV2605L
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||
SRC += drivers/avr/hd44780.c
|
||||
OPT_DEFS += -DHD44780_ENABLE
|
||||
@@ -240,6 +247,8 @@ ifeq ($(strip $(LEADER_ENABLE)), yes)
|
||||
OPT_DEFS += -DLEADER_ENABLE
|
||||
endif
|
||||
|
||||
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
|
4
docs/LANGS.md
Normal file
4
docs/LANGS.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Languages
|
||||
|
||||
* [English](/)
|
||||
* [Chinese](zh/)
|
@@ -211,20 +211,3 @@ here real_mods lost state for 'physical left shift'.
|
||||
|
||||
weak_mods is ORed with real_mods when keyboard report is sent.
|
||||
https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
|
||||
|
||||
## Timer Functionality
|
||||
|
||||
It's possible to start timers and read values for time-specific events - here's an example:
|
||||
|
||||
```c
|
||||
static uint16_t key_timer;
|
||||
key_timer = timer_read();
|
||||
|
||||
if (timer_elapsed(key_timer) < 100) {
|
||||
// do something if less than 100ms have passed
|
||||
} else {
|
||||
// do something if 100ms or more have passed
|
||||
}
|
||||
```
|
||||
|
||||
It's best to declare the `static uint16_t key_timer;` at the top of the file, outside of any code blocks you're using it in.
|
||||
|
@@ -65,6 +65,13 @@ The available keycodes for audio are:
|
||||
* `AU_OFF` - Turn audio mode off
|
||||
* `AU_TOG` - Toggle audio mode
|
||||
|
||||
## ARM Audio Volume
|
||||
|
||||
For ARM devices, you can adjust the DAC sample values. If your board is too loud for you or your coworkers, you can set the max using `DAC_SAMPLE_MAX` in your `config.h`:
|
||||
|
||||
```c
|
||||
#define DAC_SAMPLE_MAX 65535U
|
||||
```
|
||||
|
||||
## Music Mode
|
||||
|
||||
|
@@ -25,7 +25,8 @@
|
||||
placeholder: 'Search Documentation...',
|
||||
noData: 'We could not find any documents matching your search.',
|
||||
depth: 6
|
||||
}
|
||||
},
|
||||
fallbackLanguages: ['zh']
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
|
@@ -96,3 +96,24 @@ And to do so, add `reset_keyboard()` to your function or macro, and this will re
|
||||
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.
|
||||
|
||||
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.
|
||||
|
||||
## Tap random key
|
||||
|
||||
If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`).
|
||||
|
||||
?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords.
|
||||
|
||||
## Software Timers
|
||||
|
||||
It's possible to start timers and read values for time-specific events. Here's an example:
|
||||
|
||||
```c
|
||||
static uint16_t key_timer;
|
||||
key_timer = timer_read();
|
||||
|
||||
if (timer_elapsed(key_timer) < 100) {
|
||||
// do something if less than 100ms have passed
|
||||
} else {
|
||||
// do something if 100ms or more have passed
|
||||
}
|
||||
```
|
||||
|
99
docs/zh/_sidebar.md
Normal file
99
docs/zh/_sidebar.md
Normal file
@@ -0,0 +1,99 @@
|
||||
* [完全指南菜鳥](zh/newbs.md)
|
||||
* [入門](zh/newbs_getting_started.md)
|
||||
* [構建第一個固件](zh/newbs_building_firmware.md)
|
||||
* [刷新固件](zh/newbs_flashing.md)
|
||||
* [測試和調試](zh/newbs_testing_debugging.md)
|
||||
* [最佳實踐](zh/newbs_best_practices.md)
|
||||
* [學習資源](zh/newbs_learn_more_resources.md)
|
||||
|
||||
* [QMK基礎](zh/README.md)
|
||||
* [QMK簡介](zh/getting_started_introduction.md)
|
||||
* [特約QMK](zh/contributing.md)
|
||||
* [如何使用Github上](zh/getting_started_github.md)
|
||||
* [獲得幫助](zh/getting_started_getting_help.md)
|
||||
|
||||
* [常問問題](zh/faq.md)
|
||||
* [常問問題](zh/faq_general.md)
|
||||
* [構建/編譯QMK](zh/faq_build.md)
|
||||
* [調試/故障排除QMK](zh/faq_debug.md)
|
||||
* [鍵盤佈局](zh/faq_keymap.md)
|
||||
|
||||
* 詳細指南
|
||||
* [安裝編譯工具](zh/getting_started_build_tools.md)
|
||||
* [流浪漢指南](zh/getting_started_vagrant.md)
|
||||
* [構建/編譯器指令](zh/getting_started_make_guide.md)
|
||||
* [刷新固件](zh/flashing.md)
|
||||
* [定制功能](zh/custom_quantum_functions.md)
|
||||
* [鍵盤映射概述](zh/keymap.md)
|
||||
|
||||
* [硬件](zh/hardware.md)
|
||||
* [AVR處理器](zh/hardware_avr.md)
|
||||
* [司機](zh/hardware_drivers.md)
|
||||
|
||||
* 參考
|
||||
* [Keyboard Guidelines](zh/hardware_keyboard_guidelines.md)
|
||||
* [Config Options](zh/config_options.md)
|
||||
* [Keycodes](zh/keycodes.md)
|
||||
* [Documentation Best Practices](zh/documentation_best_practices.md)
|
||||
* [Documentation Templates](zh/documentation_templates.md)
|
||||
* [Glossary](zh/reference_glossary.md)
|
||||
* [Unit Testing](zh/unit_testing.md)
|
||||
* [Useful Functions](zh/ref_functions.md)
|
||||
* [Configurator Support](zh/reference_configurator_support.md)
|
||||
|
||||
* [特點](zh/features.md)
|
||||
* [Basic Keycodes](zh/keycodes_basic.md)
|
||||
* [Quantum Keycodes](zh/quantum_keycodes.md)
|
||||
* [Advanced Keycodes](zh/feature_advanced_keycodes.md)
|
||||
* [Audio](zh/feature_audio.md)
|
||||
* [Auto Shift](zh/feature_auto_shift.md)
|
||||
* [Backlight](zh/feature_backlight.md)
|
||||
* [Bluetooth](zh/feature_bluetooth.md)
|
||||
* [Bootmagic](zh/feature_bootmagic.md)
|
||||
* [Combos](zh/feature_combo)
|
||||
* [Command](zh/feature_command.md)
|
||||
* [Dynamic Macros](zh/feature_dynamic_macros.md)
|
||||
* [Encoders](zh/feature_encoders.md)
|
||||
* [Grave Escape](zh/feature_grave_esc.md)
|
||||
* [Key Lock](zh/feature_key_lock.md)
|
||||
* [Layouts](zh/feature_layouts.md)
|
||||
* [Leader Key](zh/feature_leader_key.md)
|
||||
* [Macros](zh/feature_macros.md)
|
||||
* [Mouse Keys](zh/feature_mouse_keys.md)
|
||||
* [One Shot Keys](zh/feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Pointing Device](zh/feature_pointing_device.md)
|
||||
* [PS/2 Mouse](zh/feature_ps2_mouse.md)
|
||||
* [RGB Lighting](zh/feature_rgblight.md)
|
||||
* [RGB Matrix](zh/feature_rgb_matrix.md)
|
||||
* [Space Cadet Shift](zh/feature_space_cadet_shift.md)
|
||||
* [Space Cadet Shift Enter](zh/feature_space_cadet_shift_enter.md)
|
||||
* [Stenography](zh/feature_stenography.md)
|
||||
* [Swap Hands](zh/feature_swap_hands.md)
|
||||
* [Tap Dance](zh/feature_tap_dance.md)
|
||||
* [Terminal](zh/feature_terminal.md)
|
||||
* [Thermal Printer](zh/feature_thermal_printer.md)
|
||||
* [Unicode](zh/feature_unicode.md)
|
||||
* [Userspace](zh/feature_userspace.md)
|
||||
* [US ANSI Shifted Keys](zh/keycodes_us_ansi_shifted.md)
|
||||
|
||||
* 對於製造商和遊戲模組
|
||||
* [Hand Wiring Guide](zh/hand_wire.md)
|
||||
* [ISP Flashing Guide](zh/isp_flashing_guide.md)
|
||||
* [ARM Debugging Guide](zh/arm_debugging.md)
|
||||
* [I2C Driver](zh/i2c_driver.md)
|
||||
|
||||
* 為了更深入的了解
|
||||
* [How Keyboards Work](zh/how_keyboards_work.md)
|
||||
* [Understanding QMK](zh/understanding_qmk.md)
|
||||
|
||||
* 其它主題
|
||||
* [Using Eclipse with QMK](zh/eclipse.md)
|
||||
|
||||
* QMK內部(進行中)
|
||||
* [Defines](zh/internals_defines.md)
|
||||
* [Input Callback Reg](zh/internals_input_callback_reg.md)
|
||||
* [Midi Device](zh/internals_midi_device.md)
|
||||
* [Midi Device Setup Process](zh/internals_midi_device_setup_process.md)
|
||||
* [Midi Util](zh/internals_midi_util.md)
|
||||
* [Send Functions](zh/internals_send_functions.md)
|
||||
* [Sysex Tools](zh/internals_sysex_tools.md)
|
@@ -32,7 +32,7 @@
|
||||
|
||||
static uint8_t i2c_address;
|
||||
|
||||
// This configures the I2C clock to 400Mhz assuming a 72Mhz clock
|
||||
// This configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
static const I2CConfig i2cconfig = {
|
||||
STM32_TIMINGR_PRESC(15U) |
|
||||
@@ -45,10 +45,14 @@ static const I2CConfig i2cconfig = {
|
||||
__attribute__ ((weak))
|
||||
void i2c_init(void)
|
||||
{
|
||||
setPinInput(B6); // Try releasing special pins for a short time
|
||||
setPinInput(B7);
|
||||
chThdSleepMilliseconds(10);
|
||||
//palSetGroupMode(GPIOB, GPIOB_PIN6 | GPIOB_PIN7, 0, PAL_MODE_INPUT);
|
||||
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(GPIOB, 6, PAL_MODE_INPUT);
|
||||
palSetPadMode(GPIOB, 7, PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
|
||||
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
|
||||
|
||||
|
@@ -34,6 +34,7 @@ void i2c_init(void);
|
||||
uint8_t i2c_start(uint8_t address);
|
||||
uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
|
||||
uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_stop(uint16_t timeout);
|
||||
|
129
drivers/haptic/DRV2605L.c
Normal file
129
drivers/haptic/DRV2605L.c
Normal file
@@ -0,0 +1,129 @@
|
||||
/* Copyright 2018 ishtob
|
||||
* Driver for DRV2605L written for 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/>.
|
||||
*/
|
||||
#include "DRV2605L.h"
|
||||
#include "print.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
uint8_t DRV2605L_transfer_buffer[20];
|
||||
uint8_t DRV2605L_tx_register[0];
|
||||
uint8_t DRV2605L_read_buffer[0];
|
||||
uint8_t DRV2605L_read_register;
|
||||
|
||||
|
||||
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
||||
DRV2605L_transfer_buffer[0] = drv_register;
|
||||
DRV2605L_transfer_buffer[1] = settings;
|
||||
i2c_transmit(DRV2605L_BASE_ADDRESS << 1, DRV2605L_transfer_buffer, 2, 100);
|
||||
}
|
||||
|
||||
uint8_t DRV_read(uint8_t regaddress) {
|
||||
DRV2605L_tx_register[0] = regaddress;
|
||||
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1,
|
||||
DRV2605L_tx_register, 1,
|
||||
DRV2605L_read_buffer, 1
|
||||
)){
|
||||
printf("err reading reg \n");
|
||||
}
|
||||
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
||||
return DRV2605L_read_register;
|
||||
}
|
||||
|
||||
void DRV_init(void)
|
||||
{
|
||||
i2c_init();
|
||||
i2c_start(DRV2605L_BASE_ADDRESS);
|
||||
|
||||
/* 0x07 sets DRV2605 into calibration mode */
|
||||
DRV_write(DRV_MODE,0x07);
|
||||
|
||||
// DRV_write(DRV_FEEDBACK_CTRL,0xB6);
|
||||
|
||||
#if FB_ERM_LRA == 0
|
||||
/* ERM settings */
|
||||
DRV_write(DRV_RATED_VOLT, (RATED_VOLTAGE/21.33)*1000);
|
||||
#if ERM_OPEN_LOOP == 0
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (((V_PEAK*(DRIVE_TIME+BLANKING_TIME+IDISS_TIME))/0.02133)/(DRIVE_TIME-0.0003)));
|
||||
#elif ERM_OPEN_LOOP == 1
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196));
|
||||
#endif
|
||||
#elif FB_ERM_LRA == 1
|
||||
DRV_write(DRV_RATED_VOLT, ((V_RMS * sqrt(1 - ((4 * ((150+(SAMPLE_TIME*50))*0.000001)) + 0.0003)* F_LRA)/0.02071)));
|
||||
#if LRA_OPEN_LOOP == 0
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((V_PEAK/sqrt(1-(F_LRA*0.0008))/0.02133)));
|
||||
#elif LRA_OPEN_LOOP == 1
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DRVREG_FBR FB_SET;
|
||||
FB_SET.Bits.ERM_LRA = FB_ERM_LRA;
|
||||
FB_SET.Bits.BRAKE_FACTOR = FB_BRAKEFACTOR;
|
||||
FB_SET.Bits.LOOP_GAIN =FB_LOOPGAIN;
|
||||
FB_SET.Bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/
|
||||
DRV_write(DRV_FEEDBACK_CTRL, (uint8_t) FB_SET.Byte);
|
||||
DRVREG_CTRL1 C1_SET;
|
||||
C1_SET.Bits.C1_DRIVE_TIME = DRIVE_TIME;
|
||||
C1_SET.Bits.C1_AC_COUPLE = AC_COUPLE;
|
||||
C1_SET.Bits.C1_STARTUP_BOOST = STARTUP_BOOST;
|
||||
DRV_write(DRV_CTRL_1, (uint8_t) C1_SET.Byte);
|
||||
DRVREG_CTRL2 C2_SET;
|
||||
C2_SET.Bits.C2_BIDIR_INPUT = BIDIR_INPUT;
|
||||
C2_SET.Bits.C2_BRAKE_STAB = BRAKE_STAB;
|
||||
C2_SET.Bits.C2_SAMPLE_TIME = SAMPLE_TIME;
|
||||
C2_SET.Bits.C2_BLANKING_TIME = BLANKING_TIME;
|
||||
C2_SET.Bits.C2_IDISS_TIME = IDISS_TIME;
|
||||
DRV_write(DRV_CTRL_2, (uint8_t) C2_SET.Byte);
|
||||
DRVREG_CTRL3 C3_SET;
|
||||
C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP;
|
||||
C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG;
|
||||
C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE;
|
||||
C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO;
|
||||
C3_SET.Bits.C3_SUPPLY_COMP_DIS = SUPPLY_COMP_DIS;
|
||||
C3_SET.Bits.C3_ERM_OPEN_LOOP = ERM_OPEN_LOOP;
|
||||
C3_SET.Bits.C3_NG_THRESH = NG_THRESH;
|
||||
DRV_write(DRV_CTRL_3, (uint8_t) C3_SET.Byte);
|
||||
DRVREG_CTRL4 C4_SET;
|
||||
C4_SET.Bits.C4_ZC_DET_TIME = ZC_DET_TIME;
|
||||
C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME;
|
||||
DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte);
|
||||
DRV_write(DRV_LIB_SELECTION,LIB_SELECTION);
|
||||
//start autocalibration
|
||||
DRV_write(DRV_GO, 0x01);
|
||||
|
||||
/* 0x00 sets DRV2605 out of standby and to use internal trigger
|
||||
* 0x01 sets DRV2605 out of standby and to use external trigger */
|
||||
DRV_write(DRV_MODE,0x00);
|
||||
|
||||
/* 0x06: LRA library */
|
||||
DRV_write(DRV_WAVEFORM_SEQ_1, 0x01);
|
||||
|
||||
/* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF
|
||||
* 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */
|
||||
|
||||
/* TODO: setup auto-calibration as part of initiation */
|
||||
|
||||
}
|
||||
|
||||
void DRV_pulse(uint8_t sequence)
|
||||
{
|
||||
DRV_write(DRV_GO, 0x00);
|
||||
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
|
||||
DRV_write(DRV_GO, 0x01);
|
||||
}
|
394
drivers/haptic/DRV2605L.h
Normal file
394
drivers/haptic/DRV2605L.h
Normal file
@@ -0,0 +1,394 @@
|
||||
/* Copyright 2018 ishtob
|
||||
* Driver for DRV2605L written for 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
|
||||
#include "i2c_master.h"
|
||||
|
||||
/* Initialization settings
|
||||
|
||||
* Feedback Control Settings */
|
||||
#ifndef FB_ERM_LRA
|
||||
#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
|
||||
#endif
|
||||
#ifndef FB_BRAKEFACTOR
|
||||
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||
#endif
|
||||
#ifndef FB_LOOPGAIN
|
||||
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||
#endif
|
||||
|
||||
#ifndef RATED_VOLTAGE
|
||||
#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
|
||||
#ifndef V_PEAK
|
||||
#define V_PEAK 2.8
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* LRA specific settings */
|
||||
#if FB_ERM_LRA == 1
|
||||
#ifndef V_RMS
|
||||
#define V_RMS 2.0
|
||||
#endif
|
||||
#ifndef V_PEAK
|
||||
#define V_PEAK 2.1
|
||||
#endif
|
||||
#ifndef F_LRA
|
||||
#define F_LRA 205
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Library Selection */
|
||||
#ifndef LIB_SELECTION
|
||||
#if FB_ERM_LRA == 1
|
||||
#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
|
||||
#else
|
||||
#define LIB_SELECTION 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Control 1 register settings */
|
||||
#ifndef DRIVE_TIME
|
||||
#define DRIVE_TIME 25
|
||||
#endif
|
||||
#ifndef AC_COUPLE
|
||||
#define AC_COUPLE 0
|
||||
#endif
|
||||
#ifndef STARTUP_BOOST
|
||||
#define STARTUP_BOOST 1
|
||||
#endif
|
||||
|
||||
/* Control 2 Settings */
|
||||
#ifndef BIDIR_INPUT
|
||||
#define BIDIR_INPUT 1
|
||||
#endif
|
||||
#ifndef BRAKE_STAB
|
||||
#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
|
||||
#endif
|
||||
#ifndef SAMPLE_TIME
|
||||
#define SAMPLE_TIME 3
|
||||
#endif
|
||||
#ifndef BLANKING_TIME
|
||||
#define BLANKING_TIME 1
|
||||
#endif
|
||||
#ifndef IDISS_TIME
|
||||
#define IDISS_TIME 1
|
||||
#endif
|
||||
|
||||
/* Control 3 settings */
|
||||
#ifndef NG_THRESH
|
||||
#define NG_THRESH 2
|
||||
#endif
|
||||
#ifndef ERM_OPEN_LOOP
|
||||
#define ERM_OPEN_LOOP 1
|
||||
#endif
|
||||
#ifndef SUPPLY_COMP_DIS
|
||||
#define SUPPLY_COMP_DIS 0
|
||||
#endif
|
||||
#ifndef DATA_FORMAT_RTO
|
||||
#define DATA_FORMAT_RTO 0
|
||||
#endif
|
||||
#ifndef LRA_DRIVE_MODE
|
||||
#define LRA_DRIVE_MODE 0
|
||||
#endif
|
||||
#ifndef N_PWM_ANALOG
|
||||
#define N_PWM_ANALOG 0
|
||||
#endif
|
||||
#ifndef LRA_OPEN_LOOP
|
||||
#define LRA_OPEN_LOOP 0
|
||||
#endif
|
||||
|
||||
/* Control 4 settings */
|
||||
#ifndef ZC_DET_TIME
|
||||
#define ZC_DET_TIME 0
|
||||
#endif
|
||||
#ifndef AUTO_CAL_TIME
|
||||
#define AUTO_CAL_TIME 3
|
||||
#endif
|
||||
|
||||
/* register defines -------------------------------------------------------- */
|
||||
#define DRV2605L_BASE_ADDRESS 0x5A /* DRV2605L Base address */
|
||||
#define DRV_STATUS 0x00
|
||||
#define DRV_MODE 0x01
|
||||
#define DRV_RTP_INPUT 0x02
|
||||
#define DRV_LIB_SELECTION 0x03
|
||||
#define DRV_WAVEFORM_SEQ_1 0x04
|
||||
#define DRV_WAVEFORM_SEQ_2 0x05
|
||||
#define DRV_WAVEFORM_SEQ_3 0x06
|
||||
#define DRV_WAVEFORM_SEQ_4 0x07
|
||||
#define DRV_WAVEFORM_SEQ_5 0x08
|
||||
#define DRV_WAVEFORM_SEQ_6 0x09
|
||||
#define DRV_WAVEFORM_SEQ_7 0x0A
|
||||
#define DRV_WAVEFORM_SEQ_8 0x0B
|
||||
#define DRV_GO 0x0C
|
||||
#define DRV_OVERDRIVE_TIME_OFFSET 0x0D
|
||||
#define DRV_SUSTAIN_TIME_OFFSET_P 0x0E
|
||||
#define DRV_SUSTAIN_TIME_OFFSET_N 0x0F
|
||||
#define DRV_BRAKE_TIME_OFFSET 0x10
|
||||
#define DRV_AUDIO_2_VIBE_CTRL 0x11
|
||||
#define DRV_AUDIO_2_VIBE_MIN_IN 0x12
|
||||
#define DRV_AUDIO_2_VIBE_MAX_IN 0x13
|
||||
#define DRV_AUDIO_2_VIBE_MIN_OUTDRV 0x14
|
||||
#define DRV_AUDIO_2_VIBE_MAX_OUTDRV 0x15
|
||||
#define DRV_RATED_VOLT 0x16
|
||||
#define DRV_OVERDRIVE_CLAMP_VOLT 0x17
|
||||
#define DRV_AUTO_CALIB_COMP_RESULT 0x18
|
||||
#define DRV_AUTO_CALIB_BEMF_RESULT 0x19
|
||||
#define DRV_FEEDBACK_CTRL 0x1A
|
||||
#define DRV_CTRL_1 0x1B
|
||||
#define DRV_CTRL_2 0x1C
|
||||
#define DRV_CTRL_3 0x1D
|
||||
#define DRV_CTRL_4 0x1E
|
||||
#define DRV_CTRL_5 0x1F
|
||||
#define DRV_OPEN_LOOP_PERIOD 0x20
|
||||
#define DRV_VBAT_VOLT_MONITOR 0x21
|
||||
#define DRV_LRA_RESONANCE_PERIOD 0x22
|
||||
|
||||
void DRV_init(void);
|
||||
void DRV_write(const uint8_t drv_register, const uint8_t settings);
|
||||
uint8_t DRV_read(const uint8_t regaddress);
|
||||
void DRV_pulse(const uint8_t sequence);
|
||||
|
||||
|
||||
typedef enum DRV_EFFECT{
|
||||
clear_sequence = 0,
|
||||
strong_click = 1,
|
||||
strong_click_60 = 2,
|
||||
strong_click_30 = 3,
|
||||
sharp_click = 4,
|
||||
sharp_click_60 = 5,
|
||||
sharp_click_30 = 6,
|
||||
soft_bump = 7,
|
||||
soft_bump_60 = 8,
|
||||
soft_bump_30 = 9,
|
||||
dbl_click = 10,
|
||||
dbl_click_60 = 11,
|
||||
trp_click = 12,
|
||||
soft_fuzz = 13,
|
||||
strong_buzz = 14,
|
||||
alert_750ms = 15,
|
||||
alert_1000ms = 16,
|
||||
strong_click1 = 17,
|
||||
strong_click2_80 = 18,
|
||||
strong_click3_60 = 19,
|
||||
strong_click4_30 = 20,
|
||||
medium_click1 = 21,
|
||||
medium_click2_80 = 22,
|
||||
medium_click3_60 = 23,
|
||||
sharp_tick1 = 24,
|
||||
sharp_tick2_80 = 25,
|
||||
sharp_tick3_60 = 26,
|
||||
sh_dblclick_str = 27,
|
||||
sh_dblclick_str_80 = 28,
|
||||
sh_dblclick_str_60 = 29,
|
||||
sh_dblclick_str_30 = 30,
|
||||
sh_dblclick_med = 31,
|
||||
sh_dblclick_med_80 = 32,
|
||||
sh_dblclick_med_60 = 33,
|
||||
sh_dblsharp_tick = 34,
|
||||
sh_dblsharp_tick_80 = 35,
|
||||
sh_dblsharp_tick_60 = 36,
|
||||
lg_dblclick_str = 37,
|
||||
lg_dblclick_str_80 = 38,
|
||||
lg_dblclick_str_60 = 39,
|
||||
lg_dblclick_str_30 = 40,
|
||||
lg_dblclick_med = 41,
|
||||
lg_dblclick_med_80 = 42,
|
||||
lg_dblclick_med_60 = 43,
|
||||
lg_dblsharp_tick = 44,
|
||||
lg_dblsharp_tick_80 = 45,
|
||||
lg_dblsharp_tick_60 = 46,
|
||||
buzz = 47,
|
||||
buzz_80 = 48,
|
||||
buzz_60 = 49,
|
||||
buzz_40 = 50,
|
||||
buzz_20 = 51,
|
||||
pulsing_strong = 52,
|
||||
pulsing_strong_80 = 53,
|
||||
pulsing_medium = 54,
|
||||
pulsing_medium_80 = 55,
|
||||
pulsing_sharp = 56,
|
||||
pulsing_sharp_80 = 57,
|
||||
transition_click = 58,
|
||||
transition_click_80 = 59,
|
||||
transition_click_60 = 60,
|
||||
transition_click_40 = 61,
|
||||
transition_click_20 = 62,
|
||||
transition_click_10 = 63,
|
||||
transition_hum = 64,
|
||||
transition_hum_80 = 65,
|
||||
transition_hum_60 = 66,
|
||||
transition_hum_40 = 67,
|
||||
transition_hum_20 = 68,
|
||||
transition_hum_10 = 69,
|
||||
transition_rampdown_long_smooth1 = 70,
|
||||
transition_rampdown_long_smooth2 = 71,
|
||||
transition_rampdown_med_smooth1 = 72,
|
||||
transition_rampdown_med_smooth2 = 73,
|
||||
transition_rampdown_short_smooth1 = 74,
|
||||
transition_rampdown_short_smooth2 = 75,
|
||||
transition_rampdown_long_sharp1 = 76,
|
||||
transition_rampdown_long_sharp2 = 77,
|
||||
transition_rampdown_med_sharp1 = 78,
|
||||
transition_rampdown_med_sharp2 = 79,
|
||||
transition_rampdown_short_sharp1 = 80,
|
||||
transition_rampdown_short_sharp2 = 81,
|
||||
transition_rampup_long_smooth1 = 82,
|
||||
transition_rampup_long_smooth2 = 83,
|
||||
transition_rampup_med_smooth1 = 84,
|
||||
transition_rampup_med_smooth2 = 85,
|
||||
transition_rampup_short_smooth1 = 86,
|
||||
transition_rampup_short_smooth2 = 87,
|
||||
transition_rampup_long_sharp1 = 88,
|
||||
transition_rampup_long_sharp2 = 89,
|
||||
transition_rampup_med_sharp1 = 90,
|
||||
transition_rampup_med_sharp2 = 91,
|
||||
transition_rampup_short_sharp1 = 92,
|
||||
transition_rampup_short_sharp2 = 93,
|
||||
transition_rampdown_long_smooth1_50 = 94,
|
||||
transition_rampdown_long_smooth2_50 = 95,
|
||||
transition_rampdown_med_smooth1_50 = 96,
|
||||
transition_rampdown_med_smooth2_50 = 97,
|
||||
transition_rampdown_short_smooth1_50 = 98,
|
||||
transition_rampdown_short_smooth2_50 = 99,
|
||||
transition_rampdown_long_sharp1_50 = 100,
|
||||
transition_rampdown_long_sharp2_50 = 101,
|
||||
transition_rampdown_med_sharp1_50 = 102,
|
||||
transition_rampdown_med_sharp2_50 = 103,
|
||||
transition_rampdown_short_sharp1_50 = 104,
|
||||
transition_rampdown_short_sharp2_50 = 105,
|
||||
transition_rampup_long_smooth1_50 = 106,
|
||||
transition_rampup_long_smooth2_50 = 107,
|
||||
transition_rampup_med_smooth1_50 = 108,
|
||||
transition_rampup_med_smooth2_50 = 109,
|
||||
transition_rampup_short_smooth1_50 = 110,
|
||||
transition_rampup_short_smooth2_50 = 111,
|
||||
transition_rampup_long_sharp1_50 = 112,
|
||||
transition_rampup_long_sharp2_50 = 113,
|
||||
transition_rampup_med_sharp1_50 = 114,
|
||||
transition_rampup_med_sharp2_50 = 115,
|
||||
transition_rampup_short_sharp1_50 = 116,
|
||||
transition_rampup_short_sharp2_50 = 117,
|
||||
long_buzz_for_programmatic_stopping = 118,
|
||||
smooth_hum1_50 = 119,
|
||||
smooth_hum2_40 = 120,
|
||||
smooth_hum3_30 = 121,
|
||||
smooth_hum4_20 = 122,
|
||||
smooth_hum5_10 = 123,
|
||||
} DRV_EFFECT;
|
||||
|
||||
/* Register bit array unions */
|
||||
|
||||
typedef union DRVREG_STATUS { /* register 0x00 */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t OC_DETECT :1; /* set to 1 when overcurrent event is detected */
|
||||
uint8_t OVER_TEMP :1; /* set to 1 when device exceeds temp threshold */
|
||||
uint8_t FB_STS :1; /* set to 1 when feedback controller has timed out */
|
||||
/* auto-calibration routine and diagnostic result
|
||||
* result | auto-calibation | diagnostic |
|
||||
* 0 | passed | actuator func normal |
|
||||
* 1 | failed | actuator func fault* |
|
||||
* * actuator is not present or is shorted, timing out, or giving out–of-range back-EMF */
|
||||
uint8_t DIAG_RESULT :1;
|
||||
uint8_t :1;
|
||||
uint8_t DEVICE_ID :3; /* Device IDs 3: DRV2605 4: DRV2604 5: DRV2604L 6: DRV2605L */
|
||||
} Bits;
|
||||
} DRVREG_STATUS;
|
||||
|
||||
typedef union DRVREG_MODE { /* register 0x01 */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t MODE :3; /* Mode setting */
|
||||
uint8_t :3;
|
||||
uint8_t STANDBY :1; /* 0:standby 1:ready */
|
||||
} Bits;
|
||||
} DRVREG_MODE;
|
||||
|
||||
typedef union DRVREG_WAIT {
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t WAIT_MODE :1; /* Set to 1 to interpret as wait for next 7 bits x10ms */
|
||||
uint8_t WAIT_TIME :7;
|
||||
} Bits;
|
||||
} DRVREG_WAIT;
|
||||
|
||||
typedef union DRVREG_FBR{ /* register 0x1A */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t BEMF_GAIN :2;
|
||||
uint8_t LOOP_GAIN :2;
|
||||
uint8_t BRAKE_FACTOR :3;
|
||||
uint8_t ERM_LRA :1;
|
||||
} Bits;
|
||||
} DRVREG_FBR;
|
||||
|
||||
typedef union DRVREG_CTRL1{ /* register 0x1B */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C1_DRIVE_TIME :5;
|
||||
uint8_t C1_AC_COUPLE :1;
|
||||
uint8_t :1;
|
||||
uint8_t C1_STARTUP_BOOST :1;
|
||||
} Bits;
|
||||
} DRVREG_CTRL1;
|
||||
|
||||
typedef union DRVREG_CTRL2{ /* register 0x1C */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C2_IDISS_TIME :2;
|
||||
uint8_t C2_BLANKING_TIME :2;
|
||||
uint8_t C2_SAMPLE_TIME :2;
|
||||
uint8_t C2_BRAKE_STAB :1;
|
||||
uint8_t C2_BIDIR_INPUT :1;
|
||||
} Bits;
|
||||
} DRVREG_CTRL2;
|
||||
|
||||
typedef union DRVREG_CTRL3{ /* register 0x1D */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C3_LRA_OPEN_LOOP :1;
|
||||
uint8_t C3_N_PWM_ANALOG :1;
|
||||
uint8_t C3_LRA_DRIVE_MODE :1;
|
||||
uint8_t C3_DATA_FORMAT_RTO :1;
|
||||
uint8_t C3_SUPPLY_COMP_DIS :1;
|
||||
uint8_t C3_ERM_OPEN_LOOP :1;
|
||||
uint8_t C3_NG_THRESH :2;
|
||||
} Bits;
|
||||
} DRVREG_CTRL3;
|
||||
|
||||
typedef union DRVREG_CTRL4{ /* register 0x1E */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C4_OTP_PROGRAM :1;
|
||||
uint8_t :1;
|
||||
uint8_t C4_OTP_STATUS :1;
|
||||
uint8_t :1;
|
||||
uint8_t C4_AUTO_CAL_TIME :2;
|
||||
uint8_t C4_ZC_DET_TIME :2;
|
||||
} Bits;
|
||||
} DRVREG_CTRL4;
|
||||
|
||||
typedef union DRVREG_CTRL5{ /* register 0x1F */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C5_IDISS_TIME :2;
|
||||
uint8_t C5_BLANKING_TIME :2;
|
||||
uint8_t C5_PLAYBACK_INTERVAL :1;
|
||||
uint8_t C5_LRA_AUTO_OPEN_LOOP :1;
|
||||
uint8_t C5_AUTO_OL_CNT :2;
|
||||
} Bits;
|
||||
} DRVREG_CTRL5;
|
691
drivers/qwiic/micro_oled.c
Normal file
691
drivers/qwiic/micro_oled.c
Normal file
@@ -0,0 +1,691 @@
|
||||
/* Jim Lindblom @ SparkFun Electronics
|
||||
* October 26, 2014
|
||||
* https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED
|
||||
*
|
||||
* Modified by:
|
||||
* Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
* July 27, 2015
|
||||
* https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
*
|
||||
* This code was heavily based around the MicroView library, written by GeekAmmo
|
||||
* (https://github.com/geekammo/MicroView-Arduino-Library).
|
||||
*
|
||||
* Adapted for QMK by:
|
||||
* Jack Humbert <jack.humb@gmail.com>
|
||||
* October 11, 2018
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "micro_oled.h"
|
||||
#include <stdlib.h>
|
||||
#include "util/font5x7.h"
|
||||
#include "util/font8x16.h"
|
||||
#include "string.h"
|
||||
|
||||
#define TOTALFONTS 2
|
||||
const unsigned char * fonts_pointer[]= { font5x7, font8x16 };
|
||||
|
||||
uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY;
|
||||
uint16_t fontMapWidth;
|
||||
|
||||
#define _BV(x) (1 << (x))
|
||||
#define swap(a, b) { uint8_t t = a; a = b; b = t; }
|
||||
|
||||
uint8_t micro_oled_transfer_buffer[20];
|
||||
static uint8_t micro_oled_screen_current[LCDWIDTH*LCDWIDTH/8] = { 0 };
|
||||
|
||||
/* LCD Memory organised in 64 horizontal pixel and 6 rows of byte
|
||||
B B .............B -----
|
||||
y y .............y \
|
||||
t t .............t \
|
||||
e e .............e \
|
||||
0 1 .............63 \
|
||||
\
|
||||
D0 D0.............D0 \
|
||||
D1 D1.............D1 / ROW 0
|
||||
D2 D2.............D2 /
|
||||
D3 D3.............D3 /
|
||||
D4 D4.............D4 /
|
||||
D5 D5.............D5 /
|
||||
D6 D6.............D6 /
|
||||
D7 D7.............D7 ----
|
||||
*/
|
||||
|
||||
#if LCDWIDTH == 64
|
||||
#if LCDWIDTH == 48
|
||||
static uint8_t micro_oled_screen_buffer[] = {
|
||||
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
|
||||
//64x48 image
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
|
||||
0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE,
|
||||
0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF,
|
||||
0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7,
|
||||
0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06,
|
||||
0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif
|
||||
#elif LCDWIDTH == 128
|
||||
#if LCDHEIGHT == 32
|
||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {
|
||||
//128x32 qmk image
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC,
|
||||
0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC,
|
||||
0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80,
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00,
|
||||
0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
|
||||
0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03,
|
||||
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01,
|
||||
0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12,
|
||||
0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12,
|
||||
0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3,
|
||||
0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED,
|
||||
0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0,
|
||||
0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C,
|
||||
0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C,
|
||||
0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00,
|
||||
0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F,
|
||||
0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F,
|
||||
0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
|
||||
0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04,
|
||||
0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01,
|
||||
0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07,
|
||||
0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00
|
||||
};
|
||||
#elif LCDHEIGHT == 64
|
||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
||||
0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00,
|
||||
0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF,
|
||||
0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE,
|
||||
0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC,
|
||||
0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00,
|
||||
0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F,
|
||||
0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF,
|
||||
0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00,
|
||||
0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70,
|
||||
0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0,
|
||||
0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24,
|
||||
0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8,
|
||||
0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04,
|
||||
0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0,
|
||||
0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01,
|
||||
0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70,
|
||||
0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18,
|
||||
0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
|
||||
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
//TODO: generate bitmap of QMK logo here
|
||||
#endif
|
||||
#else
|
||||
//catchall for custom screen szies
|
||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void micro_oled_init(void) {
|
||||
|
||||
i2c_init();
|
||||
i2c_start(I2C_ADDRESS_SA0_1);
|
||||
|
||||
// Display Init sequence for 64x48 OLED module
|
||||
send_command(DISPLAYOFF); // 0xAE
|
||||
|
||||
send_command(SETDISPLAYCLOCKDIV); // 0xD5
|
||||
send_command(0x80); // the suggested ratio 0x80
|
||||
|
||||
send_command(SETMULTIPLEX); // 0xA8
|
||||
send_command(LCDHEIGHT - 1);
|
||||
|
||||
send_command(SETDISPLAYOFFSET); // 0xD3
|
||||
send_command(0x00); // no offset
|
||||
|
||||
send_command(SETSTARTLINE | 0x00); // line #0
|
||||
|
||||
send_command(CHARGEPUMP); // enable charge pump
|
||||
send_command(0x14);
|
||||
|
||||
send_command(NORMALDISPLAY); // 0xA6
|
||||
send_command(DISPLAYALLONRESUME); // 0xA4
|
||||
|
||||
//display at regular orientation
|
||||
send_command(SEGREMAP | 0x1);
|
||||
send_command(COMSCANDEC);
|
||||
|
||||
//rotate display 180
|
||||
#ifdef micro_oled_rotate_180
|
||||
send_command(SEGREMAP);
|
||||
send_command(COMSCANINC);
|
||||
#endif
|
||||
|
||||
send_command(MEMORYMODE);
|
||||
send_command(0x10);
|
||||
|
||||
send_command(SETCOMPINS); // 0xDA
|
||||
if (LCDHEIGHT > 32) {
|
||||
send_command(0x12);
|
||||
} else {
|
||||
send_command(0x02);
|
||||
}
|
||||
send_command(SETCONTRAST); // 0x81
|
||||
send_command(0x8F);
|
||||
|
||||
send_command(SETPRECHARGE); // 0xd9
|
||||
send_command(0xF1);
|
||||
|
||||
send_command(SETVCOMDESELECT); // 0xDB
|
||||
send_command(0x40);
|
||||
|
||||
send_command(DISPLAYON); //--turn on oled panel
|
||||
clear_screen(); // Erase hardware memory inside the OLED controller to avoid random data in memory.
|
||||
send_buffer();
|
||||
}
|
||||
|
||||
void send_command(uint8_t command) {
|
||||
micro_oled_transfer_buffer[0] = I2C_COMMAND;
|
||||
micro_oled_transfer_buffer[1] = command;
|
||||
i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100);
|
||||
}
|
||||
|
||||
void send_data(uint8_t data) {
|
||||
micro_oled_transfer_buffer[0] = I2C_DATA;
|
||||
micro_oled_transfer_buffer[1] = data;
|
||||
i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100);
|
||||
}
|
||||
|
||||
/** \brief Set SSD1306 page address.
|
||||
Send page address command and address to the SSD1306 OLED controller.
|
||||
*/
|
||||
void set_page_address(uint8_t address) {
|
||||
address = (0xB0 | address);
|
||||
send_command(address);
|
||||
}
|
||||
|
||||
/** \brief Set SSD1306 column address.
|
||||
Send column address command and address to the SSD1306 OLED controller.
|
||||
*/
|
||||
void set_column_address(uint8_t address) {
|
||||
send_command( ( 0x10 | (address >> 4) ) + ((128 - LCDWIDTH) >> 8) );
|
||||
send_command( 0x0F & address );
|
||||
}
|
||||
|
||||
/** \brief Clear SSD1306's memory.
|
||||
To clear GDRAM inside the LCD controller.
|
||||
*/
|
||||
void clear_screen(void) {
|
||||
for (int i=0;i<8; i++) {
|
||||
set_page_address(i);
|
||||
set_column_address(0);
|
||||
for (int j=0; j<0x80; j++) {
|
||||
send_data(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Clear SSD1306's memory.
|
||||
To clear GDRAM inside the LCD controller.
|
||||
*/
|
||||
void clear_buffer(void) {
|
||||
//384
|
||||
memset(micro_oled_screen_buffer, 0, LCDWIDTH*LCDWIDTH/8);
|
||||
}
|
||||
|
||||
/** \brief Invert display.
|
||||
The PIXEL_ON color of the display will turn to PIXEL_OFF and the PIXEL_OFF will turn to PIXEL_ON.
|
||||
*/
|
||||
void invert_screen(bool invert) {
|
||||
if (invert) {
|
||||
send_command(INVERTDISPLAY);
|
||||
} else {
|
||||
send_command(NORMALDISPLAY);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Set contrast.
|
||||
OLED contract value from 0 to 255. Note: Contrast level is not very obvious.
|
||||
*/
|
||||
void set_contrast(uint8_t contrast) {
|
||||
send_command(SETCONTRAST); // 0x81
|
||||
send_command(contrast);
|
||||
}
|
||||
|
||||
/** \brief Transfer display buffer.
|
||||
Sends the updated buffer to the controller - the current status is checked before to save i2c exectution time
|
||||
*/
|
||||
void send_buffer(void) {
|
||||
uint8_t i, j;
|
||||
|
||||
uint8_t page_addr = 0xFF;
|
||||
for (i = 0; i < LCDHEIGHT/8; i++) {
|
||||
uint8_t col_addr = 0xFF;
|
||||
for (j = 0; j < LCDWIDTH; j++) {
|
||||
if (micro_oled_screen_buffer[i*LCDWIDTH+j] != micro_oled_screen_current[i*LCDWIDTH+j]) {
|
||||
if (page_addr != i) {
|
||||
set_page_address(i);
|
||||
}
|
||||
if (col_addr != j) {
|
||||
set_column_address(j);
|
||||
}
|
||||
send_data(micro_oled_screen_buffer[i*LCDWIDTH+j]);
|
||||
micro_oled_screen_current[i*LCDWIDTH+j] = micro_oled_screen_buffer[i*LCDWIDTH+j];
|
||||
col_addr = j + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw pixel with color and mode.
|
||||
Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode.
|
||||
*/
|
||||
void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) {
|
||||
if ((x<0) || (x>=LCDWIDTH) || (y<0) || (y>=LCDHEIGHT))
|
||||
return;
|
||||
|
||||
if (mode == XOR) {
|
||||
if (color == PIXEL_ON)
|
||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] ^= _BV((y%8));
|
||||
} else {
|
||||
if (color == PIXEL_ON)
|
||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] |= _BV((y%8));
|
||||
else
|
||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] &= ~_BV((y%8));
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw line with color and mode.
|
||||
Draw line using color and mode from x0,y0 to x1,y1 of the screen buffer.
|
||||
*/
|
||||
void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode) {
|
||||
uint8_t steep = abs(y1 - y0) > abs(x1 - x0);
|
||||
if (steep) {
|
||||
swap(x0, y0);
|
||||
swap(x1, y1);
|
||||
}
|
||||
|
||||
if (x0 > x1) {
|
||||
swap(x0, x1);
|
||||
swap(y0, y1);
|
||||
}
|
||||
|
||||
uint8_t dx, dy;
|
||||
dx = x1 - x0;
|
||||
dy = abs(y1 - y0);
|
||||
|
||||
int8_t err = dx / 2;
|
||||
int8_t ystep;
|
||||
|
||||
if (y0 < y1) {
|
||||
ystep = 1;
|
||||
} else {
|
||||
ystep = -1;}
|
||||
|
||||
for (; x0<x1; x0++) {
|
||||
if (steep) {
|
||||
draw_pixel(y0, x0, color, mode);
|
||||
} else {
|
||||
draw_pixel(x0, y0, color, mode);
|
||||
}
|
||||
err -= dy;
|
||||
if (err < 0) {
|
||||
y0 += ystep;
|
||||
err += dx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw horizontal line with color and mode.
|
||||
Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer.
|
||||
*/
|
||||
void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) {
|
||||
draw_line(x,y,x+width,y,color,mode);
|
||||
}
|
||||
|
||||
/** \brief Draw vertical line.
|
||||
Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) {
|
||||
draw_line(x,y,x,y+height,color,mode);
|
||||
}
|
||||
|
||||
/** \brief Draw rectangle with color and mode.
|
||||
Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
uint8_t tempHeight;
|
||||
|
||||
draw_line_hori(x,y, width, color, mode);
|
||||
draw_line_hori(x,y+height-1, width, color, mode);
|
||||
|
||||
tempHeight=height-2;
|
||||
|
||||
// skip drawing vertical lines to avoid overlapping of pixel that will
|
||||
// affect XOR plot if no pixel in between horizontal lines
|
||||
if (tempHeight<1) return;
|
||||
|
||||
draw_line_vert(x,y+1, tempHeight, color, mode);
|
||||
draw_line_vert(x+width-1, y+1, tempHeight, color, mode);
|
||||
}
|
||||
|
||||
/** \brief Draw rectangle with color and mode.
|
||||
Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
uint8_t tempHeight;
|
||||
|
||||
draw_line_hori(x+1,y, width-2, color, mode);
|
||||
draw_line_hori(x+1,y+height-1, width-2, color, mode);
|
||||
|
||||
tempHeight=height-2;
|
||||
|
||||
// skip drawing vertical lines to avoid overlapping of pixel that will
|
||||
// affect XOR plot if no pixel in between horizontal lines
|
||||
if (tempHeight<1) return;
|
||||
|
||||
draw_line_vert(x,y+1, tempHeight, color, mode);
|
||||
draw_line_vert(x+width-1, y+1, tempHeight, color, mode);
|
||||
}
|
||||
|
||||
/** \brief Draw filled rectangle with color and mode.
|
||||
Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
// TODO - need to optimise the memory map draw so that this function will not call pixel one by one
|
||||
for (int i=x; i<x+width;i++) {
|
||||
draw_line_vert(i,y, height, color, mode);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw filled rectangle with color and mode.
|
||||
Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
// TODO - need to optimise the memory map draw so that this function will not call pixel one by one
|
||||
for (int i=x; i<x+width;i++) {
|
||||
if (i == x || i == (x + width - 1))
|
||||
draw_line_vert(i, y+1, height-2, color, mode);
|
||||
else
|
||||
draw_line_vert(i, y, height, color, mode);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw character with color and mode.
|
||||
Draw character c using color and draw mode at x,y.
|
||||
*/
|
||||
void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font) {
|
||||
// TODO - New routine to take font of any height, at the moment limited to font height in multiple of 8 pixels
|
||||
|
||||
uint8_t rowsToDraw,row, tempC;
|
||||
uint8_t i,j,temp;
|
||||
uint16_t charPerBitmapRow,charColPositionOnBitmap,charRowPositionOnBitmap,charBitmapStartPosition;
|
||||
|
||||
if ((font>=TOTALFONTS) || (font<0))
|
||||
return;
|
||||
|
||||
uint8_t fontType = font;
|
||||
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0);
|
||||
uint8_t fontHeight = pgm_read_byte(fonts_pointer[fontType]+1);
|
||||
uint8_t fontStartChar = pgm_read_byte(fonts_pointer[fontType]+2);
|
||||
uint8_t fontTotalChar = pgm_read_byte(fonts_pointer[fontType]+3);
|
||||
uint16_t fontMapWidth = (pgm_read_byte(fonts_pointer[fontType]+4)*100)+pgm_read_byte(fonts_pointer[fontType]+5); // two bytes values into integer 16
|
||||
|
||||
if ((c<fontStartChar) || (c>(fontStartChar+fontTotalChar-1))) // no bitmap for the required c
|
||||
return;
|
||||
|
||||
tempC=c-fontStartChar;
|
||||
|
||||
// each row (in datasheet is call page) is 8 bits high, 16 bit high character will have 2 rows to be drawn
|
||||
rowsToDraw=fontHeight/8; // 8 is LCD's page size, see SSD1306 datasheet
|
||||
if (rowsToDraw<=1) rowsToDraw=1;
|
||||
|
||||
// the following draw function can draw anywhere on the screen, but SLOW pixel by pixel draw
|
||||
if (rowsToDraw==1) {
|
||||
for (i=0;i<fontWidth+1;i++) {
|
||||
if (i==fontWidth) // this is done in a weird way because for 5x7 font, there is no margin, this code add a margin after col 5
|
||||
temp=0;
|
||||
else
|
||||
temp=pgm_read_byte(fonts_pointer[fontType]+FONTHEADERSIZE+(tempC*fontWidth)+i);
|
||||
|
||||
for (j=0;j<8;j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
||||
if (temp & 0x1) {
|
||||
draw_pixel(x+i, y+j, color,mode);
|
||||
}
|
||||
else {
|
||||
draw_pixel(x+i, y+j, !color,mode);
|
||||
}
|
||||
|
||||
temp >>=1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// font height over 8 bit
|
||||
// take character "0" ASCII 48 as example
|
||||
charPerBitmapRow = fontMapWidth/fontWidth; // 256/8 =32 char per row
|
||||
charColPositionOnBitmap = tempC % charPerBitmapRow; // =16
|
||||
charRowPositionOnBitmap = (int)(tempC/charPerBitmapRow); // =1
|
||||
charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight/8)) + (charColPositionOnBitmap * fontWidth) ;
|
||||
|
||||
// each row on LCD is 8 bit height (see datasheet for explanation)
|
||||
for(row=0;row<rowsToDraw;row++) {
|
||||
for (i=0; i<fontWidth;i++) {
|
||||
temp=pgm_read_byte(fonts_pointer[fontType]+FONTHEADERSIZE+(charBitmapStartPosition+i+(row*fontMapWidth)));
|
||||
for (j=0;j<8;j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
||||
if (temp & 0x1) {
|
||||
draw_pixel(x+i,y+j+(row*8), color, mode);
|
||||
}
|
||||
else {
|
||||
draw_pixel(x+i,y+j+(row*8), !color, mode);
|
||||
}
|
||||
temp >>=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font) {
|
||||
|
||||
if ((font>=TOTALFONTS) || (font<0))
|
||||
return;
|
||||
|
||||
uint8_t fontType = font;
|
||||
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0);
|
||||
|
||||
uint8_t cur_x = x;
|
||||
for (int i = 0; i < strlen(string); i++) {
|
||||
draw_char(cur_x, y, string[i], color, mode, font);
|
||||
cur_x += fontWidth + 1;
|
||||
}
|
||||
|
||||
}
|
134
drivers/qwiic/micro_oled.h
Normal file
134
drivers/qwiic/micro_oled.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/* Jim Lindblom @ SparkFun Electronics
|
||||
* October 26, 2014
|
||||
* https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED
|
||||
*
|
||||
* Modified by:
|
||||
* Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
* July 27, 2015
|
||||
* https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
*
|
||||
* This code was heavily based around the MicroView library, written by GeekAmmo
|
||||
* (https://github.com/geekammo/MicroView-Arduino-Library).
|
||||
*
|
||||
* Adapted for QMK by:
|
||||
* Jack Humbert <jack.humb@gmail.com>
|
||||
* October 11, 2018
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "qwiic.h"
|
||||
|
||||
void micro_oled_init(void);
|
||||
|
||||
void send_command(uint8_t command);
|
||||
void send_data(uint8_t data);
|
||||
void set_page_address(uint8_t address);
|
||||
void set_column_address(uint8_t address);
|
||||
void clear_screen(void);
|
||||
void clear_buffer(void);
|
||||
void send_buffer(void);
|
||||
void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode);
|
||||
void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode);
|
||||
void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode);
|
||||
void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode);
|
||||
void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font);
|
||||
void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font);
|
||||
|
||||
#define I2C_ADDRESS_SA0_0 0b0111100
|
||||
#ifndef I2C_ADDRESS_SA0_1
|
||||
#define I2C_ADDRESS_SA0_1 0b0111101
|
||||
#endif
|
||||
#define I2C_COMMAND 0x00
|
||||
#define I2C_DATA 0x40
|
||||
#define PIXEL_OFF 0
|
||||
#define PIXEL_ON 1
|
||||
|
||||
#ifndef LCDWIDTH
|
||||
#define LCDWIDTH 64
|
||||
#endif
|
||||
#ifndef LCDWIDTH
|
||||
#define LCDHEIGHT 48
|
||||
#endif
|
||||
#define FONTHEADERSIZE 6
|
||||
|
||||
#define NORM 0
|
||||
#define XOR 1
|
||||
|
||||
#define PAGE 0
|
||||
#define ALL 1
|
||||
|
||||
#define WIDGETSTYLE0 0
|
||||
#define WIDGETSTYLE1 1
|
||||
#define WIDGETSTYLE2 2
|
||||
|
||||
#define SETCONTRAST 0x81
|
||||
#define DISPLAYALLONRESUME 0xA4
|
||||
#define DISPLAYALLON 0xA5
|
||||
#define NORMALDISPLAY 0xA6
|
||||
#define INVERTDISPLAY 0xA7
|
||||
#define DISPLAYOFF 0xAE
|
||||
#define DISPLAYON 0xAF
|
||||
#define SETDISPLAYOFFSET 0xD3
|
||||
#define SETCOMPINS 0xDA
|
||||
#define SETVCOMDESELECT 0xDB
|
||||
#define SETDISPLAYCLOCKDIV 0xD5
|
||||
#define SETPRECHARGE 0xD9
|
||||
#define SETMULTIPLEX 0xA8
|
||||
#define SETLOWCOLUMN 0x00
|
||||
#define SETHIGHCOLUMN 0x10
|
||||
#define SETSTARTLINE 0x40
|
||||
#define MEMORYMODE 0x20
|
||||
#define COMSCANINC 0xC0
|
||||
#define COMSCANDEC 0xC8
|
||||
#define SEGREMAP 0xA0
|
||||
#define CHARGEPUMP 0x8D
|
||||
#define EXTERNALVCC 0x01
|
||||
#define SWITCHCAPVCC 0x02
|
||||
|
||||
// Scroll
|
||||
#define ACTIVATESCROLL 0x2F
|
||||
#define DEACTIVATESCROLL 0x2E
|
||||
#define SETVERTICALSCROLLAREA 0xA3
|
||||
#define RIGHTHORIZONTALSCROLL 0x26
|
||||
#define LEFT_HORIZONTALSCROLL 0x27
|
||||
#define VERTICALRIGHTHORIZONTALSCROLL 0x29
|
||||
#define VERTICALLEFTHORIZONTALSCROLL 0x2A
|
||||
|
||||
typedef enum CMD {
|
||||
CMD_CLEAR, //0
|
||||
CMD_INVERT, //1
|
||||
CMD_CONTRAST, //2
|
||||
CMD_DISPLAY, //3
|
||||
CMD_SETCURSOR, //4
|
||||
CMD_PIXEL, //5
|
||||
CMD_LINE, //6
|
||||
CMD_LINEH, //7
|
||||
CMD_LINEV, //8
|
||||
CMD_RECT, //9
|
||||
CMD_RECTFILL, //10
|
||||
CMD_CIRCLE, //11
|
||||
CMD_CIRCLEFILL, //12
|
||||
CMD_DRAWCHAR, //13
|
||||
CMD_DRAWBITMAP, //14
|
||||
CMD_GETLCDWIDTH, //15
|
||||
CMD_GETLCDHEIGHT, //16
|
||||
CMD_SETCOLOR, //17
|
||||
CMD_SETDRAWMODE //18
|
||||
} commCommand_t;
|
31
drivers/qwiic/qwiic.c
Normal file
31
drivers/qwiic/qwiic.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
*
|
||||
* 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 "qwiic.h"
|
||||
|
||||
void qwiic_init(void) {
|
||||
#ifdef QWIIC_JOYSTIIC_ENABLE
|
||||
joystiic_init();
|
||||
#endif
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
micro_oled_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void qwiic_task(void) {
|
||||
#ifdef QWIIC_JOYSTIIC_ENABLE
|
||||
joystiic_task();
|
||||
#endif
|
||||
}
|
28
drivers/qwiic/qwiic.h
Normal file
28
drivers/qwiic/qwiic.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
*
|
||||
* 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 "i2c_master.h"
|
||||
|
||||
#ifdef QWIIC_JOYSTIIC_ENABLE
|
||||
#include "joystiic.h"
|
||||
#endif
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
#include "micro_oled.h"
|
||||
#endif
|
||||
|
||||
void qwiic_init(void);
|
||||
void qwiic_task(void);
|
18
drivers/qwiic/qwiic.mk
Normal file
18
drivers/qwiic/qwiic.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
ifneq ($(strip $(QWIIC_ENABLE)),)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/qwiic
|
||||
OPT_DEFS += -DQWIIC_ENABLE
|
||||
SRC += qwiic.c
|
||||
ifeq ($(filter "i2c_master.c", $(SRC)),)
|
||||
SRC += i2c_master.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter JOYSTIIC, $(QWIIC_ENABLE)),)
|
||||
OPT_DEFS += -DQWIIC_JOYSTIIC_ENABLE
|
||||
SRC += joystiic.c
|
||||
endif
|
||||
|
||||
ifneq ($(filter MICRO_OLED, $(QWIIC_ENABLE)),)
|
||||
OPT_DEFS += -DQWIIC_MICRO_OLED_ENABLE
|
||||
SRC += micro_oled.c
|
||||
endif
|
288
drivers/qwiic/util/font5x7.h
Normal file
288
drivers/qwiic/util/font5x7.h
Normal file
@@ -0,0 +1,288 @@
|
||||
/******************************************************************************
|
||||
font5x7.h
|
||||
Definition for small font
|
||||
|
||||
This file was imported from the MicroView library, written by GeekAmmo
|
||||
(https://github.com/geekammo/MicroView-Arduino-Library), and released 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Modified by:
|
||||
Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
July 27, 2015
|
||||
https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
|
||||
******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
static const unsigned char font5x7[] PROGMEM = {
|
||||
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
||||
5,8,0,255,12,75,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02,
|
||||
0x18, 0xA4, 0xA4, 0x9C, 0x78,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38,
|
||||
0xFC, 0x18, 0x24, 0x24, 0x18,
|
||||
0x18, 0x24, 0x24, 0x18, 0xFC,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C,
|
||||
0x1E, 0xA1, 0xA1, 0x61, 0x12,
|
||||
0x3A, 0x40, 0x40, 0x20, 0x7A,
|
||||
0x38, 0x54, 0x54, 0x55, 0x59,
|
||||
0x21, 0x55, 0x55, 0x79, 0x41,
|
||||
0x21, 0x54, 0x54, 0x78, 0x41,
|
||||
0x21, 0x55, 0x54, 0x78, 0x40,
|
||||
0x20, 0x54, 0x55, 0x79, 0x40,
|
||||
0x0C, 0x1E, 0x52, 0x72, 0x12,
|
||||
0x39, 0x55, 0x55, 0x55, 0x59,
|
||||
0x39, 0x54, 0x54, 0x54, 0x59,
|
||||
0x39, 0x55, 0x54, 0x54, 0x58,
|
||||
0x00, 0x00, 0x45, 0x7C, 0x41,
|
||||
0x00, 0x02, 0x45, 0x7D, 0x42,
|
||||
0x00, 0x01, 0x45, 0x7C, 0x40,
|
||||
0xF0, 0x29, 0x24, 0x29, 0xF0,
|
||||
0xF0, 0x28, 0x25, 0x28, 0xF0,
|
||||
0x7C, 0x54, 0x55, 0x45, 0x00,
|
||||
0x20, 0x54, 0x54, 0x7C, 0x54,
|
||||
0x7C, 0x0A, 0x09, 0x7F, 0x49,
|
||||
0x32, 0x49, 0x49, 0x49, 0x32,
|
||||
0x32, 0x48, 0x48, 0x48, 0x32,
|
||||
0x32, 0x4A, 0x48, 0x48, 0x30,
|
||||
0x3A, 0x41, 0x41, 0x21, 0x7A,
|
||||
0x3A, 0x42, 0x40, 0x20, 0x78,
|
||||
0x00, 0x9D, 0xA0, 0xA0, 0x7D,
|
||||
0x39, 0x44, 0x44, 0x44, 0x39,
|
||||
0x3D, 0x40, 0x40, 0x40, 0x3D,
|
||||
0x3C, 0x24, 0xFF, 0x24, 0x24,
|
||||
0x48, 0x7E, 0x49, 0x43, 0x66,
|
||||
0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
|
||||
0xFF, 0x09, 0x29, 0xF6, 0x20,
|
||||
0xC0, 0x88, 0x7E, 0x09, 0x03,
|
||||
0x20, 0x54, 0x54, 0x79, 0x41,
|
||||
0x00, 0x00, 0x44, 0x7D, 0x41,
|
||||
0x30, 0x48, 0x48, 0x4A, 0x32,
|
||||
0x38, 0x40, 0x40, 0x22, 0x7A,
|
||||
0x00, 0x7A, 0x0A, 0x0A, 0x72,
|
||||
0x7D, 0x0D, 0x19, 0x31, 0x7D,
|
||||
0x26, 0x29, 0x29, 0x2F, 0x28,
|
||||
0x26, 0x29, 0x29, 0x29, 0x26,
|
||||
0x30, 0x48, 0x4D, 0x40, 0x20,
|
||||
0x38, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x38,
|
||||
0x2F, 0x10, 0xC8, 0xAC, 0xBA,
|
||||
0x2F, 0x10, 0x28, 0x34, 0xFA,
|
||||
0x00, 0x00, 0x7B, 0x00, 0x00,
|
||||
0x08, 0x14, 0x2A, 0x14, 0x22,
|
||||
0x22, 0x14, 0x2A, 0x14, 0x08,
|
||||
0xAA, 0x00, 0x55, 0x00, 0xAA,
|
||||
0xAA, 0x55, 0xAA, 0x55, 0xAA,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00,
|
||||
0x10, 0x10, 0x10, 0xFF, 0x00,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x00,
|
||||
0x10, 0x10, 0xFF, 0x00, 0xFF,
|
||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
||||
0x14, 0x14, 0x14, 0xFC, 0x00,
|
||||
0x14, 0x14, 0xF7, 0x00, 0xFF,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x14, 0x14, 0xF4, 0x04, 0xFC,
|
||||
0x14, 0x14, 0x17, 0x10, 0x1F,
|
||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||
0x14, 0x14, 0x14, 0x1F, 0x00,
|
||||
0x10, 0x10, 0x10, 0xF0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0xF0, 0x10,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0xFF, 0x10,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x14,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x1F, 0x10, 0x17,
|
||||
0x00, 0x00, 0xFC, 0x04, 0xF4,
|
||||
0x14, 0x14, 0x17, 0x10, 0x17,
|
||||
0x14, 0x14, 0xF4, 0x04, 0xF4,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
||||
0x14, 0x14, 0xF7, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x17, 0x14,
|
||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||
0x14, 0x14, 0x14, 0xF4, 0x14,
|
||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
||||
0x00, 0x00, 0x1F, 0x10, 0x1F,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x14,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x14,
|
||||
0x00, 0x00, 0xF0, 0x10, 0xF0,
|
||||
0x10, 0x10, 0xFF, 0x10, 0xFF,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x14,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF0, 0x10,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0xFF,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x38, 0x44, 0x44, 0x38, 0x44,
|
||||
0x7C, 0x2A, 0x2A, 0x3E, 0x14,
|
||||
0x7E, 0x02, 0x02, 0x06, 0x06,
|
||||
0x02, 0x7E, 0x02, 0x7E, 0x02,
|
||||
0x63, 0x55, 0x49, 0x41, 0x63,
|
||||
0x38, 0x44, 0x44, 0x3C, 0x04,
|
||||
0x40, 0x7E, 0x20, 0x1E, 0x20,
|
||||
0x06, 0x02, 0x7E, 0x02, 0x02,
|
||||
0x99, 0xA5, 0xE7, 0xA5, 0x99,
|
||||
0x1C, 0x2A, 0x49, 0x2A, 0x1C,
|
||||
0x4C, 0x72, 0x01, 0x72, 0x4C,
|
||||
0x30, 0x4A, 0x4D, 0x4D, 0x30,
|
||||
0x30, 0x48, 0x78, 0x48, 0x30,
|
||||
0xBC, 0x62, 0x5A, 0x46, 0x3D,
|
||||
0x3E, 0x49, 0x49, 0x49, 0x00,
|
||||
0x7E, 0x01, 0x01, 0x01, 0x7E,
|
||||
0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
|
||||
0x44, 0x44, 0x5F, 0x44, 0x44,
|
||||
0x40, 0x51, 0x4A, 0x44, 0x40,
|
||||
0x40, 0x44, 0x4A, 0x51, 0x40,
|
||||
0x00, 0x00, 0xFF, 0x01, 0x03,
|
||||
0xE0, 0x80, 0xFF, 0x00, 0x00,
|
||||
0x08, 0x08, 0x6B, 0x6B, 0x08,
|
||||
0x36, 0x12, 0x36, 0x24, 0x36,
|
||||
0x06, 0x0F, 0x09, 0x0F, 0x06,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x10, 0x10, 0x00,
|
||||
0x30, 0x40, 0xFF, 0x01, 0x01,
|
||||
0x00, 0x1F, 0x01, 0x01, 0x1E,
|
||||
0x00, 0x19, 0x1D, 0x17, 0x12,
|
||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
127
drivers/qwiic/util/font8x16.h
Normal file
127
drivers/qwiic/util/font8x16.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/******************************************************************************
|
||||
font8x16.h
|
||||
Definition for medium font
|
||||
|
||||
This file was imported from the MicroView library, written by GeekAmmo
|
||||
(https://github.com/geekammo/MicroView-Arduino-Library), and released 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Modified by:
|
||||
Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
July 27, 2015
|
||||
https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char font8x16[] PROGMEM = {
|
||||
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
||||
8,16,32,96,2,56,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00,
|
||||
0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00,
|
||||
0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00,
|
||||
0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00,
|
||||
0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00,
|
||||
0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00,
|
||||
0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00,
|
||||
0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00,
|
||||
0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
|
||||
0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00,
|
||||
0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00,
|
||||
0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00,
|
||||
0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
|
||||
0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00,
|
||||
0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
|
||||
0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00,
|
||||
0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00,
|
||||
0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00,
|
||||
0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00,
|
||||
0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
|
||||
0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00,
|
||||
0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00,
|
||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00,
|
||||
0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,
|
||||
0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00,
|
||||
0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00,
|
||||
0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00,
|
||||
0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00,
|
||||
0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
@@ -2,5 +2,5 @@
|
||||
"keyboard_name": "IBM 5291",
|
||||
"keyboard_folder": "converter/5291",
|
||||
"url": "https://deskthority.net/wiki/IBM_Model_F#IBM_5291_Keyboard",
|
||||
"maintainer": "listofoptions",
|
||||
"maintainer": "listofoptions"
|
||||
}
|
||||
|
24
keyboards/crkbd/keymaps/edvorakjp/config.h
Normal file
24
keyboards/crkbd/keymaps/edvorakjp/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define SSD1306OLED
|
||||
#define SWAP_SCLN
|
||||
|
||||
// #define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 120
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_LIMIT_VAL 100
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
#endif // CONFIG_USER_H
|
158
keyboards/crkbd/keymaps/edvorakjp/keymap.c
Normal file
158
keyboards/crkbd/keymaps/edvorakjp/keymap.c
Normal file
@@ -0,0 +1,158 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "oled.h"
|
||||
#endif
|
||||
|
||||
#include "edvorakjp.h"
|
||||
|
||||
/*
|
||||
* enum custom_keycodes {
|
||||
* KC_LOCK = NEW_SAFE_RANGE,
|
||||
* };
|
||||
*/
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_TMB1 LGUI_T(KC_TAB)
|
||||
#define KC_TMB2 LSFT_T(KC_SPC)
|
||||
#define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped
|
||||
#define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped
|
||||
#define KC_TMB5 RCTL_T(KC_BSPC)
|
||||
#define KC_TMB6 RALT_T(KC_ENT)
|
||||
#define KC_TMB7 KC_DEL
|
||||
#define KC_TMB8 RALT(KC_ENT)
|
||||
#define KC_TMB9 LGUI(KC_TAB)
|
||||
|
||||
#define KC_RST RESET
|
||||
#define KC_DBUG DEBUG
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_EDJP EDVORAK
|
||||
#define KC_QWER QWERTY
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_EDVORAK] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
ESC ,QUOT,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
EQL , A , O , E , I , U , D , T , N , S , M ,MINS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
GRV ,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH,
|
||||
//`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
TMB1,TMB2,TMB3, TMB4,TMB5,TMB6
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_EDVORAKJ1] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, AI , OU , EI , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , Y , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,ANN ,ONN ,ENN ,INN ,UNN , , , , , , ,
|
||||
//`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_EDVORAKJ2] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, AI , OU , EI , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , Y , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,ANN ,ONN ,ENN ,INN ,UNN , , , , , , ,
|
||||
//`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_QWERTY] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
EQL , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
GRV , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS,
|
||||
//`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, 1 ,EXLM, AT ,HASH,DLR , PERC,CIRC,AMPR,ASTR, 0 , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , LT ,LCBR,LPRN,LBRC, RBRC,RPRN,RCBR, GT , , ,
|
||||
//`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
, , , ,TMB7,TMB8
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,F11 ,F12 ,PSCR,SLCK,PAUS, ,HOME,PGDN,PGUP,END , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , ,LEFT,DOWN, UP ,RGHT, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
TMB9, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_kc(
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , ,EXTOFF, , ,EXTON, , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , ,QWER,WIN ,RST , RTOG,MAC ,EDJP, , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
//`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
|
||||
, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void matrix_init_keymap(void) {
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
uint32_t layer_state_set_keymap(uint32_t state) {
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
switch (biton32(state)) {
|
||||
case _EDVORAKJ1:
|
||||
case _EDVORAKJ2:
|
||||
// _EDVORAKJ1 & J2 are same colored
|
||||
rgblight_sethsv_noeeprom_white();
|
||||
break;
|
||||
case _LOWER:
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
break;
|
||||
case _RAISE:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
break;
|
||||
case _ADJUST:
|
||||
rgblight_sethsv_noeeprom_green();
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
#endif
|
82
keyboards/crkbd/keymaps/edvorakjp/oled.c
Normal file
82
keyboards/crkbd/keymaps/edvorakjp/oled.c
Normal file
@@ -0,0 +1,82 @@
|
||||
#include <string.h>
|
||||
#include "oled.h"
|
||||
|
||||
// NOTE: Redefined to avoid to use snprintf(); It makes size of firmware big.
|
||||
const char *read_mode_icon(bool windows_mode) {
|
||||
static const char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}};
|
||||
static char mode_icon[10];
|
||||
|
||||
int mode_number = windows_mode ? 1 : 0;
|
||||
strcpy(mode_icon, logo[mode_number][0]);
|
||||
|
||||
strcat(mode_icon, "\n");
|
||||
strcat(mode_icon, logo[mode_number][1]);
|
||||
|
||||
return mode_icon;
|
||||
}
|
||||
|
||||
const char *read_layer_state(void) {
|
||||
static char layer_state_str[24];
|
||||
char layer_name[17];
|
||||
|
||||
switch (biton32(layer_state)) {
|
||||
case L_BASE:
|
||||
strcpy(layer_name, default_layer_state == 1UL<<_EDVORAK ? "EDVORAK" : "QWERTY");
|
||||
break;
|
||||
case _EDVORAKJ1:
|
||||
case _EDVORAKJ2:
|
||||
strcpy(layer_name, "JP_EXT");
|
||||
break;
|
||||
case _RAISE:
|
||||
strcpy(layer_name, "Raise");
|
||||
break;
|
||||
case _LOWER:
|
||||
strcpy(layer_name, "Lower");
|
||||
break;
|
||||
case _ADJUST:
|
||||
strcpy(layer_name, "Adjust");
|
||||
break;
|
||||
default:
|
||||
snprintf(layer_name, sizeof(layer_name), "Undef-%ld", layer_state);
|
||||
}
|
||||
|
||||
strcpy(layer_state_str, "Layer: ");
|
||||
|
||||
strcat(layer_state_str, layer_name);
|
||||
strcat(layer_state_str, "\n");
|
||||
return layer_state_str;
|
||||
}
|
||||
|
||||
const char *read_host_led_state(void) {
|
||||
static char led_str[24];
|
||||
bool ext_status = get_enable_jp_extra_layer() && get_japanese_mode();
|
||||
strcpy(led_str, ext_status ? "EXT" : " ");
|
||||
|
||||
strcat(led_str, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? " NMLK" : " ");
|
||||
strcat(led_str, (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? " CAPS" : " ");
|
||||
strcat(led_str, (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? " SCLK" : " ");
|
||||
return led_str;
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if (is_master) {
|
||||
matrix_write(&matrix, read_mode_icon(!get_enable_kc_lang()));
|
||||
matrix_write(&matrix, " ");
|
||||
matrix_write(&matrix, read_layer_state());
|
||||
matrix_write(&matrix, read_host_led_state());
|
||||
} else {
|
||||
matrix_write(&matrix, read_logo());
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
24
keyboards/crkbd/keymaps/edvorakjp/oled.h
Normal file
24
keyboards/crkbd/keymaps/edvorakjp/oled.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef OLED_USER_H
|
||||
#define OLED_USER_H
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#include "ssd1306.h"
|
||||
#include "edvorakjp.h"
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
|
||||
extern uint8_t is_master;
|
||||
extern bool japanese_mode;
|
||||
|
||||
// method prototypes defined in crkbd/lib
|
||||
extern const char *read_logo(void);
|
||||
|
||||
const char *read_mode_icon(bool swap);
|
||||
const char *read_layer_state(void);
|
||||
const char *read_host_led_state(void);
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source);
|
||||
void iota_gfx_task_user(void);
|
||||
|
||||
#endif // OLED_CONFIG_USER_H
|
21
keyboards/crkbd/keymaps/edvorakjp/readme.md
Normal file
21
keyboards/crkbd/keymaps/edvorakjp/readme.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# edvorakjp
|
||||
|
||||
Epaew's Enhanced Dvorak layout for Japanese Programmer
|
||||
see [here](/users/edvorakjp) for more informations.
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew
|
||||
|
||||
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/>.
|
32
keyboards/crkbd/keymaps/edvorakjp/rules.mk
Normal file
32
keyboards/crkbd/keymaps/edvorakjp/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ./lib/glcdfont.c \
|
||||
./lib/logo_reader.c \
|
||||
oled.c \
|
||||
# ./lib/rgb_state_reader.c \
|
||||
# ./lib/layer_state_reader.c \
|
||||
# ./lib/keylogger.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
@@ -39,6 +39,20 @@ inline void setdefaultrgb(void){ rgblight_sethsv(100,100,100); }
|
||||
{ K40, K41, K42, KC_NO,KC_NO,K45, K46, K47, KC_NO,KC_NO,K4A, K4B, K4C, K4D, K4E } \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_hhkb( \
|
||||
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, K1E, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
|
||||
K41, K42, K46, K4A, K4B \
|
||||
) { \
|
||||
{ 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, KC_NO, K1E }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, KC_NO, K2E }, \
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
|
||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_ansi( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \
|
||||
|
@@ -9,6 +9,10 @@
|
||||
"layout": [{"label":"Esc", "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":"~", "x":13, "y":0}, {"label":"\u2190", "x":14, "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"x":12, "y":3}, {"label":"\u2191", "x":13, "y":3}, {"label":"Del", "x":14, "y":3}, {"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}, {"label":"3u(Space)", "x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4}, {"label":"3u(Space)", "x":7.5, "y":4, "w":2.25}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"win", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_hhkb": {
|
||||
"layout": [{"label":"Esc", "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "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":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}]
|
||||
},
|
||||
|
||||
"LAYOUT_chiwi60_default": {
|
||||
"layout": [{"label":"Esc", "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":"~", "x":13, "y":0}, {"label":"\u2190", "x":14, "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, "w":1.75}, {"label":"\u2191", "x":13, "y":3}, {"label":"Del", "x":14, "y":3}, {"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}, {"label":"3u(Space)", "x":3.75, "y":4, "w":3}, {"label":"3u(Space)", "x":6.75, "y":4, "w":3}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"win", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}]
|
||||
},
|
||||
|
@@ -1,11 +1,14 @@
|
||||
# QMK Firmware for DoyuStudio DO60 PCB
|
||||
# DoyuStudio DO60 PCB
|
||||
|
||||
|
||||
## Quantum MK Firmware
|
||||
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
||||
|
||||
Board supports in-switch LEDs (two-pin, single colour)
|
||||
60% board supporting in-switch LEDs (two-pin, single colour)
|
||||
Build-in WS2182 RGB LED for underglow lighting.
|
||||
|
||||
## Build
|
||||
To build the default keymap, simply run `make do60:default`.
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: Doyu Studios 60% PCB
|
||||
Hardware Availability: [Doyustudio](https://shopkey.doyustudio.com/001pcb60)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make do60: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).
|
@@ -63,4 +63,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
|
||||
LAYOUTS = 60_ansi 60_ansi_split_bs_rshift
|
||||
LAYOUTS = 60_ansi 60_hhkb 60_ansi_split_bs_rshift
|
@@ -33,28 +33,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = LAYOUT_ergodox( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
[BASE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC, KC_BSPC, KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
@@ -76,26 +74,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
RGB_MOD,KC_TRNS,
|
||||
KC_TRNS,
|
||||
RGB_VAD,RGB_VAI,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
RGB_TOG, RGB_SLD,
|
||||
KC_TRNS,
|
||||
KC_TRNS, RGB_HUD, RGB_HUI
|
||||
// left hand
|
||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
|
||||
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
|
||||
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS,
|
||||
EPRM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RGB_MOD, KC_TRNS,
|
||||
KC_TRNS,
|
||||
RGB_VAD, RGB_VAI, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
RGB_TOG, RGB_SLD,
|
||||
KC_TRNS,
|
||||
KC_TRNS, RGB_HUD, RGB_HUI
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
@@ -118,25 +115,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = LAYOUT_ergodox(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
// left hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
|
2
keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore
vendored
Normal file
2
keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
package-lock.json
|
82
keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
Normal file
82
keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
Set any config.h overrides for your specific keymap here.
|
||||
See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
/* Keyboard Settings */
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 150
|
||||
|
||||
#undef DEBOUNCE
|
||||
#define DEBOUNCE 10
|
||||
|
||||
#undef IGNORE_MOD_TAP_INTERRUPT
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#undef FORCE_NKRO
|
||||
#define FORCE_NKRO
|
||||
|
||||
/* This isn't defined by default, so there is no need to undefine it first. */
|
||||
#define LEADER_TIMEOUT 500
|
||||
#define PERMISSIVE_HOLD
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
|
||||
|
||||
// RGB Lights
|
||||
#undef RGBLIGHT_HUE_STEP
|
||||
#define RGBLIGHT_HUE_STEP 24
|
||||
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 24
|
||||
|
||||
#undef RGBLIGHT_VAL_STEP
|
||||
#define RGBLIGHT_VAL_STEP 24
|
||||
|
||||
#undef RGBLIGHT_BRI_STEP
|
||||
#define RGBLIGHT_BRI_STEP 24
|
||||
|
||||
#undef RGBLIGHT_LIMIT_VAL
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
|
||||
/* This isn't defined by default, so there is no need to undefine it first. */
|
||||
#define RGBLIGHT_SLEEP
|
||||
|
||||
|
||||
// Mouse
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#define MOUSEKEY_INTERVAL 10
|
||||
|
||||
#undef MOUSEKEY_DELAY
|
||||
#define MOUSEKEY_DELAY 15
|
||||
|
||||
#undef MOUSEKEY_MAX_SPEED
|
||||
#define MOUSEKEY_MAX_SPEED 15
|
||||
|
||||
#undef MOUSEKEY_TIME_TO_MAX
|
||||
#define MOUSEKEY_TIME_TO_MAX 150
|
||||
|
||||
#undef MOUSEKEY_WHEEL_MAX_SPEED
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 15
|
||||
|
||||
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 150
|
||||
|
||||
|
||||
/* This is defined only if CONSOLE_ENABLE is set to "yes" */
|
||||
// #undef NO_DEBUG
|
||||
// #define NO_DEBUG
|
||||
|
||||
// #undef NO_PRINT
|
||||
// #define NO_PRINT
|
||||
|
||||
/* For COMBO only*/
|
||||
// #define COMBO_COUNT 1
|
||||
// #define COMBO_TERM 200
|
||||
|
||||
/* For tap toggle */
|
||||
// #define TAPPING_TOGGLE 2
|
||||
// #define ONESHOT_TAP_TOGGLE 2
|
||||
// #define ONESHOT_TIMEOUT 300
|
||||
|
@@ -0,0 +1 @@
|
||||
https://i.imgur.com/fKX0Zbs.png
|
@@ -0,0 +1 @@
|
||||
https://i.imgur.com/giAc3M9.jpg
|
13
keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js
Normal file
13
keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js
Normal file
@@ -0,0 +1,13 @@
|
||||
let gulp = require('gulp');
|
||||
let run = require('gulp-run-command').default;
|
||||
|
||||
|
||||
gulp.task('clean', run('rm -rf ../../../../.build'));
|
||||
|
||||
gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak', {
|
||||
ignoreErrors: true
|
||||
}));
|
||||
|
||||
gulp.task('watch', ['build'], () => {
|
||||
gulp.watch(['keymap.c', 'config.h', 'rules.mk'], ['build']);
|
||||
});
|
781
keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c
Normal file
781
keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c
Normal file
@@ -0,0 +1,781 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_dvorak.h"
|
||||
#include "sendstring_dvorak.h"
|
||||
#include "keymap_plover.h"
|
||||
#include "keymap_plover_dvorak.h"
|
||||
|
||||
|
||||
#define SCTL(kc) LSFT(LCTL(kc))
|
||||
|
||||
// Layers
|
||||
enum layers {
|
||||
DVORAK_US = 0,
|
||||
PLOVER_US,
|
||||
GAMING_US,
|
||||
ARROWS_US,
|
||||
MOUSE_US,
|
||||
NUMPAD_US,
|
||||
LAYERS_US,
|
||||
DVORAK_DV,
|
||||
PLOVER_DV,
|
||||
GAMING_DV,
|
||||
ARROWS_DV,
|
||||
MOUSE_DV,
|
||||
NUMPAD_DV,
|
||||
LAYERS_DV,
|
||||
MEDIA_FN,
|
||||
HYPER_FN,
|
||||
MEH_FN,
|
||||
MEH_FN_PLUS,
|
||||
FIRMWARE
|
||||
};
|
||||
|
||||
int CAPS_LOCK = 0;
|
||||
int NUM_LOCK = 0;
|
||||
int SCROLL_LOCK = 0;
|
||||
|
||||
enum tap_dances {
|
||||
TD_ESC_CAPS = 0
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CLCK)
|
||||
};
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
RGB_GREEN // to set default RGB layer as green once
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | 14 | 15 | 16 | 17 | 18 | 19 |------| |------| 52 | 53 | 54 | 55 | 56 | 57 |
|
||||
* |--------+------+------+------+------+------| 26 | | 58 |------+------+------+------+------+--------|
|
||||
* | 20 | 21 | 22 | 23 | 24 | 25 | | | | 59 | 60 | 61 | 62 | 63 | 64 |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | 27 | 28 | 29 | 30 | 31 | | 65 | 66 | 67 | 68 | 69 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | 32 | 33 | | 70 | 71 |
|
||||
* ,------+------+------| |------+------+------.
|
||||
* | | | 34 | | 72 | | |
|
||||
* | 35 | 36 |------| |------| 74 | 75 |
|
||||
* | | | 37 | | 73 | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[DVORAK_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_ESC, KC_LABK, KC_LCBR, KC_LBRC, KC_LPRN, KC_EXLM, KC_AMPR,
|
||||
KC_TAB, KC_QUOT, SCMD_T(KC_COMM), MEH_T(KC_DOT), ALL_T(KC_P), KC_Y, KC_AT,
|
||||
KC_EQL, CTL_T(KC_A), SFT_T(KC_O), LT(NUMPAD_US, KC_E), LT(ARROWS_US, KC_U), KC_I,
|
||||
KC_BSLS, ALGR_T(KC_SCLN), ALT_T(KC_Q), LT(MEDIA_FN, KC_J), GUI_T(KC_K), KC_X, KC_PERC,
|
||||
MO(MEH_FN), TG(LAYERS_US), KC_CIRC, KC_PLUS, KC_COLN,
|
||||
|
||||
// left thumb
|
||||
KC_LEFT, KC_RGHT,
|
||||
KC_HOME,
|
||||
KC_SPC, KC_BSPC, KC_END,
|
||||
|
||||
// right hand
|
||||
KC_PIPE, KC_QUES, KC_RPRN, KC_RBRC, KC_RCBR, KC_RABK, KC_ASTR,
|
||||
KC_HASH, KC_F, ALL_T(KC_G), MEH_T(KC_C), SCMD_T(KC_R), KC_L, KC_SLSH,
|
||||
KC_D, LT(MOUSE_US, KC_H), LT(HYPER_FN, KC_T), SFT_T(KC_N), CTL_T(KC_S), KC_MINS,
|
||||
KC_DLR, KC_B, GUI_T(KC_M), LT(MEDIA_FN, KC_W), ALT_T(KC_V), ALGR_T(KC_Z), KC_GRV,
|
||||
KC_DQUO, KC_UNDS, KC_TILD, TG(DVORAK_DV), MO(MEH_FN_PLUS),
|
||||
|
||||
// right thumb
|
||||
KC_UP, KC_DOWN,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_DEL, KC_ENT
|
||||
),
|
||||
|
||||
[PLOVER_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO),
|
||||
KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PV_NUM,
|
||||
KC_TAB, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
|
||||
KC_CLCK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
|
||||
MO(MEH_FN), TG(LAYERS_US), PV_NUM, PV_NUM, PV_NUM,
|
||||
|
||||
// left thumb
|
||||
KC_SPACE, KC_BSPACE,
|
||||
KC_HOME,
|
||||
PV_A, PV_O, KC_END,
|
||||
|
||||
// right hand
|
||||
KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP,
|
||||
PV_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN,
|
||||
PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
|
||||
PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
|
||||
PV_NUM, PV_NUM, PV_NUM, PV_NUM, MO(MEH_FN_PLUS),
|
||||
|
||||
// right thumb
|
||||
KC_DELETE, KC_ENTER,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, PV_E, PV_U
|
||||
),
|
||||
|
||||
[GAMING_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_ESCAPE, GUI_T(KC_MINS), KC_I, KC_O, KC_P, ALGR_T(KC_EQL), KC_T,
|
||||
KC_TAB, KC_LALT, KC_Q, KC_W, KC_E, ALL_T(KC_R), KC_G,
|
||||
LT(MOUSE_US, KC_GRV), KC_LCTRL, KC_A, KC_S, KC_D, MEH_T(KC_F),
|
||||
KC_BSLS, KC_LSHIFT, KC_Z, KC_X, KC_C, SCMD_T(KC_V), KC_M,
|
||||
MO(MEH_FN), TG(LAYERS_US), KC_COMM, KC_DOT, KC_LBRC,
|
||||
|
||||
// left thumb
|
||||
MO(MEDIA_FN), KC_NLCK,
|
||||
KC_SCLN,
|
||||
KC_SPACE, KC_ENTER, KC_BSPACE,
|
||||
|
||||
// right hand
|
||||
KC_QUOT, KC_Y, KC_K, KC_U, KC_KP_7, KC_KP_8, KC_KP_9,
|
||||
KC_MS_WH_UP, KC_H, KC_J, KC_L, KC_KP_4, KC_KP_2, KC_KP_6,
|
||||
KC_B, KC_MS_UP, KC_N, KC_KP_1, KC_KP_5, KC_KP_3,
|
||||
KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, KC_SLASH,
|
||||
KC_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, MO(MEH_FN_PLUS),
|
||||
|
||||
// right thumb
|
||||
KC_MS_BTN5, MO(HYPER_FN),
|
||||
KC_MS_BTN4,
|
||||
KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1
|
||||
),
|
||||
|
||||
[ARROWS_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX,
|
||||
XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
// right hand
|
||||
LGUI(KC_X), XXXXXXX, LCTL(KC_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
LGUI(KC_C), XXXXXXX, LCTL(KC_C), KC_UP, SCTL(KC_C), LCTL(KC_Z), LGUI(KC_Z),
|
||||
KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION,
|
||||
LGUI(KC_V), XXXXXXX, LCTL(KC_V), KC_MS_WH_DOWN, SCTL(KC_V), LCTL(KC_Y), SGUI(KC_Z),
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
[MOUSE_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(KC_X), XXXXXXX, LGUI(KC_X),
|
||||
LGUI(KC_Z), LCTL(KC_Z), SCTL(KC_C), KC_MS_UP, LCTL(KC_C), KC_MS_BTN4, LGUI(KC_C),
|
||||
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT,
|
||||
LGUI(KC_Z), LCTL(KC_Y), SCTL(KC_V), KC_MS_WH_DOWN, LCTL(KC_V), KC_MS_BTN5, LGUI(KC_V),
|
||||
KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
KC_MS_BTN1, KC_MS_BTN2, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX,
|
||||
XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_MS_ACCEL0
|
||||
),
|
||||
|
||||
[NUMPAD_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX,
|
||||
_______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX,
|
||||
XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
// right hand
|
||||
KC_X, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
|
||||
KC_O, KC_I, KC_1, KC_2, KC_3, KC_SLSH, KC_PERC,
|
||||
KC_M, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS,
|
||||
KC_L, KC_J, KC_7, KC_8, KC_9, KC_ASTR, KC_CIRC,
|
||||
KC_DOT, KC_0, KC_COMM, KC_UNDS, KC_BSLS,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
[LAYERS_US] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, TO(DVORAK_US), TO(PLOVER_US), TO(GAMING_US), XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[DVORAK_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_ESC, DV_LABK, DV_LCBR, DV_LBRC, DV_LPRN, DV_EXLM, DV_AMPR,
|
||||
KC_TAB, DV_QUOT, SCMD_T(DV_COMM), MEH_T(DV_DOT), ALL_T(DV_P), DV_Y, DV_AT,
|
||||
DV_EQL, CTL_T(DV_A), SFT_T(DV_O), LT(NUMPAD_DV, DV_E), LT(ARROWS_DV, DV_U), DV_I,
|
||||
DV_BSLS, ALGR_T(DV_SCLN), ALT_T(DV_Q), LT(MEDIA_FN, DV_J), GUI_T(DV_K), DV_X, DV_PERC,
|
||||
MO(MEH_FN), TG(LAYERS_DV), DV_CIRC, DV_PLUS, DV_COLN,
|
||||
|
||||
// left thumb
|
||||
KC_LEFT, KC_RGHT,
|
||||
KC_HOME,
|
||||
KC_SPC, KC_BSPC, KC_END,
|
||||
|
||||
// right hand
|
||||
DV_PIPE, DV_QUES, DV_RPRN, DV_RBRC, DV_RCBR, DV_RABK, DV_ASTR,
|
||||
DV_HASH, DV_F, ALL_T(DV_G), MEH_T(DV_C), SCMD_T(DV_R), DV_L, DV_SLSH,
|
||||
DV_D, LT(MOUSE_DV, DV_H), LT(HYPER_FN, DV_T), SFT_T(DV_N), CTL_T(DV_S), DV_MINS,
|
||||
DV_DLR, DV_B, GUI_T(DV_M), LT(MEDIA_FN, DV_W), ALT_T(DV_V), ALGR_T(DV_Z), DV_GRV,
|
||||
DV_DQUO, DV_UNDS, DV_TILD, _______, MO(MEH_FN_PLUS),
|
||||
|
||||
// right thumb
|
||||
KC_UP, KC_DOWN,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_DEL, KC_ENT
|
||||
),
|
||||
|
||||
[PLOVER_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO),
|
||||
KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PD_NUM,
|
||||
KC_TAB, PD_LS, PD_LT, PD_LP, PD_LH, PD_STAR,
|
||||
KC_CLCK, PD_LS, PD_LK, PD_LW, PD_LR, PD_STAR, PD_STAR,
|
||||
MO(MEH_FN), TG(LAYERS_DV), PD_NUM, PD_NUM, PD_NUM,
|
||||
|
||||
// left thumb
|
||||
KC_SPACE, KC_BSPACE,
|
||||
KC_HOME,
|
||||
PD_A, PD_O, KC_END,
|
||||
|
||||
// right hand
|
||||
KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP,
|
||||
PD_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN,
|
||||
PD_STAR, PD_RF, PD_RP, PD_RL, PD_RT, PD_RD,
|
||||
PD_STAR, PD_STAR, PD_RR, PD_RB, PD_RG, PD_RS, PD_RZ,
|
||||
PD_NUM, PD_NUM, PD_NUM, PD_NUM, MO(MEH_FN_PLUS),
|
||||
|
||||
// right thumb
|
||||
KC_DELETE, KC_ENTER,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, PD_E, PD_U
|
||||
),
|
||||
|
||||
[GAMING_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_ESCAPE, GUI_T(DV_MINS), DV_I, DV_O, DV_P, ALGR_T(DV_EQL), DV_T,
|
||||
KC_TAB, KC_LALT, DV_Q, DV_W, DV_E, ALL_T(DV_R), DV_G,
|
||||
LT(MOUSE_DV, DV_GRV), KC_LCTRL, DV_A, DV_S, DV_D, MEH_T(DV_F),
|
||||
DV_BSLS, KC_LSHIFT, DV_Z, DV_X, DV_C, SCMD_T(DV_V), DV_M,
|
||||
MO(MEH_FN), TG(LAYERS_DV), DV_COMM, DV_DOT, DV_LBRC,
|
||||
|
||||
// left thumb
|
||||
MO(MEDIA_FN), KC_NLCK,
|
||||
DV_SCLN,
|
||||
KC_SPACE, KC_ENTER, KC_BSPACE,
|
||||
|
||||
// right hand
|
||||
DV_QUOT, DV_Y, DV_K, DV_U, KC_KP_7, KC_KP_8, KC_KP_9,
|
||||
KC_MS_WH_UP, DV_H, DV_J, DV_L, KC_KP_4, KC_KP_2, KC_KP_6,
|
||||
DV_B, KC_MS_UP, DV_N, KC_KP_1, KC_KP_5, KC_KP_3,
|
||||
KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, DV_SLSH,
|
||||
DV_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, MO(MEH_FN_PLUS),
|
||||
|
||||
// right thumb
|
||||
KC_MS_BTN5, MO(HYPER_FN),
|
||||
KC_MS_BTN4,
|
||||
KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1
|
||||
),
|
||||
|
||||
[ARROWS_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX,
|
||||
XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
// right hand
|
||||
LGUI(DV_X), XXXXXXX, LCTL(DV_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
LGUI(DV_C), XXXXXXX, LCTL(DV_C), KC_UP, SCTL(DV_C), LCTL(DV_Z), LGUI(DV_Z),
|
||||
KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION,
|
||||
LGUI(DV_V), XXXXXXX, LCTL(DV_V), KC_MS_WH_DOWN, SCTL(DV_V), LCTL(DV_Y), SGUI(DV_Z),
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
[MOUSE_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(DV_X), XXXXXXX, LGUI(DV_X),
|
||||
LGUI(DV_Z), LCTL(DV_Z), SCTL(DV_C), KC_MS_UP, LCTL(DV_C), KC_MS_BTN4, LGUI(DV_C),
|
||||
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT,
|
||||
LGUI(DV_Z), LCTL(DV_Y), SCTL(DV_V), KC_MS_WH_DOWN, LCTL(DV_V), KC_MS_BTN5, LGUI(DV_V),
|
||||
KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
KC_MS_BTN1, KC_MS_BTN2, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX,
|
||||
XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_MS_ACCEL0
|
||||
),
|
||||
|
||||
[NUMPAD_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX,
|
||||
_______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX,
|
||||
XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
// right hand
|
||||
DV_X, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F,
|
||||
DV_O, DV_I, DV_1, DV_2, DV_3, DV_SLSH, DV_PERC,
|
||||
DV_M, DV_4, DV_5, DV_6, DV_PLUS, DV_MINS,
|
||||
DV_L, DV_J, DV_7, DV_8, DV_9, DV_ASTR, DV_CIRC,
|
||||
DV_DOT, DV_0, DV_COMM, DV_UNDS, DV_BSLS,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
[LAYERS_DV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, TO(DVORAK_DV), TO(PLOVER_DV), TO(GAMING_DV), XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[MEDIA_FN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, RGB_TOG, XXXXXXX, KC_MAIL, KC_FIND, KC_WWW_REFRESH,
|
||||
KC_MEDIA_PREV_TRACK, KC_F9, KC_F7, KC_F5, KC_F3, KC_F1, KC_WWW_HOME,
|
||||
KC_PAUSE, KC_F19, KC_F17, KC_F15, KC_F13, KC_F11,
|
||||
RGB_HUD, XXXXXXX, XXXXXXX, _______, KC_F23, KC_F21, KC_WWW_BACK,
|
||||
RGB_VAD, KC_CLCK, KC_PSCREEN, XXXXXXX, MO(FIRMWARE),
|
||||
|
||||
// left thumb
|
||||
_______, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_MEDIA_EJECT,
|
||||
|
||||
// right hand
|
||||
KC_WWW_FAVORITES, KC_MY_COMPUTER, KC_CALCULATOR, XXXXXXX, RGB_MOD, RGB_M_P, KC_AUDIO_VOL_UP,
|
||||
KC_WWW_SEARCH, KC_F2, KC_F4, KC_F6, KC_F8, KC_F10, KC_MEDIA_NEXT_TRACK,
|
||||
KC_F12, KC_F14, KC_F16, KC_F18, KC_F20, KC_MEDIA_PLAY_PAUSE,
|
||||
KC_WWW_FORWARD, KC_F22, KC_F24, _______, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||
KC_SYSTEM_POWER, XXXXXXX, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, RGB_VAI,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
RGB_GREEN, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[HYPER_FN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), XXXXXXX,
|
||||
XXXXXXX, HYPR(KC_F6), HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), XXXXXXX,
|
||||
XXXXXXX, HYPR(KC_F11), HYPR(KC_F12), HYPR(KC_F13), HYPR(KC_F14), HYPR(KC_F15),
|
||||
XXXXXXX, HYPR(KC_F16), HYPR(KC_F17), HYPR(KC_F18), HYPR(KC_F19), HYPR(KC_F20), XXXXXXX,
|
||||
XXXXXXX, HYPR(KC_F21), HYPR(KC_F22), HYPR(KC_F23), HYPR(KC_F24),
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, _______,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[MEH_FN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
LCA(KC_F11), LCA(KC_F9), LCA(KC_F7), LCA(KC_F5), LCA(KC_F3), LCA(KC_F1), XXXXXXX,
|
||||
LCAG(KC_F11), LCAG(KC_F9), LCAG(KC_F7), LCAG(KC_F5), LCAG(KC_F3), LCAG(KC_F1), XXXXXXX,
|
||||
MEH(KC_F11), MEH(KC_F9), MEH(KC_F7), MEH(KC_F5), MEH(KC_F3), MEH(KC_F1),
|
||||
SGUI(KC_F11), SGUI(KC_F9), SGUI(KC_F7), SGUI(KC_F5), SGUI(KC_F3), SGUI(KC_F1), XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, LCA(KC_F2), LCA(KC_F4), LCA(KC_F6), LCA(KC_F8), LCA(KC_F10), LCA(KC_F12),
|
||||
XXXXXXX, LCAG(KC_F2), LCAG(KC_F4), LCAG(KC_F6), LCAG(KC_F8), LCAG(KC_F10), LCAG(KC_F12),
|
||||
MEH(KC_F2), MEH(KC_F4), MEH(KC_F6), MEH(KC_F8), MEH(KC_F10), MEH(KC_F12),
|
||||
XXXXXXX, SGUI(KC_F2), SGUI(KC_F4), SGUI(KC_F6), SGUI(KC_F8), SGUI(KC_F10), SGUI(KC_F12),
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[MEH_FN_PLUS] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
LCA(KC_F23), LCA(KC_F21), LCA(KC_F19), LCA(KC_F17), LCA(KC_F15), LCA(KC_F13), XXXXXXX,
|
||||
LCAG(KC_F23), LCAG(KC_F21), LCAG(KC_F19), LCAG(KC_F17), LCAG(KC_F15), LCAG(KC_F13), XXXXXXX,
|
||||
MEH(KC_F23), MEH(KC_F21), MEH(KC_F19), MEH(KC_F17), MEH(KC_F15), MEH(KC_F13),
|
||||
SGUI(KC_F23), SGUI(KC_F21), SGUI(KC_F19), SGUI(KC_F17), SGUI(KC_F15), SGUI(KC_F13), XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, LCA(KC_F14), LCA(KC_F16), LCA(KC_F18), LCA(KC_F20), LCA(KC_F22), LCA(KC_F24),
|
||||
XXXXXXX, LCAG(KC_F14), LCAG(KC_F16), LCAG(KC_F18), LCAG(KC_F20), LCAG(KC_F22), LCAG(KC_F24),
|
||||
MEH(KC_F14), MEH(KC_F16), MEH(KC_F18), MEH(KC_F20), MEH(KC_F22), MEH(KC_F24),
|
||||
XXXXXXX, SGUI(KC_F14), SGUI(KC_F16), SGUI(KC_F18), SGUI(KC_F20), SGUI(KC_F22), SGUI(KC_F24),
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[FIRMWARE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
|
||||
// left thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
RESET, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right hand
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// right thumb
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, EEP_RST
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case RGB_GREEN:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_sethsv_red();
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
case KC_CLCK:
|
||||
if (record->event.pressed) {
|
||||
if (!(CAPS_LOCK)) {
|
||||
ergodox_right_led_1_on();
|
||||
CAPS_LOCK = 1;
|
||||
} else {
|
||||
ergodox_right_led_1_off();
|
||||
CAPS_LOCK = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case KC_NLCK:
|
||||
if (record->event.pressed) {
|
||||
if (!(NUM_LOCK)) {
|
||||
ergodox_right_led_2_on();
|
||||
NUM_LOCK = 1;
|
||||
} else {
|
||||
ergodox_right_led_2_off();
|
||||
NUM_LOCK = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case KC_SLCK:
|
||||
if (record->event.pressed) {
|
||||
if (!(SCROLL_LOCK)) {
|
||||
ergodox_right_led_3_on();
|
||||
SCROLL_LOCK = 1;
|
||||
} else {
|
||||
ergodox_right_led_3_off();
|
||||
SCROLL_LOCK = 0;
|
||||
}
|
||||
}
|
||||
|
||||
case KC_MS_WH_LEFT:
|
||||
if (record->event.pressed) {
|
||||
if (SCROLL_LOCK) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
case KC_MS_WH_UP:
|
||||
if (record->event.pressed) {
|
||||
if (SCROLL_LOCK) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
case KC_MS_WH_DOWN:
|
||||
if (record->event.pressed) {
|
||||
if (SCROLL_LOCK) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
case KC_MS_WH_RIGHT:
|
||||
if (record->event.pressed) {
|
||||
if (SCROLL_LOCK) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
uint8_t layer = biton32(state);
|
||||
|
||||
switch (layer) {
|
||||
case DVORAK_US:
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
|
||||
break;
|
||||
|
||||
case PLOVER_US:
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||
|
||||
break;
|
||||
|
||||
case GAMING_US:
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||
|
||||
break;
|
||||
|
||||
case ARROWS_US:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case MOUSE_US:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case NUMPAD_US:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case LAYERS_US:
|
||||
rgblight_sethsv_noeeprom_cyan();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case DVORAK_DV:
|
||||
rgblight_sethsv_noeeprom_green();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
break;
|
||||
|
||||
case PLOVER_DV:
|
||||
rgblight_sethsv_noeeprom_green();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||
|
||||
break;
|
||||
|
||||
case GAMING_DV:
|
||||
rgblight_sethsv_noeeprom_green();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||
|
||||
break;
|
||||
|
||||
case ARROWS_DV:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case MOUSE_DV:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case NUMPAD_DV:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case LAYERS_DV:
|
||||
rgblight_sethsv_noeeprom_cyan();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case MEDIA_FN:
|
||||
rgblight_sethsv_noeeprom_yellow();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case HYPER_FN:
|
||||
rgblight_sethsv_noeeprom_magenta();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
case MEH_FN:
|
||||
rgblight_sethsv_noeeprom_magenta();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 4);
|
||||
|
||||
break;
|
||||
|
||||
case MEH_FN_PLUS:
|
||||
rgblight_sethsv_noeeprom_magenta();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 5);
|
||||
|
||||
break;
|
||||
|
||||
case FIRMWARE:
|
||||
rgblight_sethsv_noeeprom_pink();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
15
keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json
Normal file
15
keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "hacker_dvorak",
|
||||
"version": "1.0.0",
|
||||
"description": "Inspired by the [*Programmer Dvorak*](https://www.kaufmann.no/roland/dvorak) keyboard layout, cherry picked ideas from other layouts in the [EZ Repository](https://configure.ergodox-ez.com/search?q=dvorak&legacy=true), a character distribution [heatmap vizualizer](https://run.plnkr.co/plunks/5EEO8nJ2wRzYAfT3), my own subjective use cases and lots of trial and error.",
|
||||
"main": "gulpfile.js",
|
||||
"scripts": {
|
||||
"test": "test"
|
||||
},
|
||||
"author": "SalchiPapa",
|
||||
"license": "GPL-2.0",
|
||||
"dependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-run-command": "0.0.9"
|
||||
}
|
||||
}
|
62
keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md
Normal file
62
keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# [Ergodox EZ Hacker Dvorak Layout](https://configure.ergodox-ez.com/layouts/Wadz/latest/0)
|
||||
|
||||
Inspired by the [*Programmer Dvorak*](https://www.kaufmann.no/roland/dvorak) keyboard layout, cherry picked ideas from other layouts in the [EZ Repository](https://configure.ergodox-ez.com/search?q=dvorak&legacy=true), a character distribution [heatmap vizualizer](https://run.plnkr.co/plunks/5EEO8nJ2wRzYAfT3), my own subjective use cases and lots of trial and error.
|
||||
|
||||
## Setup
|
||||
|
||||
Configure your OS keyboard layout to US, or the keymap will be incorrect.
|
||||
|
||||
## Limitations
|
||||
|
||||
I plan to use [QMK](https://docs.qmk.fm) in the future, in order to overcome some limitations of the Ergodox EZ [graphical configurator](https://configure.ergodox-ez.com/layouts/default/latest/0)), however I will defer that, until more progress is made to the new [configurator](https://medium.com/the-ergo/the-configurator-is-out-of-beta-e107aec80cae).
|
||||
|
||||
## Layers
|
||||
|
||||
1. Dvorak
|
||||
* US Dvorak layout.
|
||||
* All symbols (including shifted symbols).
|
||||
* All modifier are dual keys positioned near the home row.
|
||||
2. Querty
|
||||
* Used to overcome the limitation pointed above, when your OS layout is set to Dvorak instead of US, this way you can use
|
||||
Standard Dvorak (available by default on all the main operating systems) on other normal keybdoards and Hacker Dvorak on
|
||||
the Ergodox EZ Shine at the same time, without changing back and forth tho OS layout.
|
||||
3. Gaming
|
||||
* Still in development.
|
||||
* Left side is mainly "normal" Qwerty.
|
||||
* Right side is mainly for movement, either using the mouse, the arrow keys, the number pad or the `H`, `J`, `K`, `L` as direction keys.
|
||||
4. Arrows
|
||||
* Arrow keys navigation.
|
||||
* All modifier keys.
|
||||
* Common text edititng shortcuts (doesn't work for MacOS).
|
||||
5. Mouse
|
||||
* Mouse navigation.
|
||||
* All modifier keys.
|
||||
* Common text edititng shortcuts (doesn't work for MacOS).
|
||||
6. Numpad
|
||||
* ATM style numpad.
|
||||
* All modifier keys.
|
||||
* Letters from `A` to `F` for hexadecimal numbers (`B` is also used for binary numeric literals in most programming
|
||||
languages, ie. `0b11001`).
|
||||
* `X` for hexadecimal numeric literals in most programming languages, ie. `0xbeef`.
|
||||
* `O` for octal numeric literals in most programming languages, ie `0o123`.
|
||||
* `J` for complex numeric literals in Python, ie. `3j`.
|
||||
* `I` and `M` for complex Julia numeric literals, ie. `3im`.
|
||||
* Common symbols for mathematical operations.
|
||||
7. Hyper Fn
|
||||
* Useful for custom global shortcuts.
|
||||
8. Media Fn
|
||||
* Media keys.
|
||||
* Function keys.
|
||||
* EZ Shine keys.
|
||||
9. Meh Fn
|
||||
* Useful for custom application shortcuts.
|
||||
10. Meh Fn +
|
||||
* Useful for custom standard shortcuts.
|
||||
|
||||
## To Do
|
||||
|
||||
Add images.
|
||||
|
||||
***
|
||||
|
||||
Please comment below if you have any ideas or suggestions. If you have used this layout or used it as a base, I'd love to hear about your experience!
|
35
keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk
Normal file
35
keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk
Normal file
@@ -0,0 +1,35 @@
|
||||
# Set any rules.mk overrides for your specific keymap here.
|
||||
# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
TAP_DANCE_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700b).
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450b).
|
||||
SLEEP_LED_ENABLE = yes # Turn off leds when computer is sleeping.
|
||||
KEY_LOCK_ENABLE = yes # (+1730b)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
LEADER_ENABLE = yes
|
||||
|
||||
|
||||
UNICODE_ENABLE = no # For Unicode.
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard.
|
||||
|
||||
|
||||
# This are by default off:
|
||||
# CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
# API_SYSEX_ENABLE = no
|
||||
# MIDI_ENABLE = no
|
||||
# UNICODEMAP_ENABLE = no
|
||||
# BLUETOOTH_ENABLE = no
|
||||
# AUDIO_ENABLE = no
|
||||
# FAUXCLICKY_ENABLE = no
|
||||
# VARIABLE_TRACE = no
|
||||
# BACKLIGHT_ENABLE = no
|
||||
# RGB_MATRIX_ENABLE = no
|
||||
# COMBO_ENABLE = no
|
||||
|
||||
|
||||
# This don't need argument:
|
||||
# CUSTOM_MATRIX # Custom matrix file for the ErgoDox EZ
|
||||
# SPLIT_KEYBOARD
|
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define MANUFACTURER ishtob
|
||||
#define PRODUCT Hadron Keyboard
|
||||
#define DESCRIPTION A cherry ML ortholinear keyboard
|
||||
#define DESCRIPTION A low profile ortholinear keyboard
|
||||
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
//#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
@@ -70,7 +70,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
|
||||
|
@@ -1,26 +1,2 @@
|
||||
#include "hadron.h"
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
@@ -7,7 +7,9 @@
|
||||
#ifdef SUBPROJECT_ver2
|
||||
#include "ver2.h"
|
||||
#endif
|
||||
|
||||
#ifdef SUBPROJECT_ver3
|
||||
#include "ver3.h"
|
||||
#endif
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
|
@@ -1,20 +0,0 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define LEADER_TIMEOUT 300
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
||||
#define USE_I2C
|
||||
#define SSD1306OLED
|
||||
#define OLED_ROTATE180
|
||||
|
||||
/* ws2812 RGB LED*/
|
||||
#define RGB_DI_PIN D4
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
||||
#endif
|
@@ -1,24 +0,0 @@
|
||||
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
EXTRAFLAGS += -flto
|
@@ -1,20 +0,0 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define LEADER_TIMEOUT 300
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
||||
#define USE_I2C
|
||||
#define SSD1306OLED
|
||||
#define OLED_ROTATE180
|
||||
|
||||
/* ws2812 RGB LED*/
|
||||
#define RGB_DI_PIN D4
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
||||
#endif
|
@@ -2,10 +2,10 @@
|
||||
|
||||

|
||||
|
||||
A low-profile Cherry ML ortholinear build.
|
||||
A low-profile ortholinear build.
|
||||
|
||||
Keyboard Maintainer: [ishtob](https://github.com/ishtob), [QMK](https://github.com/qmk)
|
||||
Hardware Supported: Hadron PCB rev0, rev2
|
||||
Hardware Supported: Hadron PCB rev0, rev2, rev3
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
@@ -1,75 +1,2 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
SRC = i2c.c \
|
||||
ssd1306.c
|
||||
|
||||
DEFAULT_FOLDER = hadron/ver2
|
||||
|
||||
EXTRAFLAGS += -flto
|
||||
|
@@ -29,4 +29,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define UNUSED_PINS
|
||||
|
||||
|
||||
#define USE_I2C
|
||||
#define SSD1306OLED
|
||||
#define OLED_ROTATE180
|
||||
|
||||
/* ws2812 RGB LED*/
|
||||
#define RGB_DI_PIN D4
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
||||
|
||||
|
9
keyboards/hadron/ver2/keymaps/default/config.h
Normal file
9
keyboards/hadron/ver2/keymaps/default/config.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND) \
|
||||
}
|
||||
|
||||
#define LEADER_TIMEOUT 300
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "LUFA/Drivers/Peripheral/TWI.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
@@ -215,29 +214,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool RGB_INIT = false;
|
||||
bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
@@ -251,19 +232,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@@ -337,53 +312,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef USE_I2C
|
||||
i2c_master_init();
|
||||
#ifdef SSD1306OLED
|
||||
// calls code for the SSD1306 OLED
|
||||
_delay_ms(400);
|
||||
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
|
||||
iota_gfx_init(); // turns on the display
|
||||
#endif
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{cc
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macro definition
|
||||
@@ -404,6 +333,32 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
//Functions for ver2
|
||||
#ifdef KEYBOARD_hadron_ver2
|
||||
#include "LUFA/Drivers/Peripheral/TWI.h"
|
||||
void matrix_init_user(void) {
|
||||
#ifdef USE_I2C
|
||||
i2c_master_init();
|
||||
#ifdef SSD1306OLED
|
||||
// calls code for the SSD1306 OLED
|
||||
_delay_ms(400);
|
||||
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
|
||||
iota_gfx_init(); // turns on the display
|
||||
#endif
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
@@ -411,7 +366,6 @@ void matrix_update(struct CharacterMatrix *dest,
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
#define L_LOWER 8
|
||||
@@ -491,3 +445,4 @@ void iota_gfx_task_user(void) {
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
8
keyboards/hadron/ver2/keymaps/side_numpad/config.h
Normal file
8
keyboards/hadron/ver2/keymaps/side_numpad/config.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND)\
|
||||
}
|
||||
|
||||
#define LEADER_TIMEOUT 300
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
@@ -218,15 +218,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool RGB_INIT = false;
|
||||
bool TOG_STATUS = false;
|
||||
@@ -234,12 +225,6 @@ bool NUMLAY_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
@@ -253,10 +238,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
@@ -1 +1,76 @@
|
||||
#AUDIO_ENABLE = yes # Audio output on port C6
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = yes
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
|
||||
EXTRAFLAGS += -flto
|
||||
|
||||
|
||||
SRC = i2c.c \
|
||||
ssd1306.c
|
@@ -1 +1,26 @@
|
||||
#include "ver2.h"
|
||||
#include "ver2.h"
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
126
keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c
Normal file
126
keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 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.
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief PAL setup.
|
||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||
* This variable is used by the HAL when initializing the PAL driver.
|
||||
*/
|
||||
const PALConfig pal_default_config = {
|
||||
#if STM32_HAS_GPIOA
|
||||
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOB
|
||||
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
||||
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOC
|
||||
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
||||
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOD
|
||||
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
||||
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOE
|
||||
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
||||
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOF
|
||||
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
||||
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOG
|
||||
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
||||
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOH
|
||||
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
||||
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOI
|
||||
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
void enter_bootloader_mode_if_requested(void);
|
||||
|
||||
/**
|
||||
* @brief Early initialization code.
|
||||
* @details This initialization must be performed just after stack setup
|
||||
* and before any other initialization.
|
||||
*/
|
||||
void __early_init(void) {
|
||||
enter_bootloader_mode_if_requested();
|
||||
stm32_clock_init();
|
||||
}
|
||||
|
||||
#if HAL_USE_SDC || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief SDC card detection.
|
||||
*/
|
||||
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
||||
|
||||
(void)sdcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SDC card write protection detection.
|
||||
*/
|
||||
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
||||
|
||||
(void)sdcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return false;
|
||||
}
|
||||
#endif /* HAL_USE_SDC */
|
||||
|
||||
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief MMC_SPI card detection.
|
||||
*/
|
||||
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||
|
||||
(void)mmcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MMC_SPI card write protection detection.
|
||||
*/
|
||||
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||
|
||||
(void)mmcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Board-specific initialization code.
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void boardInit(void) {
|
||||
}
|
1187
keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.h
Normal file
1187
keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
# List of all the board related files.
|
||||
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC
|
7
keyboards/hadron/ver3/bootloader_defs.h
Normal file
7
keyboards/hadron/ver3/bootloader_defs.h
Normal file
@@ -0,0 +1,7 @@
|
||||
/* Address for jumping to bootloader on STM32 chips. */
|
||||
/* It is chip dependent, the correct number can be looked up here:
|
||||
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
* This also requires a patch to chibios:
|
||||
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
*/
|
||||
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
|
520
keyboards/hadron/ver3/chconf.h
Normal file
520
keyboards/hadron/ver3/chconf.h
Normal file
@@ -0,0 +1,520 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/chconf.h
|
||||
* @brief Configuration file template.
|
||||
* @details A copy of this file must be placed in each project directory, it
|
||||
* contains the application specific kernel settings.
|
||||
*
|
||||
* @addtogroup config
|
||||
* @details Kernel related settings and hooks.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef CHCONF_H
|
||||
#define CHCONF_H
|
||||
|
||||
#define _CHIBIOS_RT_CONF_
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name System timers settings
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief System time counter resolution.
|
||||
* @note Allowed values are 16 or 32 bits.
|
||||
*/
|
||||
#define CH_CFG_ST_RESOLUTION 32
|
||||
|
||||
/**
|
||||
* @brief System tick frequency.
|
||||
* @details Frequency of the system timer that drives the system ticks. This
|
||||
* setting also defines the system tick time unit.
|
||||
*/
|
||||
#define CH_CFG_ST_FREQUENCY 100000
|
||||
|
||||
/**
|
||||
* @brief Time delta constant for the tick-less mode.
|
||||
* @note If this value is zero then the system uses the classic
|
||||
* periodic tick. This value represents the minimum number
|
||||
* of ticks that is safe to specify in a timeout directive.
|
||||
* The value one is not valid, timeouts are rounded up to
|
||||
* this value.
|
||||
*/
|
||||
#define CH_CFG_ST_TIMEDELTA 2
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel parameters and options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Round robin interval.
|
||||
* @details This constant is the number of system ticks allowed for the
|
||||
* threads before preemption occurs. Setting this value to zero
|
||||
* disables the preemption for threads with equal priority and the
|
||||
* round robin becomes cooperative. Note that higher priority
|
||||
* threads can still preempt, the kernel is always preemptive.
|
||||
* @note Disabling the round robin preemption makes the kernel more compact
|
||||
* and generally faster.
|
||||
* @note The round robin preemption is not supported in tickless mode and
|
||||
* must be set to zero in that case.
|
||||
*/
|
||||
#define CH_CFG_TIME_QUANTUM 0
|
||||
|
||||
/**
|
||||
* @brief Managed RAM size.
|
||||
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||
* then the whole available RAM is used. The core memory is made
|
||||
* available to the heap allocator and/or can be used directly through
|
||||
* the simplified core memory allocator.
|
||||
*
|
||||
* @note In order to let the OS manage the whole RAM the linker script must
|
||||
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||
*/
|
||||
#define CH_CFG_MEMCORE_SIZE 0
|
||||
|
||||
/**
|
||||
* @brief Idle thread automatic spawn suppression.
|
||||
* @details When this option is activated the function @p chSysInit()
|
||||
* does not spawn the idle thread. The application @p main()
|
||||
* function becomes the idle thread and must implement an
|
||||
* infinite loop.
|
||||
*/
|
||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Performance options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief OS optimization.
|
||||
* @details If enabled then time efficient rather than space efficient code
|
||||
* is used when two possible implementations exist.
|
||||
*
|
||||
* @note This is not related to the compiler optimization options.
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Subsystem options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Time Measurement APIs.
|
||||
* @details If enabled then the time measurement APIs are included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_TM TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads registry APIs.
|
||||
* @details If enabled then the registry APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_REGISTRY TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads synchronization APIs.
|
||||
* @details If enabled then the @p chThdWait() function is included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_WAITEXIT TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores APIs.
|
||||
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores queuing mode.
|
||||
* @details If enabled then the threads are enqueued on semaphores by
|
||||
* priority rather than in FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||
|
||||
/**
|
||||
* @brief Mutexes APIs.
|
||||
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Enables recursive behavior on mutexes.
|
||||
* @note Recursive mutexes are heavier and have an increased
|
||||
* memory footprint.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs.
|
||||
* @details If enabled then the conditional variables APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS TRUE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs with timeout.
|
||||
* @details If enabled then the conditional variables APIs with timeout
|
||||
* specification are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs.
|
||||
* @details If enabled then the event flags APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs with timeout.
|
||||
* @details If enabled then the events APIs with timeout specification
|
||||
* are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages APIs.
|
||||
* @details If enabled then the synchronous messages APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages queuing mode.
|
||||
* @details If enabled then messages are served by priority rather than in
|
||||
* FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
|
||||
|
||||
/**
|
||||
* @brief Mailboxes APIs.
|
||||
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||
* included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_MAILBOXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Core Memory Manager APIs.
|
||||
* @details If enabled then the core memory manager APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMCORE TRUE
|
||||
|
||||
/**
|
||||
* @brief Heap Allocator APIs.
|
||||
* @details If enabled then the memory heap allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||
* @p CH_CFG_USE_SEMAPHORES.
|
||||
* @note Mutexes are recommended.
|
||||
*/
|
||||
#define CH_CFG_USE_HEAP TRUE
|
||||
|
||||
/**
|
||||
* @brief Memory Pools Allocator APIs.
|
||||
* @details If enabled then the memory pools allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||
|
||||
/**
|
||||
* @brief Dynamic Threads APIs.
|
||||
* @details If enabled then the dynamic threads creation APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||
*/
|
||||
#define CH_CFG_USE_DYNAMIC TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Debug options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Debug option, kernel statistics.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_STATISTICS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, system state check.
|
||||
* @details If enabled the correct call protocol for system APIs is checked
|
||||
* at runtime.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, parameters checks.
|
||||
* @details If enabled then the checks on the API functions input
|
||||
* parameters are activated.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, consistency checks.
|
||||
* @details If enabled then all the assertions in the kernel code are
|
||||
* activated. This includes consistency checks inside the kernel,
|
||||
* runtime anomalies and port-defined checks.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, trace buffer.
|
||||
* @details If enabled then the trace buffer is activated.
|
||||
*
|
||||
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||
|
||||
/**
|
||||
* @brief Trace buffer entries.
|
||||
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||
|
||||
/**
|
||||
* @brief Debug option, stack checks.
|
||||
* @details If enabled then a runtime stack check is performed.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note The stack check is performed in a architecture/port dependent way.
|
||||
* It may not be implemented or some ports.
|
||||
* @note The default failure mode is to halt the system with the global
|
||||
* @p panic_msg variable set to @p NULL.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||
|
||||
/**
|
||||
* @brief Debug option, stacks initialization.
|
||||
* @details If enabled then the threads working area is filled with a byte
|
||||
* value when a thread is created. This can be useful for the
|
||||
* runtime measurement of the used stack.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_FILL_THREADS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, threads profiling.
|
||||
* @details If enabled then a field is added to the @p thread_t structure that
|
||||
* counts the system ticks occurred while executing the thread.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note This debug option is not currently compatible with the
|
||||
* tickless mode.
|
||||
*/
|
||||
#define CH_DBG_THREADS_PROFILING FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel hooks
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Threads descriptor structure extension.
|
||||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
/* Add threads custom fields here.*/
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
* @details User initialization code added to the @p chThdInit() API.
|
||||
*
|
||||
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||
* the threads creation APIs.
|
||||
*/
|
||||
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||
/* Add threads initialization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Threads finalization hook.
|
||||
* @details User finalization code added to the @p chThdExit() API.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
/* Context switch code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to activate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||
/* Idle-enter code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread leave hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to deactivate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||
/* Idle-leave code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle Loop hook.
|
||||
* @details This hook is continuously invoked by the idle thread loop.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||
/* Idle loop code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System tick event hook.
|
||||
* @details This hook is invoked in the system tick handler immediately
|
||||
* after processing the virtual timers queue.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||
/* System tick event code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System halt hook.
|
||||
* @details This hook is invoked in case to a system halting error before
|
||||
* the system is halted.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||
/* System halt code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Trace hook.
|
||||
* @details This hook is invoked each time a new record is written in the
|
||||
* trace buffer.
|
||||
*/
|
||||
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||
/* Trace code here.*/ \
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||
/*===========================================================================*/
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
192
keyboards/hadron/ver3/config.h
Normal file
192
keyboards/hadron/ver3/config.h
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef REV3_CONFIG_H
|
||||
#define REV3_CONFIG_H
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define DEVICE_VER 0x0003
|
||||
|
||||
#undef MATRIX_ROWS
|
||||
#undef MATRIX_COLS
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
|
||||
//Audio
|
||||
#undef AUDIO_VOICES
|
||||
#undef C6_AUDIO
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#define AUDIO_CLICKY
|
||||
/* to enable clicky on startup */
|
||||
//#define AUDIO_CLICKY_ON
|
||||
#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
|
||||
#endif
|
||||
|
||||
//configure qwiic micro_oled driver for the 128x32 oled
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
|
||||
#undef I2C_ADDRESS_SA0_1
|
||||
#define I2C_ADDRESS_SA0_1 0b0111100
|
||||
#define LCDWIDTH 128
|
||||
#define LCDHEIGHT 32
|
||||
#define micro_oled_rotate_180
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 6
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* 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
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
/* Haptic Driver initialization settings
|
||||
* Feedback Control Settings */
|
||||
#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
|
||||
#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||
|
||||
#define RATED_VOLTAGE 2
|
||||
#define V_RMS 2.0
|
||||
#define V_PEAK 2.85
|
||||
#define F_LRA 205
|
||||
/* Library Selection */
|
||||
#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
|
||||
|
||||
/* Control 1 register settings */
|
||||
#define DRIVE_TIME 25
|
||||
#define AC_COUPLE 0
|
||||
#define STARTUP_BOOST 1
|
||||
|
||||
/* Control 2 Settings */
|
||||
#define BIDIR_INPUT 1
|
||||
#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
|
||||
#define SAMPLE_TIME 3
|
||||
#define BLANKING_TIME 1
|
||||
#define IDISS_TIME 1
|
||||
|
||||
/* Control 3 settings */
|
||||
#define NG_THRESH 2
|
||||
#define ERM_OPEN_LOOP 1
|
||||
#define SUPPLY_COMP_DIS 0
|
||||
#define DATA_FORMAT_RTO 0
|
||||
#define LRA_DRIVE_MODE 0
|
||||
#define N_PWM_ANALOG 0
|
||||
#define LRA_OPEN_LOOP 0
|
||||
/* Control 4 settings */
|
||||
#define ZC_DET_TIME 0
|
||||
#define AUTO_CAL_TIME 3
|
||||
|
||||
//#define WS2812_LED_N 2
|
||||
//#define RGBLED_NUM WS2812_LED_N
|
||||
//#define WS2812_TIM_N 2
|
||||
//#define WS2812_TIM_CH 2
|
||||
//#define PORT_WS2812 GPIOA
|
||||
//#define PIN_WS2812 15
|
||||
//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
|
||||
//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
|
||||
//#define WS2812_EXTERNAL_PULLUP
|
||||
|
||||
#endif
|
388
keyboards/hadron/ver3/halconf.h
Normal file
388
keyboards/hadron/ver3/halconf.h
Normal file
@@ -0,0 +1,388 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/halconf.h
|
||||
* @brief HAL configuration header.
|
||||
* @details HAL configuration file, this file allows to enable or disable the
|
||||
* various device drivers from your application. You may also use
|
||||
* this file in order to override the device drivers default settings.
|
||||
*
|
||||
* @addtogroup HAL_CONF
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef HALCONF_H
|
||||
#define HALCONF_H
|
||||
|
||||
#include "mcuconf.h"
|
||||
|
||||
/**
|
||||
* @brief Enables the PAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PAL TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ADC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ADC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the CAN subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_CAN FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the DAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_DAC TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the EXT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_EXT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the GPT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_GPT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2S subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2S FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ICU subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ICU FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MAC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MMC_SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MMC_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the PWM subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PWM FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the QSPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_QSPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the RTC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_RTC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SDC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SDC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL over USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL_USB TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the UART subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_UART FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_USB TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the WDG subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_WDG FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* ADC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* CAN driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Sleep mode related APIs inclusion switch.
|
||||
*/
|
||||
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||
#define CAN_USE_SLEEP_MODE TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* I2C driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||
*/
|
||||
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MAC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_ZERO_COPY FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_EVENTS TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MMC_SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
* This option is recommended also if the SPI driver does not
|
||||
* use a DMA channel and heavily loads the CPU.
|
||||
*/
|
||||
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define MMC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SDC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Number of initialization attempts before rejecting the card.
|
||||
* @note Attempts are performed at 10mS intervals.
|
||||
*/
|
||||
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||
#define SDC_INIT_RETRY 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Include support for MMC cards.
|
||||
* @note MMC support is not yet implemented so this option must be kept
|
||||
* at @p FALSE.
|
||||
*/
|
||||
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||
#define SDC_MMC_SUPPORT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
*/
|
||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define SDC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Default bit rate.
|
||||
* @details Configuration parameter, this is the baud rate selected for the
|
||||
* default configuration.
|
||||
*/
|
||||
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_DEFAULT_BITRATE 38400
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial buffers size.
|
||||
* @details Configuration parameter, you can change the depth of the queue
|
||||
* buffers depending on the requirements of your application.
|
||||
* @note The default is 16 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_BUFFERS_SIZE 16
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL_USB driver related setting. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Serial over USB buffers size.
|
||||
* @details Configuration parameter, the buffer size must be a multiple of
|
||||
* the USB data endpoint maximum packet size.
|
||||
* @note The default is 256 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial over USB number of buffers.
|
||||
* @note The default is 2 buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* UART driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define UART_USE_WAIT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* USB driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define USB_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
#endif /* HALCONF_H */
|
||||
|
||||
/** @} */
|
1
keyboards/hadron/ver3/keymaps/default/config.h
Normal file
1
keyboards/hadron/ver3/keymaps/default/config.h
Normal file
@@ -0,0 +1 @@
|
||||
#pragma once
|
295
keyboards/hadron/ver3/keymaps/default/keymap.c
Normal file
295
keyboards/hadron/ver3/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,295 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _MOUSECURSOR 8
|
||||
#define _ADJUST 16
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
RGBLED_TOGGLE,
|
||||
RGBLED_STEP_MODE,
|
||||
RGBLED_INCREASE_HUE,
|
||||
RGBLED_DECREASE_HUE,
|
||||
RGBLED_INCREASE_SAT,
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_DEMOMACRO,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
// Custom macros
|
||||
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
||||
#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
|
||||
#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl
|
||||
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
|
||||
// Requires KC_TRNS/_______ for the trigger key in the destination layer
|
||||
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
||||
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
|
||||
#define DEMOMACRO M(KC_DEMOMACRO) // Sample for macros
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DEL |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | Tab | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | CAPS | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ;/Nav| ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / |Ctl/Et|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_H, KC_J, KC_K, KC_L,LT_MC(KC_SCLN), KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, CTL_ENT, \
|
||||
KC_GRV, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT,KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | 0 | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | Tab | Q | W | F | P | G | 7 | 8 | 9 | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||
* | CAPS | A | R | S | T | D | 4 | 5 | 6 | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | 1 | 2 | 3 | K | M | , | . | / |Ctl/Et|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_P7, KC_P8, KC_P9, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_LCTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_P4, KC_P5, KC_P6, KC_H, KC_N, KC_E, KC_I, LT_MC(KC_O), KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_ENT, \
|
||||
KC_GRV, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | Tab | " | , | . | P | Y | 7 | 8 | 9 | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | 4 | 5 | 6 | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | 1 | 2 | 3 | B | M | W | V | Z |Ctl/Et|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_P7, KC_P8, KC_P9, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_P4, KC_P5, KC_P6, KC_D, KC_H, KC_T, KC_N, LT_MC(KC_S), KC_SLSH, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_P1, KC_P2, KC_P3, KC_B, KC_M, KC_W, KC_V, KC_Z, CTL_ENT, \
|
||||
KC_GRV, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Mouse Layer (semi-col)
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | ACCL0| ACCL1| ACCL2| | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | | | | | | | | | Home | Wh_Up| WHL_L| M_Up | WHL_R| Macro| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | End | Wh_Dn| M_Lft| M_Dn | M_Rt | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | BTN2 | BTN3 | BTN4 | BTN5 | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | BTN1 | | | | BTN1 | | | | | |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_MOUSECURSOR] = LAYOUT(
|
||||
KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R,DEMOMACRO,_______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, \
|
||||
_______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, KC_BTN1, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,------+------+------+------+------+------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\
|
||||
)
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
layer_on(_LOWER);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
layer_on(_RAISE);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Macro definition
|
||||
*/
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case KC_DEMOMACRO:
|
||||
if (record->event.pressed){
|
||||
return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END);
|
||||
}
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
2
keyboards/hadron/ver3/keymaps/default/readme.md
Normal file
2
keyboards/hadron/ver3/keymaps/default/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# The Default Hadron Layout
|
||||
|
23
keyboards/hadron/ver3/keymaps/readme.md
Normal file
23
keyboards/hadron/ver3/keymaps/readme.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# How to add your own keymap
|
||||
|
||||
Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`:
|
||||
|
||||
_[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author]
|
||||
|
||||
\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
|
||||
|
||||
and contain the following files:
|
||||
|
||||
* `keymap.c`
|
||||
* `readme.md` *recommended*
|
||||
* `config.h` *optional*, found automatically when compiling
|
||||
* `Makefile` *optional*, found automatically when compling
|
||||
|
||||
When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format:
|
||||
|
||||
* **folder_name** description
|
||||
|
||||
# List of Planck keymaps
|
||||
|
||||
* **default** default Planck layout
|
||||
* **cbbrowne** cbbrowne's Planck layout
|
195
keyboards/hadron/ver3/matrix.c
Normal file
195
keyboards/hadron/ver3/matrix.c
Normal file
@@ -0,0 +1,195 @@
|
||||
#include <string.h>
|
||||
#include "hal.h"
|
||||
#include "timer.h"
|
||||
#include "wait.h"
|
||||
#include "printf.h"
|
||||
#include "backlight.h"
|
||||
#include "matrix.h"
|
||||
#include "action.h"
|
||||
#include "keycode.h"
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_COLS];
|
||||
static bool debouncing = false;
|
||||
static uint16_t debouncing_time = 0;
|
||||
|
||||
static uint8_t encoder_state = 0;
|
||||
static int8_t encoder_value = 0;
|
||||
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
printf("matrix init\n");
|
||||
//debug_matrix = true;
|
||||
|
||||
// encoder setup
|
||||
palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP);
|
||||
palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP);
|
||||
|
||||
encoder_state = (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1);
|
||||
|
||||
// actual matrix setup
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
|
||||
palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN);
|
||||
|
||||
|
||||
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
|
||||
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void encoder_update(bool clockwise) { }
|
||||
|
||||
#ifndef ENCODER_RESOLUTION
|
||||
#define ENCODER_RESOLUTION 4
|
||||
#endif
|
||||
|
||||
uint8_t matrix_scan(void) {
|
||||
// encoder on B13 and B14
|
||||
encoder_state <<= 2;
|
||||
encoder_state |= (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1);
|
||||
encoder_value += encoder_LUT[encoder_state & 0xF];
|
||||
if (encoder_value >= ENCODER_RESOLUTION) {
|
||||
encoder_update(0);
|
||||
}
|
||||
if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
|
||||
encoder_update(1);
|
||||
}
|
||||
encoder_value %= ENCODER_RESOLUTION;
|
||||
|
||||
// actual matrix
|
||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||
matrix_row_t data = 0;
|
||||
|
||||
// strobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, }
|
||||
switch (col) {
|
||||
case 0: palSetPad(GPIOB, 8); break;
|
||||
case 1: palSetPad(GPIOB, 2); break;
|
||||
case 2: palSetPad(GPIOB, 10); break;
|
||||
case 3: palSetPad(GPIOA, 0); break;
|
||||
case 4: palSetPad(GPIOA, 1); break;
|
||||
case 5: palSetPad(GPIOA, 2); break;
|
||||
case 6: palSetPad(GPIOB, 0); break;
|
||||
case 7: palSetPad(GPIOA, 3); break;
|
||||
case 8: palSetPad(GPIOB, 1); break;
|
||||
case 9: palSetPad(GPIOA, 6); break;
|
||||
case 10: palSetPad(GPIOA, 7); break;
|
||||
case 11: palSetPad(GPIOB, 12); break;
|
||||
case 12: palSetPad(GPIOC, 13); break;
|
||||
case 13: palSetPad(GPIOB, 11); break;
|
||||
case 14: palSetPad(GPIOB, 9); break;
|
||||
}
|
||||
|
||||
// need wait to settle pin state
|
||||
wait_us(20);
|
||||
|
||||
// read row data { PC15, PC14, PA10, PA9, PA8 }
|
||||
data = (
|
||||
(palReadPad(GPIOC, 15) << 0 ) |
|
||||
(palReadPad(GPIOC, 14) << 1 ) |
|
||||
(palReadPad(GPIOA, 10) << 2 ) |
|
||||
(palReadPad(GPIOA, 9) << 3 ) |
|
||||
(palReadPad(GPIOA, 8) << 4 )
|
||||
);
|
||||
|
||||
// unstrobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, }
|
||||
switch (col) {
|
||||
case 0: palClearPad(GPIOB, 8); break;
|
||||
case 1: palClearPad(GPIOB, 2); break;
|
||||
case 2: palClearPad(GPIOB, 10); break;
|
||||
case 3: palClearPad(GPIOA, 0); break;
|
||||
case 4: palClearPad(GPIOA, 1); break;
|
||||
case 5: palClearPad(GPIOA, 2); break;
|
||||
case 6: palClearPad(GPIOB, 0); break;
|
||||
case 7: palClearPad(GPIOA, 3); break;
|
||||
case 8: palClearPad(GPIOB, 1); break;
|
||||
case 9: palClearPad(GPIOA, 6); break;
|
||||
case 10: palClearPad(GPIOA, 7); break;
|
||||
case 11: palClearPad(GPIOB, 12); break;
|
||||
case 12: palClearPad(GPIOC, 13); break;
|
||||
case 13: palClearPad(GPIOB, 11); break;
|
||||
case 14: palClearPad(GPIOB, 9); break;
|
||||
}
|
||||
|
||||
if (matrix_debouncing[col] != data) {
|
||||
matrix_debouncing[col] = data;
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix[row] = 0;
|
||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||
matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col);
|
||||
}
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||
return (matrix[row] & (1<<col));
|
||||
}
|
||||
|
||||
matrix_row_t matrix_get_row(uint8_t row) {
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void) {
|
||||
printf("\nr/c 01234567\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
printf("%X0: ", row);
|
||||
matrix_row_t data = matrix_get_row(row);
|
||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||
if (data & (1<<col))
|
||||
printf("1");
|
||||
else
|
||||
printf("0");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
257
keyboards/hadron/ver3/mcuconf.h
Normal file
257
keyboards/hadron/ver3/mcuconf.h
Normal file
@@ -0,0 +1,257 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 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
|
||||
|
||||
/*
|
||||
* STM32F3xx 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.
|
||||
*/
|
||||
|
||||
#define STM32F3xx_MCUCONF
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
#define STM32_NO_INIT FALSE
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_LSI_ENABLED TRUE
|
||||
#define STM32_HSE_ENABLED TRUE
|
||||
#define STM32_LSE_ENABLED FALSE
|
||||
#define STM32_SW STM32_SW_PLL
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||
#define STM32_PREDIV_VALUE 1
|
||||
#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_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
|
||||
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
|
||||
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||
#define STM32_USART2SW STM32_USART2SW_PCLK
|
||||
#define STM32_USART3SW STM32_USART3SW_PCLK
|
||||
#define STM32_UART4SW STM32_UART4SW_PCLK
|
||||
#define STM32_UART5SW STM32_UART5SW_PCLK
|
||||
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
|
||||
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
|
||||
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
|
||||
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
|
||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||
#define STM32_USB_CLOCK_REQUIRED TRUE
|
||||
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||||
|
||||
#undef STM32_HSE_BYPASS
|
||||
// #error "oh no"
|
||||
// #endif
|
||||
|
||||
/*
|
||||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_DUAL_MODE FALSE
|
||||
#define STM32_ADC_COMPACT_SAMPLES FALSE
|
||||
#define STM32_ADC_USE_ADC1 FALSE
|
||||
#define STM32_ADC_USE_ADC2 FALSE
|
||||
#define STM32_ADC_USE_ADC3 FALSE
|
||||
#define STM32_ADC_USE_ADC4 FALSE
|
||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
|
||||
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC2_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC3_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC4_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
|
||||
/*
|
||||
* CAN driver system settings.
|
||||
*/
|
||||
#define STM32_CAN_USE_CAN1 FALSE
|
||||
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||
|
||||
/*
|
||||
* DAC driver system settings.
|
||||
*/
|
||||
#define STM32_DAC_DUAL_MODE FALSE
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
||||
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
|
||||
|
||||
/*
|
||||
* 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
|
||||
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI33_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_TIM6 TRUE
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
#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_TIM6_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM7_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 10
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_USE_DMA TRUE
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||
#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_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_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
#define STM32_PWM_USE_TIM3 TRUE
|
||||
#define STM32_PWM_USE_TIM4 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_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 TRUE
|
||||
#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 FALSE
|
||||
#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
|
||||
|
||||
/*
|
||||
* WDG driver system settings.
|
||||
*/
|
||||
#define STM32_WDG_USE_IWDG FALSE
|
||||
|
||||
#endif /* MCUCONF_H */
|
21
keyboards/hadron/ver3/rev3.h
Normal file
21
keyboards/hadron/ver3/rev3.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#ifndef REV3_H
|
||||
#define REV3_H
|
||||
|
||||
#include "hadron.h"
|
||||
|
||||
#endif
|
57
keyboards/hadron/ver3/rules.mk
Normal file
57
keyboards/hadron/ver3/rules.mk
Normal file
@@ -0,0 +1,57 @@
|
||||
# project specific files
|
||||
SRC = matrix.c
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F3xx
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F303xC
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f3xx
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = GENERIC_STM32_F303XC
|
||||
|
||||
# Cortex version
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
AUDIO_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
HAPTIC_ENABLE = DRV2605L
|
||||
QWIIC_ENABLE += MICRO_OLED
|
||||
# SERIAL_LINK_ENABLE = yes
|
196
keyboards/hadron/ver3/ver3.c
Normal file
196
keyboards/hadron/ver3/ver3.c
Normal file
@@ -0,0 +1,196 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
*
|
||||
* 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 "ver3.h"
|
||||
#include "qwiic.h"
|
||||
#include "action_layer.h"
|
||||
#include "matrix.h"
|
||||
#include "DRV2605L.h"
|
||||
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
|
||||
/* screen off after this many milliseconds */
|
||||
#include "timer.h"
|
||||
#define ScreenOffInterval 60000 /* milliseconds */
|
||||
static uint16_t last_flush;
|
||||
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_scrolllock = false;
|
||||
|
||||
static uint8_t layer;
|
||||
static bool queue_for_send = false;
|
||||
static uint8_t encoder_value = 32;
|
||||
|
||||
__attribute__ ((weak))
|
||||
void draw_ui(void) {
|
||||
clear_buffer();
|
||||
last_flush = timer_read();
|
||||
send_command(DISPLAYON);
|
||||
|
||||
/* Layer indicator is 41 x 10 pixels */
|
||||
#define LAYER_INDICATOR_X 0
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
|
||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
||||
draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0);
|
||||
|
||||
/* Matrix display is 19 x 9 pixels */
|
||||
#define MATRIX_DISPLAY_X 0
|
||||
#define MATRIX_DISPLAY_Y 18
|
||||
|
||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
for (uint8_t y = 0; y < MATRIX_COLS; y++) {
|
||||
draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
||||
}
|
||||
}
|
||||
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM);
|
||||
/* hadron oled location on thumbnail */
|
||||
draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM);
|
||||
/*
|
||||
draw_rect_soft(0, 13, 64, 6, PIXEL_ON, NORM);
|
||||
draw_line_vert(encoder_value, 13, 6, PIXEL_ON, NORM);
|
||||
|
||||
*/
|
||||
|
||||
/* Mod display is 41 x 16 pixels */
|
||||
#define MOD_DISPLAY_X 30
|
||||
#define MOD_DISPLAY_Y 18
|
||||
|
||||
uint8_t mods = get_mods();
|
||||
if (mods & MOD_LSFT) {
|
||||
draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM);
|
||||
draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0);
|
||||
} else {
|
||||
draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
if (mods & MOD_LCTL) {
|
||||
draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM);
|
||||
draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0);
|
||||
} else {
|
||||
draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
if (mods & MOD_LALT) {
|
||||
draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM);
|
||||
draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0);
|
||||
} else {
|
||||
draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
if (mods & MOD_LGUI) {
|
||||
draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM);
|
||||
draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0);
|
||||
} else {
|
||||
draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
|
||||
/* Lock display is 23 x 32 */
|
||||
#define LOCK_DISPLAY_X 100
|
||||
#define LOCK_DISPLAY_Y 0
|
||||
|
||||
if (led_numlock == true) {
|
||||
draw_rect_filled_soft(LOCK_DISPLAY_X, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM);
|
||||
draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_OFF, NORM, 0);
|
||||
} else if (led_numlock == false) {
|
||||
draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
if (led_capslock == true) {
|
||||
draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM);
|
||||
draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_OFF, NORM, 0);
|
||||
} else if (led_capslock == false) {
|
||||
draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
|
||||
if (led_scrolllock == true) {
|
||||
draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 22, 5 + (3 * 6), 9, PIXEL_ON, NORM);
|
||||
draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_OFF, NORM, 0);
|
||||
} else if (led_scrolllock == false) {
|
||||
draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_ON, NORM, 0);
|
||||
}
|
||||
send_buffer();
|
||||
}
|
||||
|
||||
void read_host_led_state(void) {
|
||||
uint8_t leds = host_keyboard_leds();
|
||||
if (leds & (1 << USB_LED_NUM_LOCK)) {
|
||||
if (led_numlock == false){
|
||||
led_numlock = true;}
|
||||
} else {
|
||||
if (led_numlock == true){
|
||||
led_numlock = false;}
|
||||
}
|
||||
if (leds & (1 << USB_LED_CAPS_LOCK)) {
|
||||
if (led_capslock == false){
|
||||
led_capslock = true;}
|
||||
} else {
|
||||
if (led_capslock == true){
|
||||
led_capslock = false;}
|
||||
}
|
||||
if (leds & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
if (led_scrolllock == false){
|
||||
led_scrolllock = true;}
|
||||
} else {
|
||||
if (led_scrolllock == true){
|
||||
led_scrolllock = false;}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
state = layer_state_set_user(state);
|
||||
layer = biton32(state);
|
||||
queue_for_send = true;
|
||||
return state;
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
queue_for_send = true;
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
|
||||
queue_for_send = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
#ifdef DRV2605L
|
||||
DRV_init();
|
||||
#endif
|
||||
queue_for_send = true;
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
|
||||
if (queue_for_send) {
|
||||
#ifdef DRV2605L
|
||||
DRV_EFFECT play_eff = strong_click;
|
||||
DRV_pulse(play_eff);
|
||||
#endif
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
read_host_led_state();
|
||||
draw_ui();
|
||||
#endif
|
||||
queue_for_send = false;
|
||||
}
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
if (timer_elapsed(last_flush) > ScreenOffInterval) {
|
||||
send_command(DISPLAYOFF); /* 0xAE */
|
||||
}
|
||||
#endif
|
||||
matrix_scan_user();
|
||||
}
|
21
keyboards/hadron/ver3/ver3.h
Normal file
21
keyboards/hadron/ver3/ver3.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#ifndef VER3_H
|
||||
#define VER3_H
|
||||
|
||||
#include "hadron.h"
|
||||
|
||||
#endif
|
@@ -5,7 +5,7 @@
|
||||
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
@@ -18,7 +18,7 @@
|
||||
{ k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \
|
||||
}
|
||||
|
||||
#define COMPACT_KEYMAP( \
|
||||
#define LAYOUT_kc( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
|
70
keyboards/handwired/atreus50/info.json
Normal file
70
keyboards/handwired/atreus50/info.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"keyboard_name": "Atreus50",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 4.5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Tab", "x":0, "y":0.5},
|
||||
{"label":"Q", "x":1, "y":0.5},
|
||||
{"label":"W", "x":2, "y":0.25},
|
||||
{"label":"E", "x":3, "y":0},
|
||||
{"label":"R", "x":4, "y":0.25},
|
||||
{"label":"T", "x":5, "y":0.5},
|
||||
|
||||
{"label":"Y", "x":9, "y":0.5},
|
||||
{"label":"U", "x":10, "y":0.25},
|
||||
{"label":"I", "x":11, "y":0},
|
||||
{"label":"O", "x":12, "y":0.25},
|
||||
{"label":"P", "x":13, "y":0.5},
|
||||
{"label":"-", "x":14, "y":0.5},
|
||||
|
||||
{"label":"Ctrl/Esc", "x":0, "y":1.5},
|
||||
{"label":"A", "x":1, "y":1.5},
|
||||
{"label":"S", "x":2, "y":1.25},
|
||||
{"label":"D", "x":3, "y":1},
|
||||
{"label":"F", "x":4, "y":1.25},
|
||||
{"label":"G", "x":5, "y":1.5},
|
||||
|
||||
{"label":"H", "x":9, "y":1.5},
|
||||
{"label":"J", "x":10, "y":1.25},
|
||||
{"label":"K", "x":11, "y":1},
|
||||
{"label":"L", "x":12, "y":1.25},
|
||||
{"label":";", "x":13, "y":1.5},
|
||||
{"label":"'", "x":14, "y":1.5},
|
||||
|
||||
{"label":"LShift", "x":0, "y":2.5},
|
||||
{"label":"Z", "x":1, "y":2.5},
|
||||
{"label":"X", "x":2, "y":2.25},
|
||||
{"label":"C", "x":3, "y":2},
|
||||
{"label":"V", "x":4, "y":2.25},
|
||||
{"label":"B", "x":5, "y":2.5},
|
||||
|
||||
{"label":"N", "x":9, "y":2.5},
|
||||
{"label":"M", "x":10, "y":2.25},
|
||||
{"label":",", "x":11, "y":2},
|
||||
{"label":".", "x":12, "y":2.25},
|
||||
{"label":"/", "x":13, "y":2.5},
|
||||
{"label":"Shift/Enter", "x":14, "y":2.5},
|
||||
|
||||
{"label":"`", "x":0, "y":3.5},
|
||||
{"label":"LCtrl", "x":1, "y":3.5},
|
||||
{"label":"LAlt", "x":2, "y":3.25},
|
||||
{"label":"LGUI", "x":3, "y":3},
|
||||
{"label":"Lower", "x":4, "y":3.25},
|
||||
{"label":"Space", "x":5, "y":3.5},
|
||||
{"label":"Fn", "x":6, "y":2.75, "h":1.5},
|
||||
|
||||
{"label":"RShift", "x":8, "y":2.75, "h":1.5},
|
||||
{"label":"Back Space", "x":9, "y":3.5},
|
||||
{"label":"Raise", "x":10, "y":3.25},
|
||||
{"label":"Left", "x":11, "y":3},
|
||||
{"label":"Down", "x":12, "y":3.25},
|
||||
{"label":"Up", "x":13, "y":3.5},
|
||||
{"label":"Right", "x":14, "y":3.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,4 @@
|
||||
#include "atreus50.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_uk.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
@@ -37,10 +35,6 @@ enum planck_keycodes {
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@@ -54,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP(
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
|
||||
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,
|
||||
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,
|
||||
@@ -72,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = KEYMAP(
|
||||
[_FUNC] = LAYOUT(
|
||||
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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,
|
||||
KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||
@@ -90,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP(
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,
|
||||
LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,
|
||||
KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||
@@ -108,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Mouse| | | | | Alt | Ctrl | Alt |Enter |Raise | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP(
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,
|
||||
KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,
|
||||
_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,
|
||||
@@ -126,11 +120,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP(
|
||||
[_ADJUST] = LAYOUT(
|
||||
M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,
|
||||
KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,
|
||||
TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Mouse
|
||||
@@ -144,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOUSE] = KEYMAP(
|
||||
[_MOUSE] = LAYOUT(
|
||||
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ ,
|
||||
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ ,
|
||||
@@ -162,42 +156,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC2] = KEYMAP(
|
||||
[_FUNC2] = LAYOUT(
|
||||
_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,
|
||||
_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MAC] = KEYMAP(
|
||||
[_MAC] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
MFNC, _______, _______, _______, MLWR, _______, _______, _______, _______, MRSE, _______, _______, _______, MFNC2
|
||||
),
|
||||
|
||||
[_MLWR] = KEYMAP(
|
||||
[_MLWR] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MRSE] = KEYMAP(
|
||||
[_MRSE] = LAYOUT(
|
||||
_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,
|
||||
_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MFNC] = KEYMAP(
|
||||
[_MFNC] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MFNC2] = KEYMAP(
|
||||
[_MFNC2] = LAYOUT(
|
||||
_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,
|
||||
_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||
_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) ,
|
||||
|
@@ -1,9 +1,4 @@
|
||||
#include "atreus50.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
@@ -28,86 +23,52 @@ enum custom_keycodes {
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC
|
||||
#define KC_X1 LOWER
|
||||
#define KC_X2 RAISE
|
||||
#define KC_X3 MO(_MOVEMENT)
|
||||
#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter
|
||||
#define X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC
|
||||
#define X3 MO(_MOVEMENT)
|
||||
#define X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = COMPACT_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
|
||||
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||
GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
|
||||
X0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, X4,
|
||||
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, X3, KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[_COLEMAK] = COMPACT_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
|
||||
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||
GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
[_COLEMAK] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS,
|
||||
X0, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, X4,
|
||||
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, X3, KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[_DVORAK] = COMPACT_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
|
||||
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||
GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
[_DVORAK] = LAYOUT(
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS,
|
||||
X0, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, X4,
|
||||
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, X3, KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[_LOWER] = COMPACT_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
|
||||
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||
, , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_END, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
[_RAISE] = COMPACT_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , ,
|
||||
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||
, , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
[_MOVEMENT] = COMPACT_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
|
||||
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||
, , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
[_MOVEMENT] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_RGHT, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_END, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
@@ -121,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP( \
|
||||
[_ADJUST] = LAYOUT( \
|
||||
_______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
|
||||
|
@@ -1,7 +1,9 @@
|
||||
Handwired Atreus50
|
||||
==================
|
||||
# Handwired Atreus50
|
||||
|
||||
This firmware is for a Handwired Atreus50 using an Arduino Pro Micro.
|
||||
This firmware is for a handwired Atreus50 using an Arduino Pro Micro.
|
||||
|
||||
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||
Hardware Supported: Arduino Pro Micro
|
||||
|
||||
## Pinout
|
||||
|
||||
@@ -11,6 +13,12 @@ The following pins are used:
|
||||
|
||||
## Compiling and loading the firmware
|
||||
|
||||
To build the firmware, run `make`.
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button.
|
||||
make handwired/atreus50:default
|
||||
|
||||
To flash the firmware onto the microcontroller, run `make avrdude`, and press the reset button.
|
||||
|
||||
make handwired/atreus50:default:avrdude
|
||||
|
||||
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).
|
||||
|
77
keyboards/handwired/ortho5x13/info.json
Normal file
77
keyboards/handwired/ortho5x13/info.json
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"keyboard_name": "ortho5x13",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 13,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1},
|
||||
{"label":"Q", "x":1, "y":1},
|
||||
{"label":"W", "x":2, "y":1},
|
||||
{"label":"E", "x":3, "y":1},
|
||||
{"label":"R", "x":4, "y":1},
|
||||
{"label":"T", "x":5, "y":1},
|
||||
{"label":"Y", "x":6, "y":1},
|
||||
{"label":"U", "x":7, "y":1},
|
||||
{"label":"I", "x":8, "y":1},
|
||||
{"label":"O", "x":9, "y":1},
|
||||
{"label":"P", "x":10, "y":1},
|
||||
{"label":"[", "x":11, "y":1},
|
||||
{"label":"]", "x":12, "y":1},
|
||||
{"label":"`", "x":0, "y":2},
|
||||
{"label":"A", "x":1, "y":2},
|
||||
{"label":"S", "x":2, "y":2},
|
||||
{"label":"D", "x":3, "y":2},
|
||||
{"label":"F", "x":4, "y":2},
|
||||
{"label":"G", "x":5, "y":2},
|
||||
{"label":"H", "x":6, "y":2},
|
||||
{"label":"J", "x":7, "y":2},
|
||||
{"label":"K", "x":8, "y":2},
|
||||
{"label":"L", "x":9, "y":2},
|
||||
{"label":";", "x":10, "y":2},
|
||||
{"label":",", "x":11, "y":2},
|
||||
{"label":"\\", "x":12, "y":2},
|
||||
{"label":"Shift", "x":0, "y":3},
|
||||
{"label":"Z", "x":1, "y":3},
|
||||
{"label":"X", "x":2, "y":3},
|
||||
{"label":"C", "x":3, "y":3},
|
||||
{"label":"V", "x":4, "y":3},
|
||||
{"label":"B", "x":5, "y":3},
|
||||
{"label":"N", "x":6, "y":3},
|
||||
{"label":"M", "x":7, "y":3},
|
||||
{"label":",", "x":8, "y":3},
|
||||
{"label":".", "x":9, "y":3},
|
||||
{"label":"/", "x":10, "y":3},
|
||||
{"label":"Enter", "x":11, "y":3},
|
||||
{"label":"Up", "x":12, "y":3},
|
||||
{"label":"Hyper", "x":0, "y":4},
|
||||
{"label":"Ctrl", "x":1, "y":4},
|
||||
{"label":"Alt", "x":2, "y":4},
|
||||
{"label":"GUI", "x":3, "y":4},
|
||||
{"label":"Lower", "x":4, "y":4},
|
||||
{"label":"Space", "x":5, "y":4, "w":2},
|
||||
{"label":"Raise", "x":7, "y":4},
|
||||
{"label":"Backspace", "x":8, "y":4},
|
||||
{"label":"Shift", "x":9, "y":4},
|
||||
{"label":"Left", "x":10, "y":4},
|
||||
{"label":"Right", "x":11, "y":4},
|
||||
{"label":"Down", "x":12, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,9 +1,4 @@
|
||||
#include "ortho5x13.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
@@ -25,146 +20,142 @@ enum custom_keycodes {
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#define KC_L1 LOWER
|
||||
#define KC_L2 RAISE
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | ` | A | S | D | F | G | H | J | K | L | ; | ' | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | Up |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Bksp |Shift | Left | Down |Right |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_compact(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
GRV , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,BSLS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENT , UP ,
|
||||
//|----+----+----+----+----+---------+----+----+----+----+----+----|
|
||||
HYPR,LCTL,LALT,LGUI, L1 , SPACE , L2 ,BSPC,RSFT,LEFT,RGHT,DOWN
|
||||
//`----+----+----+----+----+---------+----+----+----+----+----+----'
|
||||
),
|
||||
/* Qwerty
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | ` | A | S | D | F | G | H | J | K | L | ; | ' | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | Up |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Bksp |Shift | Left | Down |Right |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
//,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.
|
||||
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_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_GRV ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,KC_BSLS ,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ENT ,KC_UP ,
|
||||
//|--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------+--------|
|
||||
KC_HYPR ,KC_LCTL ,KC_LALT ,KC_LGUI ,KC_L1 , KC_SPC ,KC_L2 ,KC_BSPC ,KC_RSFT ,KC_LEFT ,KC_RGHT ,KC_DOWN
|
||||
//`--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------+--------'
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL},
|
||||
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
[_COLEMAK] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , _______,
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , _______,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Del | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL},
|
||||
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
[_DVORAK] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL , _______,
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, _______,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , _______,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play | |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, _______,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , _______,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play | |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , _______,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Musoff|Mus on| | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* ,------------------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Musoff|Mus on| | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
[_ADJUST] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , _______,
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , _______,
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______,
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
@@ -286,4 +277,4 @@ void music_scale_user(void)
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/ortho5x13:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
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).
|
||||
|
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
@@ -159,27 +158,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MAX_VOLTAGE 4.2
|
||||
#define MIN_VOLTAGE 3.2
|
||||
|
||||
#define ___ KC_NO
|
||||
|
||||
#define KEYMAP_CUSTOM( \
|
||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
|
||||
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
|
||||
tp1, tp2, tp3 \
|
||||
) \
|
||||
{ \
|
||||
{k11, k12, k13, k14, k15, k16}, \
|
||||
{k21, k22, k23, k24, k25, k26}, \
|
||||
{k31, k32, k33, k34, k35, k36}, \
|
||||
{k41, k42, k43, k44, k45, k46}, \
|
||||
{k17, k18, k19, k1a, k1b, k1c}, \
|
||||
{k27, k28, k29, k2a, k2b, k2c}, \
|
||||
{k37, k38, k39, k3a, k3b, k3c}, \
|
||||
{k47, k48, k49, k4a, k4b, k4c}, \
|
||||
{tp1, tp2, tp3, ___, ___, ___} \
|
||||
}
|
||||
|
||||
#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file
|
||||
enum led_sequence {
|
||||
LED_IND_LINUX,
|
||||
@@ -351,6 +329,3 @@ enum led_sequence {
|
||||
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
|
||||
#define PS2_USART_RX_VECT USART1_RX_vect
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
68
keyboards/handwired/promethium/info.json
Normal file
68
keyboards/handwired/promethium/info.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"keyboard_name": "Promethium51",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 16,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "label": "k11", "x": 0, "y": 0.50 },
|
||||
{ "label": "k12", "x": 1, "y": 0.30 },
|
||||
{ "label": "k13", "x": 2, "y": 0.15 },
|
||||
{ "label": "k14", "x": 3, "y": 0 },
|
||||
{ "label": "k15", "x": 4, "y": 0.15 },
|
||||
{ "label": "k16", "x": 5, "y": 0.15 },
|
||||
{ "label": "k17", "x": 10, "y": 0.15 },
|
||||
{ "label": "k18", "x": 11, "y": 0.15 },
|
||||
{ "label": "k19", "x": 12, "y": 0 },
|
||||
{ "label": "k1a", "x": 13, "y": 0.15 },
|
||||
{ "label": "k1b", "x": 14, "y": 0.30 },
|
||||
{ "label": "k1c", "x": 15, "y": 0.50 },
|
||||
|
||||
{ "label": "k21", "x": 0, "y": 1.50 },
|
||||
{ "label": "k22", "x": 1, "y": 1.30 },
|
||||
{ "label": "k23", "x": 2, "y": 1.15 },
|
||||
{ "label": "k24", "x": 3, "y": 1 },
|
||||
{ "label": "k25", "x": 4, "y": 1.15 },
|
||||
{ "label": "k26", "x": 5, "y": 1.15 },
|
||||
{ "label": "k27", "x": 10, "y": 1.15 },
|
||||
{ "label": "k28", "x": 11, "y": 1.15 },
|
||||
{ "label": "k29", "x": 12, "y": 1 },
|
||||
{ "label": "k2a", "x": 13, "y": 1.15 },
|
||||
{ "label": "k2b", "x": 14, "y": 1.30 },
|
||||
{ "label": "k2c", "x": 15, "y": 1.50 },
|
||||
|
||||
{ "label": "k31", "x": 0, "y": 2.50 },
|
||||
{ "label": "k32", "x": 1, "y": 2.30 },
|
||||
{ "label": "k33", "x": 2, "y": 2.15 },
|
||||
{ "label": "k34", "x": 3, "y": 2 },
|
||||
{ "label": "k35", "x": 4, "y": 2.15 },
|
||||
{ "label": "k36", "x": 5, "y": 2.15 },
|
||||
{ "label": "k37", "x": 10, "y": 2.15 },
|
||||
{ "label": "k38", "x": 11, "y": 2.15 },
|
||||
{ "label": "k39", "x": 12, "y": 2 },
|
||||
{ "label": "k3a", "x": 13, "y": 2.15 },
|
||||
{ "label": "k3b", "x": 14, "y": 2.30 },
|
||||
{ "label": "k3c", "x": 15, "y": 2.50 },
|
||||
|
||||
{ "label": "k41", "x": 0, "y": 3.50 },
|
||||
{ "label": "k42", "x": 1, "y": 3.30 },
|
||||
{ "label": "k43", "x": 2, "y": 3.15 },
|
||||
{ "label": "k44", "x": 3, "y": 3 },
|
||||
{ "label": "k45", "x": 4, "y": 3.15 },
|
||||
{ "label": "k46", "x": 5, "y": 3.15 },
|
||||
{ "label": "k47", "x": 10, "y": 3.15 },
|
||||
{ "label": "k48", "x": 11, "y": 3.15 },
|
||||
{ "label": "k49", "x": 12, "y": 3 },
|
||||
{ "label": "k4a", "x": 13, "y": 3.15 },
|
||||
{ "label": "k4b", "x": 14, "y": 3.30 },
|
||||
{ "label": "k4c", "x": 15, "y": 3.50 },
|
||||
|
||||
{ "label": "tp1", "x": 6.5, "y": 3.15 },
|
||||
{ "label": "tp2", "x": 7.5, "y": 3.15 },
|
||||
{ "label": "tp3", "x": 8.5, "y": 3.15 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,4 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#pragma once
|
||||
|
||||
#define PRIYADI_PROMETHIUM
|
||||
|
||||
@@ -23,5 +20,3 @@
|
||||
|
||||
#define DOUBLESPACE_LAYER_ENABLE
|
||||
// #define TOLELOT_ENABLE
|
||||
|
||||
#endif
|
||||
|
@@ -686,7 +686,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP_CUSTOM(
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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,
|
||||
@@ -706,7 +706,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
#ifdef LAYOUT_DVORAK
|
||||
[_DVORAK] = KEYMAP_CUSTOM(
|
||||
[_DVORAK] = LAYOUT(
|
||||
_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
|
||||
_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______,
|
||||
_______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
|
||||
@@ -728,7 +728,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
#ifdef LAYOUT_COLEMAK
|
||||
[_COLEMAK] = KEYMAP_CUSTOM(
|
||||
[_COLEMAK] = LAYOUT(
|
||||
_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
|
||||
_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
|
||||
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -750,7 +750,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
#ifdef LAYOUT_NORMAN
|
||||
[_NORMAN] = KEYMAP_CUSTOM(
|
||||
[_NORMAN] = LAYOUT(
|
||||
_______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______,
|
||||
_______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______,
|
||||
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -772,7 +772,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
#ifdef LAYOUT_WORKMAN
|
||||
[_WORKMAN] = KEYMAP_CUSTOM(
|
||||
[_WORKMAN] = LAYOUT(
|
||||
_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
|
||||
_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
|
||||
_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -792,7 +792,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | : | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_PUNC] = KEYMAP_CUSTOM(
|
||||
[_PUNC] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______,
|
||||
KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______,
|
||||
KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______,
|
||||
@@ -811,7 +811,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | x | | | | | 0 | , | . | : | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUM] = KEYMAP_CUSTOM(
|
||||
[_NUM] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______,
|
||||
KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
|
||||
KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______,
|
||||
@@ -830,7 +830,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUN] = KEYMAP_CUSTOM(
|
||||
[_FUN] = LAYOUT(
|
||||
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL,
|
||||
KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______,
|
||||
_______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______,
|
||||
@@ -849,7 +849,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GREEKU] = KEYMAP_CUSTOM(
|
||||
[_GREEKU] = LAYOUT(
|
||||
_______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______,
|
||||
_______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______,
|
||||
_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -868,7 +868,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GREEKL] = KEYMAP_CUSTOM(
|
||||
[_GREEKL] = LAYOUT(
|
||||
_______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______,
|
||||
_______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______,
|
||||
_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -887,7 +887,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EMPTY] = KEYMAP_CUSTOM(
|
||||
[_EMPTY] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
@@ -906,7 +906,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EMOJI] = KEYMAP_CUSTOM(
|
||||
[_EMOJI] = LAYOUT(
|
||||
X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW),
|
||||
X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS),
|
||||
X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH),
|
||||
@@ -925,7 +925,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GUI] = KEYMAP_CUSTOM(
|
||||
[_GUI] = LAYOUT(
|
||||
XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX,
|
||||
KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
|
||||
@@ -944,7 +944,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYS] = KEYMAP_CUSTOM(
|
||||
[_SYS] = LAYOUT(
|
||||
DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO,
|
||||
XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
@@ -1365,4 +1365,4 @@ void turn_off_capslock() {
|
||||
rcv = ps2_host_send(0x01);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#pragma once
|
||||
|
||||
#define PRIYADI_PROMETHIUM
|
||||
|
||||
@@ -23,5 +20,3 @@
|
||||
|
||||
#define DOUBLESPACE_LAYER_ENABLE
|
||||
// #define TOLELOT_ENABLE
|
||||
|
||||
#endif
|
||||
|
@@ -686,7 +686,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP_CUSTOM(
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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,
|
||||
@@ -706,7 +706,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
#ifdef LAYOUT_DVORAK
|
||||
[_DVORAK] = KEYMAP_CUSTOM(
|
||||
[_DVORAK] = LAYOUT(
|
||||
_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
|
||||
_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______,
|
||||
_______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
|
||||
@@ -728,7 +728,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
#ifdef LAYOUT_COLEMAK
|
||||
[_COLEMAK] = KEYMAP_CUSTOM(
|
||||
[_COLEMAK] = LAYOUT(
|
||||
_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
|
||||
_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
|
||||
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -750,7 +750,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
#ifdef LAYOUT_NORMAN
|
||||
[_NORMAN] = KEYMAP_CUSTOM(
|
||||
[_NORMAN] = LAYOUT(
|
||||
_______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______,
|
||||
_______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______,
|
||||
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -772,7 +772,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
#ifdef LAYOUT_WORKMAN
|
||||
[_WORKMAN] = KEYMAP_CUSTOM(
|
||||
[_WORKMAN] = LAYOUT(
|
||||
_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
|
||||
_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
|
||||
_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -792,7 +792,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | : | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_PUNC] = KEYMAP_CUSTOM(
|
||||
[_PUNC] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______,
|
||||
KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______,
|
||||
KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______,
|
||||
@@ -811,7 +811,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | x | | | | | 0 | , | . | : | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUM] = KEYMAP_CUSTOM(
|
||||
[_NUM] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______,
|
||||
KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
|
||||
KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______,
|
||||
@@ -830,7 +830,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUN] = KEYMAP_CUSTOM(
|
||||
[_FUN] = LAYOUT(
|
||||
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL,
|
||||
KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______,
|
||||
_______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______,
|
||||
@@ -849,7 +849,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GREEKU] = KEYMAP_CUSTOM(
|
||||
[_GREEKU] = LAYOUT(
|
||||
_______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______,
|
||||
_______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______,
|
||||
_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -868,7 +868,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GREEKL] = KEYMAP_CUSTOM(
|
||||
[_GREEKL] = LAYOUT(
|
||||
_______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______,
|
||||
_______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______,
|
||||
_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
@@ -887,7 +887,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EMPTY] = KEYMAP_CUSTOM(
|
||||
[_EMPTY] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
@@ -906,7 +906,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EMOJI] = KEYMAP_CUSTOM(
|
||||
[_EMOJI] = LAYOUT(
|
||||
X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW),
|
||||
X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS),
|
||||
X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH),
|
||||
@@ -925,7 +925,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GUI] = KEYMAP_CUSTOM(
|
||||
[_GUI] = LAYOUT(
|
||||
XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX,
|
||||
KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
|
||||
@@ -944,7 +944,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYS] = KEYMAP_CUSTOM(
|
||||
[_SYS] = LAYOUT(
|
||||
DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO,
|
||||
XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
@@ -1365,4 +1365,4 @@ void turn_off_capslock() {
|
||||
rcv = ps2_host_send(0x01);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -7,4 +7,23 @@ void battery_poll(uint8_t level);
|
||||
void led_set_kb(uint8_t usb_led);
|
||||
void led_set_user(uint8_t usb_led);
|
||||
|
||||
#define LAYOUT( \
|
||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
|
||||
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
|
||||
tp1, tp2, tp3 \
|
||||
) \
|
||||
{ \
|
||||
{k11, k12, k13, k14, k15, k16}, \
|
||||
{k21, k22, k23, k24, k25, k26}, \
|
||||
{k31, k32, k33, k34, k35, k36}, \
|
||||
{k41, k42, k43, k44, k45, k46}, \
|
||||
{k17, k18, k19, k1a, k1b, k1c}, \
|
||||
{k27, k28, k29, k2a, k2b, k2c}, \
|
||||
{k37, k38, k39, k3a, k3b, k3c}, \
|
||||
{k47, k48, k49, k4a, k4b, k4c}, \
|
||||
{tp1, tp2, tp3, KC_NO, KC_NO, KC_NO} \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,25 +0,0 @@
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
49
keyboards/iris/keymaps/omgvee/config.h
Normal file
49
keyboards/iris/keymaps/omgvee/config.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
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
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 15
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
//tap dance shenanigans
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
//force n-key rollover to be enabled every boot
|
||||
#define FORCE_NKRO
|
||||
|
||||
//some mouse keys tweaking, as it is generally too slow by default
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 0
|
173
keyboards/iris/keymaps/omgvee/keymap.c
Normal file
173
keyboards/iris/keymaps/omgvee/keymap.c
Normal file
@@ -0,0 +1,173 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include <print.h>
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _MOUSE 3
|
||||
#define _ADJUST 4
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
MOUSE,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
#define KC_MOUS TT(_MOUSE) // double tab toggle mouse layer
|
||||
#define MS_L KC_MS_LEFT
|
||||
#define MS_R KC_MS_RIGHT
|
||||
#define MS_U KC_MS_UP
|
||||
#define MS_D KC_MS_DOWN
|
||||
#define MS_B1 KC_MS_BTN1
|
||||
#define MS_B2 KC_MS_BTN2
|
||||
#define MW_U KC_MS_WH_UP
|
||||
#define MW_D KC_MS_WH_DOWN
|
||||
#define MW_L KC_MS_WH_LEFT
|
||||
#define MW_R KC_MS_WH_RIGHT
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_SCL = 0
|
||||
};
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Tap once for Shift, twice for Caps Lock
|
||||
[TD_SCL] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS)
|
||||
};
|
||||
enum {
|
||||
TD_EBT = 0
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
TD(TD_SCL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MOUS, KC_MOUS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
KC_LALT, LOWER, KC_ENT, KC_SPC, RAISE, KC_LGUI
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, KC_BSPC,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_PIPE,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, KC_ENT,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
KC_LCTL, _______, _______, _______, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, _______, _______,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
_______, _______, KC_DEL, KC_DEL, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
RGB_MOD, KC_MPRV, KC_MNXT, _______, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_ENT,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_MSTP, KC_MPLY, _______, KC_PGDN, KC_MINS, KC_LPRN, KC_RPRN, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_MOUSE] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
BL_BRTG, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, RESET,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
BL_TOGG, MS_B1, MS_U, MS_B2, MW_U, _______, _______, MS_B1, MS_B2, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, MS_L, MS_D, MS_R, MW_D, _______, MS_L, MS_D , MS_U, MS_R ,_______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
BL_STEP, _______, _______, MW_L, MW_R, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
_______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, RESET,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
dprintf("Got on layer %s ", LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _MOUSE);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
dprintf("Got off layer %s ", LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _MOUSE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
dprintf("Got on layer %s ", RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _MOUSE);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
dprintf("Got off layer %s ", RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _MOUSE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOUSE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MOUSE);
|
||||
dprintf("Got on layer %s ", MOUSE);
|
||||
update_tri_layer(_LOWER, _RAISE, _MOUSE);
|
||||
} else {
|
||||
layer_off(_MOUSE);
|
||||
dprintf("Got off layer %s ", MOUSE);
|
||||
update_tri_layer(_LOWER, _RAISE, _MOUSE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
17
keyboards/iris/keymaps/omgvee/readme.md
Normal file
17
keyboards/iris/keymaps/omgvee/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Reade.md for what I want from an Iris perfect layout
|
||||
======================================================
|
||||
|
||||
|
||||

|
||||
|
||||
- mouse keys
|
||||
- media keys and media controls
|
||||
- in-switch LED intensity controls (+/-)
|
||||
- underglow RGB hue/color controls
|
||||
- underglow RGB intensity controls
|
||||
- familiar key arrangement with Enter and symbols on the usual keys (to the right hand side)
|
||||
- navigation keys should be the vim ones really, and same ones used for mouse;
|
||||
- also have alternates on the same layer, in the form of AWSD, as well as HJKL (keep in mind the order is Left, Up, Down, Right)
|
||||
- arrow keys on one layer, however with another modifier key, they become left=home, right=end, up=page up, down=page Down
|
||||
|
||||
See keymap.c for layouts
|
7
keyboards/iris/keymaps/omgvee/rules.mk
Normal file
7
keyboards/iris/keymaps/omgvee/rules.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
@@ -52,7 +52,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
@@ -60,7 +60,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # 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 = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include QMK_KEYBOARD_h
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
|
@@ -144,7 +144,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = LAYOUT_planck_grid(
|
||||
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
|
||||
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||
@@ -164,13 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_planck_grid(
|
||||
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
|
||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
|
||||
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
|
||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
47
keyboards/s7_elephant/config.h
Normal file
47
keyboards/s7_elephant/config.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0007
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER jacky
|
||||
#define PRODUCT S7 Elephant
|
||||
#define DESCRIPTION A high-end 70% custom keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
|
||||
#define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 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
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#define RGB_DI_PIN E6
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 2
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_SLEEP
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user