Merge remote-tracking branch 'origin/halcyon' into halcyon-corne-rev2
This commit is contained in:
		
						commit
						9662aea255
					
				
					 46 changed files with 81 additions and 65 deletions
				
			
		| 
						 | 
				
			
			@ -1,9 +1,6 @@
 | 
			
		|||
// Include the main display functions so we don't have to initialize the display again
 | 
			
		||||
#include "hlc_tft_display/hlc_tft_display.h"
 | 
			
		||||
 | 
			
		||||
// Include the QP api
 | 
			
		||||
#include "qp_surface.h"
 | 
			
		||||
 | 
			
		||||
// Add a font, this font is generated using the QP CLI tools (https://docs.qmk.fm/quantum_painter#quantum-painter-cli)
 | 
			
		||||
#include "graphics/thintel15.qff.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
POST_CONFIG_H += $(USER_PATH)/hlc_cirque_trackpad/config.h
 | 
			
		||||
| 
						 | 
				
			
			@ -1,2 +0,0 @@
 | 
			
		|||
SRC += $(USER_PATH)/hlc_encoder/hlc_encoder.c
 | 
			
		||||
POST_CONFIG_H += $(USER_PATH)/hlc_encoder/config.h
 | 
			
		||||
| 
						 | 
				
			
			@ -1,19 +0,0 @@
 | 
			
		|||
SRC += $(USER_PATH)/hlc_tft_display/hlc_tft_display.c
 | 
			
		||||
POST_CONFIG_H += $(USER_PATH)/hlc_tft_display/config.h
 | 
			
		||||
 | 
			
		||||
# Fonts
 | 
			
		||||
SRC += $(USER_PATH)/hlc_tft_display/graphics/fonts/Retron2000-27.qff.c \
 | 
			
		||||
       $(USER_PATH)/hlc_tft_display/graphics/fonts/Retron2000-underline-27.qff.c
 | 
			
		||||
 | 
			
		||||
# Numbers in image format
 | 
			
		||||
SRC += $(USER_PATH)/hlc_tft_display/graphics/numbers/0.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/1.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/2.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/3.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/4.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/5.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/6.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/7.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/8.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/9.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/hlc_tft_display/graphics/numbers/undef.qgf.c
 | 
			
		||||
| 
						 | 
				
			
			@ -1,32 +1,4 @@
 | 
			
		|||
SRC += halcyon.c
 | 
			
		||||
 | 
			
		||||
# May need to be changed when adding more pointing devices
 | 
			
		||||
POINTING_DEVICE_ENABLE = yes
 | 
			
		||||
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
 | 
			
		||||
 | 
			
		||||
# May need to be changed when adding more displays
 | 
			
		||||
QUANTUM_PAINTER_ENABLE = yes
 | 
			
		||||
QUANTUM_PAINTER_DRIVERS += st7789_spi surface
 | 
			
		||||
 | 
			
		||||
BACKLIGHT_ENABLE = yes
 | 
			
		||||
BACKLIGHT_DRIVER = pwm
 | 
			
		||||
 | 
			
		||||
HALCONFDIR += $(USER_PATH)/halconf.h
 | 
			
		||||
 | 
			
		||||
ifdef HLC_ENCODER
 | 
			
		||||
  include $(USER_PATH)/hlc_encoder/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef HLC_TFT_DISPLAY
 | 
			
		||||
  include $(USER_PATH)/hlc_tft_display/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef HLC_CIRQUE_TRACKPAD
 | 
			
		||||
  include $(USER_PATH)/hlc_cirque_trackpad/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
HLC_OPTIONS := $(HLC_NONE) $(HLC_CIRQUE_TRACKPAD) $(HLC_ENCODER) $(HLC_TFT_DISPLAY)
 | 
			
		||||
 | 
			
		||||
ifeq ($(filter 1, $(HLC_OPTIONS)), )
 | 
			
		||||
$(error Halcyon_modules used but wrong or no module specified. Please specify one by adding `-e <module_name>=1` to your compile command where <module_name> can be: HLC_NONE, HLC_CIRQUE_TRACKPAD, HLC_ENCODER or HLC_TFT_DISPLAY)
 | 
			
		||||
