mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-09-21 11:19:47 -04:00
Merge branch 'halcyon' into halcyon-elora-rev2
This commit is contained in:
commit
608f4a92e5
8 changed files with 59 additions and 140 deletions
|
@ -248,7 +248,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
|||
tap_code(KC_VOLD);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
// Page up/Page down
|
||||
// Volume control
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
|
|
|
@ -20,60 +20,5 @@
|
|||
[{"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_PGUP", "cw": "KC_PGDN"} ,{"ccw": "KC_PGUP", "cw": "KC_PGDN"}],
|
||||
[{"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_PGUP", "cw": "KC_PGDN"} ,{"ccw": "KC_PGUP", "cw": "KC_PGDN"}],
|
||||
[{"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_PGUP", "cw": "KC_PGDN"} ,{"ccw": "KC_PGUP", "cw": "KC_PGDN"}]
|
||||
],
|
||||
"config": {
|
||||
"rgb_matrix": {
|
||||
"animations": {
|
||||
"solid_color": true,
|
||||
"alphas_mods": true,
|
||||
"gradient_up_down": true,
|
||||
"gradient_left_right": true,
|
||||
"breathing": true,
|
||||
"band_sat": true,
|
||||
"band_val": true,
|
||||
"band_pinwheel_sat": true,
|
||||
"band_pinwheel_val": true,
|
||||
"band_spiral_sat": true,
|
||||
"band_spiral_val": true,
|
||||
"cycle_all": true,
|
||||
"cycle_left_right": true,
|
||||
"cycle_up_down": true,
|
||||
"cycle_out_in": true,
|
||||
"cycle_out_in_dual": true,
|
||||
"rainbow_moving_chevron": true,
|
||||
"cycle_pinwheel": true,
|
||||
"cycle_spiral": true,
|
||||
"dual_beacon": true,
|
||||
"rainbow_beacon": true,
|
||||
"rainbow_pinwheels": true,
|
||||
"flower_blooming": true,
|
||||
"raindrops": true,
|
||||
"jellybean_raindrops": true,
|
||||
"hue_breathing": true,
|
||||
"hue_pendulum": true,
|
||||
"hue_wave": true,
|
||||
"pixel_fractal": true,
|
||||
"pixel_flow": true,
|
||||
"pixel_rain": true,
|
||||
"typing_heatmap": true,
|
||||
"digital_rain": true,
|
||||
"solid_reactive_simple": true,
|
||||
"solid_reactive": true,
|
||||
"solid_reactive_wide": true,
|
||||
"solid_reactive_multiwide": true,
|
||||
"solid_reactive_cross": true,
|
||||
"solid_reactive_multicross": true,
|
||||
"solid_reactive_nexus": true,
|
||||
"solid_reactive_multinexus": true,
|
||||
"splash": true,
|
||||
"multisplash": true,
|
||||
"solid_splash": true,
|
||||
"solid_multisplash": true,
|
||||
"starlight": true,
|
||||
"starlight_dual_hue": true,
|
||||
"starlight_dual_sat": true,
|
||||
"riverflow": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -33,14 +33,14 @@
|
|||
[{"y":-0.875,"x":5},"2,1",{"x":5},"7,1"],
|
||||
[{"y":-0.625},"2,6","2,5",{"x":13},"7,5","7,6"],
|
||||
[{"y":-0.5,"x":2.5},"3,4",{"x":10},"8,4"],
|
||||
[{"y":1.5,"x":1,"d":true},"4,2\n\n\n1,0",{"x":2,"d":true},"0,0\n\n\n0,0\n\n\n\n\n\ne",{"d":true},"0,1\n\n\n0,0\n\n\n\n\n\ne",{"x":5.25,"d":true},"2,0\n\n\n2,0\n\n\n\n\n\ne",{"d":true},"2,1\n\n\n2,0\n\n\n\n\n\ne",{"x":1.75,"d":true},"9,2\n\n\n3,0"],
|
||||
[{"d":true},"4,1\n\n\n1,0",{"x":-1,"d":true},"1,0\n\n\n1,0\n\n\n\n\n\ne",{"d":true},"4,0\n\n\n1,0",{"d":true},"4,3\n\n\n1,0",{"x":-1,"d":true},"1,1\n\n\n1,0\n\n\n\n\n\ne",{"x":1},"0,0\n\n\n0,1\n\n\n\n\n\ne","0,1\n\n\n0,1\n\n\n\n\n\ne",{"x":5.25},"2,0\n\n\n2,1\n\n\n\n\n\ne","2,1\n\n\n2,1\n\n\n\n\n\ne",{"x":0.75,"d":true},"9,1\n\n\n3,0",{"x":-1,"d":true},"3,0\n\n\n3,0\n\n\n\n\n\ne",{"d":true},"9,0\n\n\n3,0",{"d":true},"9,3\n\n\n3,0",{"x":-1,"d":true},"3,1\n\n\n3,0\n\n\n\n\n\ne"],
|
||||
[{"x":1,"d":true},"4,4\n\n\n1,0",{"x":13,"d":true},"9,4\n\n\n3,0"],
|
||||
[{"y":0.5,"x":1,"d":true},"4,2\n\n\n1,1",{"x":13,"d":true},"9,2\n\n\n3,1"],
|
||||
["1,0\n\n\n1,1\n\n\n\n\n\ne",{"x":-1,"d":true},"4,1\n\n\n1,1","4,0\n\n\n1,1","1,1\n\n\n1,1\n\n\n\n\n\ne",{"x":-1,"d":true},"4,3\n\n\n1,1",{"x":11},"3,0\n\n\n3,1\n\n\n\n\n\ne",{"x":-1,"d":true},"9,1\n\n\n3,1","9,0\n\n\n3,1",{"d":true},"9,3\n\n\n3,1",{"x":-1},"3,1\n\n\n3,1\n\n\n\n\n\ne"],
|
||||
[{"x":1,"d":true},"4,4\n\n\n1,1",{"x":13,"d":true},"9,4\n\n\n3,1"],
|
||||
[{"rx":4,"ry":8.175,"y":-4.675,"x":-0.5},"3,2"],
|
||||
[{"rx":13,"y":-4.675,"x":-0.5},"8,2"],
|
||||
[{"rx":10.5,"ry":4.1,"y":2.25,"x":-10.5,"d":true},"1,0\n\n\n1,0\n\n\n\n\n\ne",{"d":true},"4,2\n\n\n1,0",{"d":true},"1,1\n\n\n1,0\n\n\n\n\n\ne",{"x":1,"d":true},"0,0\n\n\n0,0\n\n\n\n\n\ne",{"d":true},"0,1\n\n\n0,0\n\n\n\n\n\ne",{"x":5.25,"d":true},"2,0\n\n\n2,0\n\n\n\n\n\ne",{"d":true},"2,1\n\n\n2,0\n\n\n\n\n\ne",{"x":0.75,"d":true},"3,0\n\n\n3,0\n\n\n\n\n\ne",{"d":true},"9,2\n\n\n3,0",{"d":true},"3,1\n\n\n3,0\n\n\n\n\n\ne"],
|
||||
[{"x":-10.5,"d":true},"4,1\n\n\n1,0",{"d":true},"4,0\n\n\n1,0",{"d":true},"4,3\n\n\n1,0",{"x":1},"0,0\n\n\n0,1\n\n\n\n\n\ne","0,1\n\n\n0,1\n\n\n\n\n\ne",{"x":5.25},"2,0\n\n\n2,1\n\n\n\n\n\ne","2,1\n\n\n2,1\n\n\n\n\n\ne",{"x":0.75,"d":true},"9,1\n\n\n3,0",{"d":true},"9,0\n\n\n3,0",{"d":true},"9,3\n\n\n3,0"],
|
||||
[{"x":-9.5,"d":true},"4,4\n\n\n1,0",{"x":13,"d":true},"9,4\n\n\n3,0"],
|
||||
[{"y":0.5,"x":-10.5},"1,0\n\n\n1,1\n\n\n\n\n\ne",{"d":true},"4,2\n\n\n1,1","1,1\n\n\n1,1\n\n\n\n\n\ne",{"x":11},"3,0\n\n\n3,1\n\n\n\n\n\ne",{"d":true},"9,2\n\n\n3,1","3,1\n\n\n3,1\n\n\n\n\n\ne"],
|
||||
[{"x":-10.5,"d":true},"4,1\n\n\n1,1","4,0\n\n\n1,1",{"d":true},"4,3\n\n\n1,1",{"x":11,"d":true},"9,1\n\n\n3,1","9,0\n\n\n3,1",{"d":true},"9,3\n\n\n3,1"],
|
||||
[{"x":-9.5,"d":true},"4,4\n\n\n1,1",{"x":13,"d":true},"9,4\n\n\n3,1"],
|
||||
[{"rx":13,"ry":8.175,"y":-4.675,"x":-0.5},"8,2"],
|
||||
[{"r":15,"rx":4,"y":-4.675,"x":-0.5},"3,1"],
|
||||
[{"r":30,"y":-2,"x":-0.5},"3,3"],
|
||||
[{"x":-0.5},"3,5"],
|
||||
|
|
|
@ -3,34 +3,20 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define SPLIT_POINTING_ENABLE
|
||||
|
||||
#define SPLIT_TRANSACTION_IDS_KB MODULE_SYNC
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI1
|
||||
#define RP_SPI_USE_SPI1 TRUE
|
||||
|
||||
#undef RP_PWM_USE_PWM5
|
||||
#define RP_PWM_USE_PWM5 TRUE
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#define SPLIT_POINTING_ENABLE
|
||||
#define POINTING_DEVICE_COMBINED
|
||||
|
||||
// Blank SPI config, otherwise a SPI module won't work as slave
|
||||
#if !defined(HLC_SPI_DEVICE)
|
||||
#define SPI_SCK_PIN GP0 //NOT CONNECTED
|
||||
#define SPI_MOSI_PIN NO_PIN
|
||||
#define SPI_MISO_PIN NO_PIN
|
||||
|
||||
#undef SPI_SELECT_MODE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_NONE
|
||||
#endif
|
||||
#define HLC_BACKLIGHT_TIMEOUT 120000
|
||||
|
||||
#if !defined(HLC_TFT_DISPLAY)
|
||||
#define BACKLIGHT_PIN NO_PIN
|
||||
|
|
|
@ -43,6 +43,20 @@ module_t module;
|
|||
module_t module = hlc_tft_display;
|
||||
#endif
|
||||
|
||||
bool backlight_off = false;
|
||||
|
||||
// Timeout handling
|
||||
void backlight_wakeup(void) {
|
||||
backlight_off = false;
|
||||
backlight_enable();
|
||||
}
|
||||
|
||||
// Timeout handling
|
||||
void backlight_suspend(void) {
|
||||
backlight_off = true;
|
||||
backlight_disable();
|
||||
}
|
||||
|
||||
void module_sync_slave_handler(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
|
||||
if (initiator2target_buffer_size == sizeof(module)) {
|
||||
memcpy(&module_master, initiator2target_buffer, sizeof(module_master));
|
||||
|
@ -76,6 +90,15 @@ void housekeeping_task_kb(void) {
|
|||
display_module_housekeeping_task_kb(false); // Otherwise be the main display
|
||||
}
|
||||
}
|
||||
|
||||
// Backlight feature
|
||||
if (backlight_off && last_input_activity_elapsed() <= HLC_BACKLIGHT_TIMEOUT) {
|
||||
backlight_wakeup();
|
||||
}
|
||||
if (!backlight_off && last_input_activity_elapsed() > HLC_BACKLIGHT_TIMEOUT) {
|
||||
backlight_suspend();
|
||||
}
|
||||
|
||||
module_housekeeping_task_kb();
|
||||
|
||||
housekeeping_task_user();
|
||||
|
|
|
@ -5,14 +5,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define HLC_SPI_DEVICE
|
||||
#define HLC_CIRQUE_TRACKPAD
|
||||
|
||||
#define SPI_DRIVER SPID1
|
||||
#define SPI_SCK_PIN GP14
|
||||
#define SPI_MOSI_PIN GP15
|
||||
#define SPI_MISO_PIN GP12
|
||||
|
||||
#define CIRQUE_PINNACLE_DIAMETER_MM 35
|
||||
#define POINTING_DEVICE_CS_PIN GP13
|
||||
#define POINTING_DEVICE_ROTATION_180
|
||||
|
|
|
@ -5,14 +5,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define HLC_SPI_DEVICE
|
||||
#define HLC_TFT_DISPLAY
|
||||
|
||||
#define SPI_DRIVER SPID1
|
||||
#define SPI_SCK_PIN GP14
|
||||
#define SPI_MOSI_PIN GP15
|
||||
#define SPI_MISO_PIN GP12
|
||||
|
||||
// LCD Configuration
|
||||
#define LCD_RST_PIN GP26
|
||||
#define LCD_CS_PIN GP13
|
||||
|
@ -40,4 +34,4 @@
|
|||
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
|
||||
|
||||
// Timeout configuration
|
||||
#define QUANTUM_PAINTER_DISPLAY_TIMEOUT 120000
|
||||
#define QUANTUM_PAINTER_DISPLAY_TIMEOUT HLC_BACKLIGHT_TIMEOUT
|
|
@ -42,7 +42,6 @@ backlight_config_t backlight_config;
|
|||
|
||||
static uint16_t lcd_surface_fb[135*240];
|
||||
|
||||
bool backlight_off = false;
|
||||
int color_value = 0;
|
||||
|
||||
led_t last_led_usb_state = {0};
|
||||
|
@ -243,7 +242,6 @@ void update_display(void) {
|
|||
|
||||
// Quantum function
|
||||
void suspend_power_down_kb(void) {
|
||||
// backlight_suspend(); Disabled as it gives some weird behavior when rebooting the host
|
||||
qp_power(lcd, false);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
@ -251,22 +249,9 @@ void suspend_power_down_kb(void) {
|
|||
// Quantum function
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
qp_power(lcd, true);
|
||||
// backlight_wakeup(); Disabled as it gives some weird behavior when rebooting the host
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
// Timeout handling
|
||||
void backlight_wakeup(void) {
|
||||
backlight_off = false;
|
||||
backlight_enable();
|
||||
}
|
||||
|
||||
// Timeout handling
|
||||
void backlight_suspend(void) {
|
||||
backlight_off = true;
|
||||
backlight_disable();
|
||||
}
|
||||
|
||||
// Called from halcyon.c
|
||||
bool module_post_init_kb(void) {
|
||||
setPinOutput(LCD_RST_PIN);
|
||||
|
@ -296,14 +281,6 @@ bool module_post_init_kb(void) {
|
|||
|
||||
// Called from halcyon.c
|
||||
bool display_module_housekeeping_task_kb(bool second_display) {
|
||||
// Backlight feature
|
||||
if (backlight_off && last_input_activity_elapsed() <= QUANTUM_PAINTER_DISPLAY_TIMEOUT) {
|
||||
backlight_wakeup();
|
||||
}
|
||||
if (!backlight_off && last_input_activity_elapsed() > QUANTUM_PAINTER_DISPLAY_TIMEOUT) {
|
||||
backlight_suspend();
|
||||
}
|
||||
|
||||
if(!display_module_housekeeping_task_user(second_display)) { return false; }
|
||||
|
||||
if(second_display) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue