Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot
2022-04-17 19:54:33 +00:00
13 changed files with 211 additions and 503 deletions

View File

@@ -42,11 +42,10 @@ static const SerialConfig ble_uart_config = {
static uint8_t led_mcu_wakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7d, 0x02, 0x01, 0x02};
static uint8_t led_enabled = 1;
ble_capslock_t ble_capslock = {._dummy = {0}, .caps_lock = false};
#ifdef RGB_MATRIX_ENABLE
static uint8_t led_enabled = 1;
static uint8_t current_rgb_row = 0;
#endif
@@ -227,69 +226,69 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if(rgb_matrix_is_enabled()) ap2_led_disable();
else ap2_led_enable();
return true;
#endif
case KC_AP_RGB_VAI:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
rgb_matrix_increase_hue();
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_decrease_hue();
return false;
} else {
rgb_matrix_increase_val();
}
}
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
rgb_matrix_increase_hue();
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_decrease_hue();
return false;
} else {
rgb_matrix_increase_val();
}
}
return true;
case KC_AP_RGB_VAD:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
rgb_matrix_increase_sat();
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_decrease_sat();
return false;
} else {
rgb_matrix_decrease_val();
}
}
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
rgb_matrix_increase_sat();
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_decrease_sat();
return false;
} else {
rgb_matrix_decrease_val();
}
}
return true;
case KC_AP_RGB_TOG:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
rgb_matrix_increase_speed();
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_decrease_speed();
return false;
} else {
if (led_enabled) {
ap2_led_disable();
rgb_matrix_disable();
led_enabled = 0;
} else {
ap2_led_enable();
rgb_matrix_enable();
led_enabled = 1;
}
return true;
}
}
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
rgb_matrix_increase_speed();
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_decrease_speed();
return false;
} else {
if (led_enabled) {
ap2_led_disable();
rgb_matrix_disable();
led_enabled = 0;
} else {
ap2_led_enable();
rgb_matrix_enable();
led_enabled = 1;
}
return true;
}
}
return true;
case KC_AP_RGB_MOD:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_step_reverse();
return false;
} else {
rgb_matrix_step();
}
}
if (record->event.pressed) {
if (get_mods() & MOD_MASK_CTRL) {
rgb_matrix_step_reverse();
return false;
} else {
rgb_matrix_step();
}
}
return true;
#endif
default:
break;

View File

@@ -46,3 +46,6 @@
#define MATRIX_COL_PINS \
{ C4, C5, B10, B11, C0, A15, A8, A10, A11, A12, A13, A14, B2, B3 }
// Obins stock firmware has something similar to this already enabled, but disabled by default in QMK
#define PERMISSIVE_HOLD

View File

@@ -1 +0,0 @@
AnnePro2, ANSI C15 version.

View File

@@ -1,12 +1,3 @@
# Anne Pro 2
SRC = \
matrix.c \
annepro2_ble.c \
ap2_led.c \
protocol.c \
rgb_driver.c \
config_led.c
# MCU
MCU = cortex-m0plus
ARMV = 6
@@ -18,23 +9,44 @@ MCU_STARTUP = ht32f523xx
BOARD = ANNEPRO2_C15
# Options
# Bootloader selection
BOOTLOADER = custom
PROGRAM_CMD = annepro2_tools --boot $(BUILD_DIR)/$(TARGET).bin
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # 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 = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
# Custom RGB matrix handling
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = custom
# Keys
CUSTOM_MATRIX = lite
NKRO_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
KEY_LOCK_ENABLE = no
LAYOUTS = 60_ansi
# Other featues
BOOTMAGIC_ENABLE = no
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
# Other features
RAW_ENABLE = no
MIDI_ENABLE = no
VIRTSER_ENABLE = no
COMBO_ENABLE = no
BOOTLOADER = custom
PROGRAM_CMD = annepro2_tools --boot $(BUILD_DIR)/$(TARGET).bin
LAYOUTS = 60_ansi
# Anne Pro 2
SRC = \
matrix.c \
annepro2_ble.c \
ap2_led.c \
protocol.c \
rgb_driver.c \
config_led.c

View File

@@ -44,3 +44,6 @@
// inputs (columns are sampled)
#define MATRIX_COL_PINS \
{ C4, C5, D0, B15, C11, A15, C12, C13, A8, A10, A11, A14, D2, D3 }
// Obins stock firmware has something similar to this already enabled, but disabled by default in QMK
#define PERMISSIVE_HOLD

View File

@@ -1 +0,0 @@
AnnePro2, ANSI C18 version.

View File