# Add this to your existing rules.mk if you have one
 | 
			
		||||
ifneq ($(filter $(strip $(KEYBOARD)), splitkb/halcyon/kyria/rev4),)
 | 
			
		||||
	include $(USER_PATH)/splitkb/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,7 @@
 | 
			
		|||
#define SPLIT_LAYER_STATE_ENABLE
 | 
			
		||||
 | 
			
		||||
// Kyria
 | 
			
		||||
#if PRODUCT_ID == 0x7FCE
 | 
			
		||||
#if defined(KEYBOARD_splitkb_halcyon_kyria_rev4)
 | 
			
		||||
    #undef ENCODER_A_PINS
 | 
			
		||||
    #define ENCODER_A_PINS { GP23, HLC_ENCODER_A }
 | 
			
		||||
    #undef ENCODER_B_PINS
 | 
			
		||||
| 
						 | 
				
			
			@ -1,11 +1,15 @@
 | 
			
		|||
// Copyright 2024 splitkb.com (support@splitkb.com)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
#include "halcyon.h"
 | 
			
		||||
#include "transactions.h"
 | 
			
		||||
#include "split_util.h"
 | 
			
		||||
#include "_wait.h"
 | 
			
		||||
 | 
			
		||||
__attribute__((weak)) void module_suspend_power_down_kb(void);
 | 
			
		||||
__attribute__((weak)) void module_suspend_wakeup_init_kb(void);
 | 
			
		||||
 | 
			
		||||
