Merge remote-tracking branch 'qmk/master' into firmware21

This commit is contained in:
Drashna Jael're
2021-12-17 20:42:50 -08:00
14 changed files with 33 additions and 33 deletions

View File

@@ -12,8 +12,7 @@ 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
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

View File

@@ -15,7 +15,7 @@ extern bool touchpad_init;
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
uint8_t cmdByte = READ_MASK | address; // Form the READ command byte
if (touchpad_init) {
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
spi_write(cmdByte);
spi_read(); // filler
spi_read(); // filler
@@ -27,7 +27,6 @@ void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
dprintf("error right touchpad\n");
#endif
touchpad_init = false;
j
}
spi_stop();
}
@@ -38,7 +37,7 @@ void RAP_Write(uint8_t address, uint8_t data) {
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
if (touchpad_init) {
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
spi_write(cmdByte);
spi_write(data);
} else {

View File

@@ -143,7 +143,7 @@ void pmw3360_set_cpi(uint16_t cpi) {
uint16_t pmw3360_get_cpi(void) {
uint8_t cpival = spi_read_adv(REG_Config1);
return (uint16_t)(cpival & 0xFF) * 100;
return (uint16_t)((cpival + 1) & 0xFF) * 100;
}
bool pmw3360_init(void) {
@@ -186,6 +186,8 @@ bool pmw3360_init(void) {
spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30));
spi_write_adv(REG_Lift_Config, PMW3360_LIFTOFF_DISTANCE);
bool init_success = pmw3360_check_signature();
writePinLow(PMW3360_CS_PIN);

View File

@@ -46,6 +46,10 @@
# endif
#endif
#ifndef PMW3360_LIFTOFF_DISTANCE
# define PMW3360_LIFTOFF_DISTANCE 0x02
#endif
#ifndef ROTATIONAL_TRANSFORM_ANGLE
# define ROTATIONAL_TRANSFORM_ANGLE 0x00
#endif

View File

@@ -10,7 +10,7 @@ BOOTLOADER = halfkay
# OPT_DEFS += -DLEFT_LEDS
# Build Options
# comment out to disable the options.
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
@@ -18,11 +18,9 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
CUSTOM_MATRIX = lite # Custom matrix file for the ErgoDox EZ
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # Enable N-Key Rollover
UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard
SLEEP_LED_ENABLE = no
RGB_MATRIX_ENABLE = no # enable later
RGB_MATRIX_DRIVER = IS31FL3731

View File

@@ -12,8 +12,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output

View File

@@ -5,18 +5,16 @@ MCU = STM32F303
BOOTLOADER = stm32-dfu
# 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
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
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
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = yes # Audio output on port C6
AUDIO_ENABLE = yes # Audio output
AUDIO_DRIVER = dac_additive
RGBLIGHT_ENABLE = no

View File

@@ -7,11 +7,12 @@ from subprocess import DEVNULL
from milc import cli
@cli.argument('-t', '--test', arg_only=True, action='append', default=[], help="Mapped to nose2 'testNames' positional argument - https://docs.nose2.io/en/latest/usage.html#specifying-tests-to-run")
@cli.subcommand('QMK Python Unit Tests', hidden=False if cli.config.user.developer else True)
def pytest(cli):
"""Run several linting/testing commands.
"""
nose2 = cli.run(['nose2', '-v'], capture_output=False, stdin=DEVNULL)
nose2 = cli.run(['nose2', '-v', '-t' 'lib/python', *cli.args.test], capture_output=False, stdin=DEVNULL)
flake8 = cli.run(['flake8', 'lib/python'], capture_output=False, stdin=DEVNULL)
return flake8.returncode | nose2.returncode

View File

@@ -123,7 +123,7 @@ void enter_bootloader_mode_if_requested(void) { /* Jumping to bootloader is not
# if defined(BOOTLOADER_KIIBOHD)
/* Kiibohd Bootloader (MCHCK and Infinity KB) */
# define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000
const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff";
const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
__attribute__((weak)) void bootloader_jump(void) {
void *volatile vbat = (void *)VBAT;
__builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));

View File

@@ -138,7 +138,7 @@
#define LT_CIRC ALGR(LT_COMM) // ^
#define LT_AMPR ALGR(LT_DOT) // &
#define LT_ASTR ALGR(LT_EQL) // *
#define LT_LBRC ALGR(LT_LRPN) // [
#define LT_LBRC ALGR(LT_LPRN) // [
#define LT_RBRC ALGR(LT_RPRN) // ]
#define LT_QUOT ALGR(LT_QUES) // '
#define LT_PERC ALGR(LT_X) // %

View File

@@ -102,10 +102,10 @@
// Row 1
#define SK_RNGA S(SK_SCLN) // ° (dead)
#define SK_1 S(SK_PLUS) // 1
#define SK_2 S(SK_LACU) // 2
#define SK_2 S(SK_LCAR) // 2
#define SK_3 S(SK_SCAR) // 3
#define SK_4 S(SK_CCAR) // 4
#define SK_5 S(SK_TACU) // 5
#define SK_5 S(SK_TCAR) // 5
#define SK_6 S(SK_ZCAR) // 6
#define SK_7 S(SK_YACU) // 7
#define SK_8 S(SK_AACU) // 8

View File

@@ -80,7 +80,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
// 0 1 2 3 4 5 6 7
CA_0, CA_1, CA_2, CA_3, CA_4, CA_5, CA_6, CA_7,
// 8 9 : ; < = > ?
CA_8, CA_9, CA_SCLN, CA_SCLN, CA_DOT, CA_EQL, CA_COMM, CA_6,
CA_8, CA_9, CA_SCLN, CA_SCLN, CA_COMM, CA_EQL, CA_DOT, CA_6,
// @ A B C D E F G
CA_2, CA_A, CA_B, CA_C, CA_D, CA_E, CA_F, CA_G,
// H I J K L M N O

View File

@@ -76,9 +76,9 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
// ! " # $ % & '
KC_SPC, LT_EXLM, LT_EDOT, LT_SLSH, LT_SCLN, LT_X, LT_DOT, LT_QUES,
// ( ) * + , - . /
LT_LRPN, LT_RPRN, LT_EQL, LT_QUES, LT_COMM, LT_MINS, LT_DOT, LT_SLSH,
LT_LPRN, LT_RPRN, LT_EQL, LT_QUES, LT_COMM, LT_MINS, LT_DOT, LT_SLSH,
// 0 1 2 3 4 5 6 7
LT_RPRN, LT_EXLM, LT_MINS, LT_SLSH, LT_SLCN, LT_COLN, LT_COMM, LT_DOT,
LT_RPRN, LT_EXLM, LT_MINS, LT_SLSH, LT_SCLN, LT_COLN, LT_COMM, LT_DOT,
// 8 9 : ; < = > ?
LT_EQL, LT_LPRN, LT_COLN, LT_SCLN, LT_LABK, LT_EQL, LT_LABK, LT_QUES,
// @ A B C D E F G

View File

@@ -78,7 +78,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
// ( ) * + , - . /
SK_ADIA, SK_NCAR, SK_AMPR, SK_PLUS, SK_COMM, SK_MINS, SK_DOT, SK_UACU,
// 0 1 2 3 4 5 6 7
SK_EACU, SK_PLUS, SK_LACU, SK_SCAR, SK_CCAR, SK_TACU, SK_ZCAR, SK_YACU,
SK_EACU, SK_PLUS, SK_LCAR, SK_SCAR, SK_CCAR, SK_TCAR, SK_ZCAR, SK_YACU,
// 8 9 : ; < = > ?
SK_AACU, SK_IACU, SK_DOT, SK_SCLN, SK_AMPR, SK_EQL, SK_Y, SK_COMM,
// @ A B C D E F G