@@ -1,12 +1,3 @@
# Anne Pro 2
SRC = \
matrix.c \
annepro2_ble.c \
ap2_led.c \
protocol.c \
rgb_driver.c \
config_led.c
# MCU
MCU = cortex-m0plus
ARMV = 6
@@ -18,23 +9,44 @@ MCU_STARTUP = ht32f523xx
BOARD = ANNEPRO2_C18
# Options
# Bootloader selection
BOOTLOADER = custom
PROGRAM_CMD = annepro2_tools --boot $(BUILD_DIR)/$(TARGET).bin
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # 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 = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
# Custom RGB matrix handling
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = custom
# Keys
CUSTOM_MATRIX = lite
NKRO_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
KEY_LOCK_ENABLE = no
LAYOUTS = 60_ansi
# Other featues
BOOTMAGIC_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
# Other features
RAW_ENABLE = no
MIDI_ENABLE = no
VIRTSER_ENABLE = no
COMBO_ENABLE = no
BOOTLOADER = custom
PROGRAM_CMD = annepro2_tools --boot $(BUILD_DIR)/$(TARGET).bin
LAYOUTS = 60_ansi
# Anne Pro 2
SRC = \
matrix.c \
annepro2_ble.c \
ap2_led.c \
protocol.c \
rgb_driver.c \
config_led.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +0,0 @@
/* Copyright 2021 OpenAnnePro community
*
* 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
// Obins stock firmware has something similar to this already enabled, but disabled by default in QMK
#define PERMISSIVE_HOLD

View File

@@ -1,20 +0,0 @@
/* Copyright 2021 OpenAnnePro community
*
* 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
// Obins stock firmware has something similar to this already enabled, but disabled by default in QMK
#define PERMISSIVE_HOLD

View File

@@ -1,20 +0,0 @@
/* Copyright 2021 OpenAnnePro community
*
* 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
// Obins stock firmware has something similar to this already enabled, but disabled by default in QMK
#define PERMISSIVE_HOLD

View File

@@ -1,3 +0,0 @@
# Custom RGB matrix handling
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = custom

View File

@@ -1,12 +1,10 @@
# Anne Pro 2 rev. C15 and C18 QMK firmware
## Introduction
An ANSI-layout 60% keyboard featuring Bluetooth support and per-key RGB lighting.
This is the QMK firmware repository for the Anne Pro 2 rev. C15 and C18 keyboard.
## Layouts
Keyboard has 60% ANSI standard layout.
* Keyboard Maintainer: [bwisn](https://github.com/bwisn)
* Hardware Supported: Anne Pro 2, [C15](c15/) and [C18](c18/) versions
* Hardware Availability: [annepro.net](https://www.annepro.net/), [Hexcore](https://www.hexcore.xyz/annepro2)
## How to compile
@@ -25,26 +23,26 @@ If you want to compile the Anne Pro 2 C15 default keymap use:
If you want the executable instead of compiling it yourself, [download it here](https://ci.codetector.org/job/OpenAnnePro/job/AnnePro2-Tools/job/master/).
Windows and Linux versions are available. Otherwise, follow the steps below:
0. Install the latest stable `rust` toolchain using [rustup](https://rustup.rs/)
0. Also install [Visual Studio Community edition](https://visualstudio.microsoft.com/downloads/)
1. Install the latest stable `rust` toolchain using [rustup](https://rustup.rs/)
1. Also install [Visual Studio Community edition](https://visualstudio.microsoft.com/downloads/)
including the C/C++ module to prevent errors while compiling
0. Download or Clone the [AnnePro2-Tools](https://github.com/OpenAnnePro/AnnePro2-Tools) project.
0. Compile the tool using
```bash
cargo build --release
```
0. The compiled tool should be in `./target/release/annepro2_tools` (In later I will refer to this as `annepro2_tools`)
1. Download or Clone the [AnnePro2-Tools](https://github.com/OpenAnnePro/AnnePro2-Tools) project.
1. Compile the tool using
```bash
cargo build --release
```
The compiled tool should be in `./target/release/annepro2_tools` (In later I will refer to this as `annepro2_tools`)
### Flashing the firmware
0. Put the keyboard into DFU/IAP mode by unplugging the keyboard, then holding ESC while plugging it back in.
0. Run annepro2_tools with the firmware you just built.
**Please substitute with the correct paths and correct bin file if you chose another keymap profile**
```bash
annepro2_tools annepro2_c15_default.bin
```
1. Put the keyboard into DFU/IAP mode by unplugging the keyboard, then holding ESC while plugging it back in.
1. Run annepro2_tools with the firmware you just built.
**Please substitute with the correct paths and correct bin file if you chose another keymap profile.**
```bash
annepro2_tools annepro2_c15_default.bin
```
If the tool can't find the keyboard please double check you have the keyboard in IAP mode.
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).
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).