diff --git a/keyboards/splitkb/halcyon/kyria/keymaps/default_hlc/keymap.c b/keyboards/splitkb/halcyon/kyria/keymaps/default_hlc/keymap.c index 6dcb5e3c..861bc8e6 100644 --- a/keyboards/splitkb/halcyon/kyria/keymaps/default_hlc/keymap.c +++ b/keyboards/splitkb/halcyon/kyria/keymaps/default_hlc/keymap.c @@ -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 { diff --git a/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/keymap.json b/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/keymap.json index 07402a64..e27a0bed 100644 --- a/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/keymap.json +++ b/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/keymap.json @@ -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 - } - } - } + ] } diff --git a/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/vial.json b/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/vial.json index 386b7ae0..0f3501cb 100644 --- a/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/vial.json +++ b/keyboards/splitkb/halcyon/kyria/keymaps/vial_hlc/vial.json @@ -20,37 +20,37 @@ ] ], "keymap": [ - [{"y":0.25,"x":3},"0,3",{"x":9},"5,3"], - [{"y":-0.75,"x":2},"0,4",{"x":1},"0,2",{"x":7},"5,2",{"x":1},"5,4"], - [{"y":-0.875,"x":5},"0,1",{"x":5},"5,1"], - [{"y":-0.625},"0,6","0,5",{"x":13},"5,5","5,6"], - [{"y":-0.75,"x":3},"1,3",{"x":9},"6,3"], - [{"y":-0.75,"x":2},"1,4",{"x":1},"1,2",{"x":7},"6,2",{"x":1},"6,4"], - [{"y":-0.875,"x":5},"1,1",{"x":5},"6,1"], - [{"y":-0.625},"1,6","1,5",{"x":13},"6,5","6,6"], - [{"y":-0.75,"x":3},"2,3",{"x":9},"7,3"], - [{"y":-0.75,"x":2},"2,4",{"x":1},"2,2",{"x":7},"7,2",{"x":1},"7,4"], - [{"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"], - [{"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"], - [{"r":45,"y":-2,"x":-0.5},"2,0"], - [{"x":-0.5},"3,0"], - [{"r":-45,"rx":13,"y":-5.675,"x":-0.5},"7,0"], - [{"x":-0.5},"8,0"], - [{"r":-30,"y":-2,"x":-0.5},"8,3"], - [{"x":-0.5},"8,5"], - [{"r":-15,"y":-1,"x":-0.5},"8,1"] + [{"y":0.25,"x":3},"0,3",{"x":9},"5,3"], + [{"y":-0.75,"x":2},"0,4",{"x":1},"0,2",{"x":7},"5,2",{"x":1},"5,4"], + [{"y":-0.875,"x":5},"0,1",{"x":5},"5,1"], + [{"y":-0.625},"0,6","0,5",{"x":13},"5,5","5,6"], + [{"y":-0.75,"x":3},"1,3",{"x":9},"6,3"], + [{"y":-0.75,"x":2},"1,4",{"x":1},"1,2",{"x":7},"6,2",{"x":1},"6,4"], + [{"y":-0.875,"x":5},"1,1",{"x":5},"6,1"], + [{"y":-0.625},"1,6","1,5",{"x":13},"6,5","6,6"], + [{"y":-0.75,"x":3},"2,3",{"x":9},"7,3"], + [{"y":-0.75,"x":2},"2,4",{"x":1},"2,2",{"x":7},"7,2",{"x":1},"7,4"], + [{"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"], + [{"rx":4,"ry":8.175,"y":-4.675,"x":-0.5},"3,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"], + [{"r":45,"y":-2,"x":-0.5},"2,0"], + [{"x":-0.5},"3,0"], + [{"r":-45,"rx":13,"y":-5.675,"x":-0.5},"7,0"], + [{"x":-0.5},"8,0"], + [{"r":-30,"y":-2,"x":-0.5},"8,3"], + [{"x":-0.5},"8,5"], + [{"r":-15,"y":-1,"x":-0.5},"8,1"] ] } } diff --git a/users/halcyon_modules/config.h b/users/halcyon_modules/config.h index f266b985..0019608a 100644 --- a/users/halcyon_modules/config.h +++ b/users/halcyon_modules/config.h @@ -3,34 +3,20 @@ #pragma once -#define SPLIT_POINTING_ENABLE - #define SPLIT_TRANSACTION_IDS_KB MODULE_SYNC #include_next -#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 diff --git a/users/halcyon_modules/halcyon.c b/users/halcyon_modules/halcyon.c index d5593378..e96282a8 100644 --- a/users/halcyon_modules/halcyon.c +++ b/users/halcyon_modules/halcyon.c @@ -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(); diff --git a/users/halcyon_modules/hlc_cirque_trackpad/config.h b/users/halcyon_modules/hlc_cirque_trackpad/config.h index 6a4be5e5..cbae5653 100644 --- a/users/halcyon_modules/hlc_cirque_trackpad/config.h +++ b/users/halcyon_modules/hlc_cirque_trackpad/config.h @@ -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 diff --git a/users/halcyon_modules/hlc_tft_display/config.h b/users/halcyon_modules/hlc_tft_display/config.h index 3619fda2..8abf5d00 100644 --- a/users/halcyon_modules/hlc_tft_display/config.h +++ b/users/halcyon_modules/hlc_tft_display/config.h @@ -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 \ No newline at end of file +#define QUANTUM_PAINTER_DISPLAY_TIMEOUT HLC_BACKLIGHT_TIMEOUT \ No newline at end of file diff --git a/users/halcyon_modules/hlc_tft_display/hlc_tft_display.c b/users/halcyon_modules/hlc_tft_display/hlc_tft_display.c index 9931122f..4aad825f 100644 --- a/users/halcyon_modules/hlc_tft_display/hlc_tft_display.c +++ b/users/halcyon_modules/hlc_tft_display/hlc_tft_display.c @@ -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) {