__attribute__((weak)) bool module_post_init_kb(void) {
 | 
			
		||||
    return module_post_init_user();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -64,6 +68,18 @@ void module_sync_slave_handler(uint8_t initiator2target_buffer_size, const void*
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void suspend_power_down_kb(void) {
 | 
			
		||||
    module_suspend_power_down_kb();
 | 
			
		||||
 | 
			
		||||
    suspend_power_down_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void suspend_wakeup_init_kb(void) {
 | 
			
		||||
    module_suspend_wakeup_init_kb();
 | 
			
		||||
 | 
			
		||||
    suspend_wakeup_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void keyboard_post_init_kb(void) {
 | 
			
		||||
    // Register module sync split transaction
 | 
			
		||||
    transaction_register_rpc(MODULE_SYNC, module_sync_slave_handler);
 | 
			
		||||
| 
						 | 
				
			
			@ -125,7 +141,7 @@ report_mouse_t pointing_device_task_combined_kb(report_mouse_t left_report, repo
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
// Kyria
 | 
			
		||||
#if PRODUCT_ID == 0x7FCE
 | 
			
		||||
#if defined(KEYBOARD_splitkb_halcyon_kyria_rev4)
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
#include "rgb_matrix.h"
 | 
			
		||||
led_config_t g_led_config = {
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
POST_CONFIG_H += $(USER_PATH)/splitkb/hlc_cirque_trackpad/config.h
 | 
			
		||||
							
								
								
									
										2
									
								
								users/halcyon_modules/splitkb/hlc_encoder/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								users/halcyon_modules/splitkb/hlc_encoder/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
SRC += $(USER_PATH)/splitkb/hlc_encoder/hlc_encoder.c
 | 
			
		||||
POST_CONFIG_H += $(USER_PATH)/splitkb/hlc_encoder/config.h
 | 
			
		||||
| 
						 | 
				
			
			@ -4,7 +4,6 @@
 | 
			
		|||
#include "halcyon.h"
 | 
			
		||||
#include "hlc_tft_display.h"
 | 
			
		||||
 | 
			
		||||
#include "qp_surface.h"
 | 
			
		||||
#include "hardware/structs/rosc.h"
 | 
			
		||||
 | 
			
		||||
// Fonts mono2
 | 
			
		||||
| 
						 | 
				
			
			@ -244,16 +243,14 @@ void update_display(void) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Quantum function
 | 
			
		||||
void suspend_power_down_kb(void) {
 | 
			
		||||
// Called from halcyon.c
 | 
			
		||||
void module_suspend_power_down_kb(void) {
 | 
			
		||||
    qp_power(lcd, false);
 | 
			
		||||
    suspend_power_down_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Quantum function
 | 
			
		||||
void suspend_wakeup_init_kb(void) {
 | 
			
		||||
// Called from halcyon.c
 | 
			
		||||
void module_suspend_wakeup_init_kb(void) {
 | 
			
		||||
    qp_power(lcd, true);
 | 
			
		||||
    suspend_wakeup_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Called from halcyon.c
 | 
			
		||||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "qp.h"
 | 
			
		||||
#include "qp_surface.h"
 | 
			
		||||
 | 
			
		||||
// All values (including hue) are scaled to 0-255
 | 
			
		||||
#define HSV_SPLITKB 145, 235, 155
 | 
			
		||||
							
								
								
									
										19
									
								
								users/halcyon_modules/splitkb/hlc_tft_display/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								users/halcyon_modules/splitkb/hlc_tft_display/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
SRC += $(USER_PATH)/splitkb/hlc_tft_display/hlc_tft_display.c
 | 
			
		||||
POST_CONFIG_H += $(USER_PATH)/splitkb/hlc_tft_display/config.h
 | 
			
		||||
 | 
			
		||||
# Fonts
 | 
			
		||||
SRC += $(USER_PATH)/splitkb/hlc_tft_display/graphics/fonts/Retron2000-27.qff.c \
 | 
			
		||||
       $(USER_PATH)/splitkb/hlc_tft_display/graphics/fonts/Retron2000-underline-27.qff.c
 | 
			
		||||
 | 
			
		||||
# Numbers in image format
 | 
			
		||||
SRC += $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/0.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/1.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/2.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/3.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/4.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/5.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/6.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/7.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/8.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/9.qgf.c \
 | 
			
		||||
	   $(USER_PATH)/splitkb/hlc_tft_display/graphics/numbers/undef.qgf.c
 | 
			
		||||
							
								
								
									
										33
									
								
								users/halcyon_modules/splitkb/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								users/halcyon_modules/splitkb/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,33 @@
 | 
			
		|||
# May need to be changed when adding more pointing devices
 | 
			
		||||
POINTING_DEVICE_ENABLE = yes
 | 
			
		||||
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
 | 
			
		||||
 | 
			
		||||
# May need to be changed when adding more displays
 | 
			
		||||
QUANTUM_PAINTER_ENABLE = yes
 | 
			
		||||
QUANTUM_PAINTER_DRIVERS += st7789_spi surface
 | 
			
		||||
 | 
			
		||||
BACKLIGHT_ENABLE = yes
 | 
			
		||||
BACKLIGHT_DRIVER = pwm
 | 
			
		||||
 | 
			
		||||
VPATH += $(USER_PATH)/splitkb/
 | 
			
		||||
SRC += $(USER_PATH)/splitkb/halcyon.c
 | 
			
		||||
HALCONFDIR += $(USER_PATH)/splitkb/halconf.h
 | 
			
		||||
POST_CONFIG_H += $(USER_PATH)/splitkb/config.h
 | 
			
		||||
 | 
			
		||||
ifdef HLC_ENCODER
 | 
			
		||||
  include $(USER_PATH)/splitkb/hlc_encoder/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef HLC_TFT_DISPLAY
 | 
			
		||||
  include $(USER_PATH)/splitkb/hlc_tft_display/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef HLC_CIRQUE_TRACKPAD
 | 
			
		||||
  include $(USER_PATH)/splitkb/hlc_cirque_trackpad/rules.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
HLC_OPTIONS := $(HLC_NONE) $(HLC_CIRQUE_TRACKPAD) $(HLC_ENCODER) $(HLC_TFT_DISPLAY)
 | 
			
		||||
 | 
			
		||||
ifeq ($(filter 1, $(HLC_OPTIONS)), )
 | 
			
		||||
$(error Halcyon_modules used but wrong or no module specified. Please specify one by adding `-e <module_name>=1` to your compile command where <module_name> can be: HLC_NONE, HLC_CIRQUE_TRACKPAD, HLC_ENCODER or HLC_TFT_DISPLAY)
 | 
			
		||||
endif
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue