forked from mirrors/qmk_userspace
		
	[Keyboard] Sol 3 Keyboard from RGBKB (#15687)
Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Franklyn Tackitt <franklyn@tackitt.net>
This commit is contained in:
		
					parent
					
						
							
								b45a037c7e
							
						
					
				
			
			
				commit
				
					
						ad702096a9
					
				
			
		
					 25 changed files with 1268 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -292,7 +292,7 @@ void touch_encoder_calibrate(void) {
 | 
			
		|||
    write_register8(QT_CALIBRATE, 0x01);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool touch_encoder_calibrating(void) {
 | 
			
		||||
bool touch_encoder_is_calibrating(void) {
 | 
			
		||||
    return touch_raw[0] & CALIBRATION_BIT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -300,8 +300,8 @@ void touch_encoder_toggle(void) {
 | 
			
		|||
    touch_disabled = !touch_disabled;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool touch_encoder_toggled(void) {
 | 
			
		||||
    return touch_disabled;
 | 
			
		||||
bool touch_encoder_is_on(void) {
 | 
			
		||||
    return !touch_disabled;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,10 +34,10 @@ void touch_encoder_init(void);
 | 
			
		|||
void touch_encoder_update(int8_t transaction_id);
 | 
			
		||||
 | 
			
		||||
void touch_encoder_calibrate(void);
 | 
			
		||||
bool touch_encoder_calibrating(void);
 | 
			
		||||
bool touch_encoder_is_calibrating(void);
 | 
			
		||||
 | 
			
		||||
void touch_encoder_toggle(void);
 | 
			
		||||
bool touch_encoder_toggled(void);
 | 
			
		||||
bool touch_encoder_is_on(void);
 | 
			
		||||
 | 
			
		||||
// Called when touch encoder is tapped, weak function overridable by the kb
 | 
			
		||||
bool touch_encoder_tapped_kb(uint8_t index, uint8_t section);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,8 +21,8 @@
 | 
			
		|||
 | 
			
		||||
/* Matrix Configuration - Rows are doubled up */
 | 
			
		||||
#define MATRIX_ROWS 14
 | 
			
		||||
// B1, A2 reserved for encoder / touch encoder support
 | 
			
		||||
#define MATRIX_ROW_PINS { A1, A3, B3, A13, B15, B1, A2 }
 | 
			
		||||
// Last pins reserved for encoder / touch encoder support
 | 
			
		||||
#define MATRIX_ROW_PINS { A1, A3, B3, A13, B15, NO_PIN, NO_PIN }
 | 
			
		||||
#define MATRIX_COLS 7
 | 
			
		||||
#define MATRIX_COL_PINS { A0, B11, B0, B10, B12, B2, A8 }
 | 
			
		||||
#define MATRIX_IO_DELAY 5
 | 
			
		||||
| 
						 | 
				
			
			@ -35,11 +35,11 @@
 | 
			
		|||
#define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe
 | 
			
		||||
#define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe
 | 
			
		||||
#define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster
 | 
			
		||||
#define TOUCH_SEGMENTS 3
 | 
			
		||||
 | 
			
		||||
/* Encoder Configuration */
 | 
			
		||||
#define ENCODERS_PAD_A { B8, B9 }
 | 
			
		||||
#define ENCODERS_PAD_B { A14, A15 }
 | 
			
		||||
#define TOUCH_SEGMENTS 3
 | 
			
		||||
 | 
			
		||||
/* COL2ROW or ROW2COL */
 | 
			
		||||
#define DIODE_DIRECTION COL2ROW
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -226,8 +226,8 @@ static void render_leds(void)
 | 
			
		|||
static void render_touch(void)
 | 
			
		||||
{
 | 
			
		||||
    // Host Touch LED Status
 | 
			
		||||
    oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_on() ? PSTR("TOUCH")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_calibrating() ? PSTR("CLBRT")  : PSTR("     "), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool oled_task_user(void) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -226,8 +226,8 @@ static void render_leds(void)
 | 
			
		|||
static void render_touch(void)
 | 
			
		||||
{
 | 
			
		||||
    // Host Touch LED Status
 | 
			
		||||
    oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_on() ? PSTR("TOUCH")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_calibrating() ? PSTR("CLBRT")  : PSTR("     "), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool oled_task_user(void) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -189,8 +189,8 @@ static void render_leds(void)
 | 
			
		|||
static void render_touch(void)
 | 
			
		||||
{
 | 
			
		||||
    // Host Touch LED Status
 | 
			
		||||
    oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_on() ? PSTR("TOUCH")  : PSTR("     "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_calibrating() ? PSTR("CLBRT")  : PSTR("     "), false);
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
static uint32_t scan_counter = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										0
									
								
								keyboards/rgbkb/sol3/.noci
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								keyboards/rgbkb/sol3/.noci
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										182
									
								
								keyboards/rgbkb/sol3/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										182
									
								
								keyboards/rgbkb/sol3/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,182 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "config_common.h"
 | 
			
		||||
 | 
			
		||||
/* USB Device descriptor parameter */
 | 
			
		||||
#define VENDOR_ID       0x3535
 | 
			
		||||
#define PRODUCT_ID      0x3510
 | 
			
		||||
#define MANUFACTURER    RGBKB
 | 
			
		||||
#define PRODUCT         Sol 3
 | 
			
		||||
 | 
			
		||||
#define USB_POLLING_INTERVAL_MS 1
 | 
			
		||||
 | 
			
		||||
/* Matrix Configuration - Rows are doubled up */
 | 
			
		||||
#define MATRIX_ROWS 12
 | 
			
		||||
// Last pins reserved for encoder / touch encoder support
 | 
			
		||||
#define MATRIX_ROW_PINS       { B15,  A8, A15, B12, A3, NO_PIN }
 | 
			
		||||
#define MATRIX_ROW_PINS_RIGHT { B15, B14,  A8, A13, A7, NO_PIN }
 | 
			
		||||
#define MATRIX_COLS 8
 | 
			
		||||
// Empty matrix entries used for encoder / touch encoder support
 | 
			
		||||
#define MATRIX_COL_PINS       { A6, A7, B0, B2, B1,  B9,  B3,  B4 }
 | 
			
		||||
#define MATRIX_COL_PINS_RIGHT { B9, B8, B4, A6, A3, B10, B12, B11 }
 | 
			
		||||
#define MATRIX_IO_DELAY 5
 | 
			
		||||
 | 
			
		||||
#define BUSY_WAIT
 | 
			
		||||
#define BUSY_WAIT_INSTRUCTIONS 35 // Increase if two rows are pressed at the same time.
 | 
			
		||||
#define GPIO_INPUT_PIN_DELAY 10
 | 
			
		||||
 | 
			
		||||
/* Touchbar adjustments */
 | 
			
		||||
#define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe
 | 
			
		||||
#define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe
 | 
			
		||||
#define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster
 | 
			
		||||
#define TOUCH_SEGMENTS 3
 | 
			
		||||
 | 
			
		||||
/* Encoder Configuration */
 | 
			
		||||
//      Matrix Entries  k36/k35(E1SW>B13), k33/k32, k7/k28
 | 
			
		||||
#define ENCODERS_PAD_A { A1, B10, A13 }
 | 
			
		||||
#define ENCODERS_PAD_B { A2, B11, B14 }
 | 
			
		||||
//      Matrix Entries  k72/k71(E5SW>B0), k69/k68, k43/k64
 | 
			
		||||
#define ENCODERS_PAD_A_RIGHT { A1, C15,  B3 }
 | 
			
		||||
#define ENCODERS_PAD_B_RIGHT { A2, C14, B13 }
 | 
			
		||||
 | 
			
		||||
/* COL2ROW or ROW2COL */
 | 
			
		||||
#define DIODE_DIRECTION COL2ROW
 | 
			
		||||
 | 
			
		||||
/* CRC Configuration */
 | 
			
		||||
#define CRC8_OPTIMIZE_SPEED
 | 
			
		||||
#define CRC8_USE_TABLE
 | 
			
		||||
 | 
			
		||||
/* Split Keyboard Configuration */
 | 
			
		||||
#define SPLIT_HAND_PIN C13
 | 
			
		||||
#define SPLIT_USB_DETECT
 | 
			
		||||
// also handles the SERIAL_USART_TX_PIN define
 | 
			
		||||
#define SOFT_SERIAL_PIN A9
 | 
			
		||||
#define SERIAL_USART_TX_PAL_MODE 7
 | 
			
		||||
#define SERIAL_USART_TIMEOUT 5
 | 
			
		||||
#define SERIAL_USART_DRIVER SD1
 | 
			
		||||
//#define SERIAL_USART_FULL_DUPLEX - Waiting on reunification pr
 | 
			
		||||
#if SERIAL_USART_FULL_DUPLEX
 | 
			
		||||
    #define SERIAL_USART_RX_PIN A10
 | 
			
		||||
    #define SERIAL_USART_RX_PAL_MODE 7
 | 
			
		||||
    // Mun connects TX to TX and RX to RX as we were planning on i2c split, so we need pin swap for full duplex
 | 
			
		||||
    #define SERIAL_USART_PIN_SWAP
 | 
			
		||||
    #define SERIAL_USART_SPEED (2 * 1024 * 1024)
 | 
			
		||||
#else
 | 
			
		||||
    #define SERIAL_USART_SPEED (1 * 1024 * 1024)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Split Transport Features */
 | 
			
		||||
#define SPLIT_TRANSPORT_MIRROR
 | 
			
		||||
#define SPLIT_LAYER_STATE_ENABLE
 | 
			
		||||
#define SPLIT_LED_STATE_ENABLE
 | 
			
		||||
#define SPLIT_TRANSACTION_IDS_KB TOUCH_ENCODER_SYNC, RGB_MENU_SYNC
 | 
			
		||||
 | 
			
		||||
/* LED Turbo DIP Switch */
 | 
			
		||||
#define DIP_SWITCH_PINS { A14, B13 }
 | 
			
		||||
#define DIP_SWITCH_PINS_RIGHT { A14, B0 }
 | 
			
		||||
 | 
			
		||||
/* RGB LED Configuration */
 | 
			
		||||
#define RGB_DI_PIN B5
 | 
			
		||||
#define RGBLED_NUM 156
 | 
			
		||||
#define RGBLED_SPLIT { 78, 78 }
 | 
			
		||||
#define RGBLIGHT_EFFECT_BREATHING
 | 
			
		||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
 | 
			
		||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
 | 
			
		||||
#define RGBLIGHT_EFFECT_SNAKE
 | 
			
		||||
#define RGBLIGHT_EFFECT_KNIGHT
 | 
			
		||||
#define RGBLIGHT_EFFECT_CHRISTMAS
 | 
			
		||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
 | 
			
		||||
#define RGBLIGHT_EFFECT_RGB_TEST
 | 
			
		||||
#define RGBLIGHT_EFFECT_ALTERNATING
 | 
			
		||||
#define RGBLIGHT_EFFECT_TWINKLE
 | 
			
		||||
 | 
			
		||||
#define DRIVER_LED_TOTAL RGBLED_NUM
 | 
			
		||||
#define RGB_MATRIX_SPLIT RGBLED_SPLIT
 | 
			
		||||
#define RGB_MATRIX_CENTER { 81, 28 }
 | 
			
		||||
#define RGB_MATRIX_LED_FLUSH_LIMIT 33
 | 
			
		||||
#define RGB_MATRIX_LED_PROCESS_LIMIT 10
 | 
			
		||||
#define RGB_MATRIX_KEYPRESSES
 | 
			
		||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
 | 
			
		||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
 | 
			
		||||
// RGB Matrix Animation modes. Explicitly enabled
 | 
			
		||||
// For full list of effects, see:
 | 
			
		||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
 | 
			
		||||
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
 | 
			
		||||
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BREATHING
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BAND_SAT
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BAND_VAL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
 | 
			
		||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_ALL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
 | 
			
		||||
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
 | 
			
		||||
#define ENABLE_RGB_MATRIX_DUAL_BEACON
 | 
			
		||||
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
 | 
			
		||||
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_RAINDROPS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_HUE_BREATHING
 | 
			
		||||
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
 | 
			
		||||
#define ENABLE_RGB_MATRIX_HUE_WAVE
 | 
			
		||||
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
 | 
			
		||||
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
 | 
			
		||||
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
 | 
			
		||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
 | 
			
		||||
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
 | 
			
		||||
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
 | 
			
		||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SPLASH
 | 
			
		||||
#define ENABLE_RGB_MATRIX_MULTISPLASH
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
 | 
			
		||||
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
 | 
			
		||||
 | 
			
		||||
#if RGB_UNLIMITED_POWER
 | 
			
		||||
  #define RGBLIGHT_LIMIT_VAL 255
 | 
			
		||||
#else
 | 
			
		||||
  #define RGBLIGHT_LIMIT_VAL 127
 | 
			
		||||
#endif
 | 
			
		||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL
 | 
			
		||||
 | 
			
		||||
#define WS2812_PWM_DRIVER PWMD3
 | 
			
		||||
#define WS2812_PWM_CHANNEL 2
 | 
			
		||||
#define WS2812_PWM_PAL_MODE 2
 | 
			
		||||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM3
 | 
			
		||||
#define WS2812_DMA_CHANNEL 3
 | 
			
		||||
 | 
			
		||||
#define TOUCH_UPDATE_INTERVAL 33
 | 
			
		||||
#define OLED_UPDATE_INTERVAL 33
 | 
			
		||||
#define TAP_CODE_DELAY 5
 | 
			
		||||
 | 
			
		||||
/* Audio Configuration */
 | 
			
		||||
#define AUDIO_PIN A4
 | 
			
		||||
#define AUDIO_PIN_ALT A5
 | 
			
		||||
#define AUDIO_PIN_ALT_AS_NEGATIVE
 | 
			
		||||
#define AUDIO_CLICKY
 | 
			
		||||
#define AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE
 | 
			
		||||
#define AUDIO_DAC_OFF_VALUE 0
 | 
			
		||||
							
								
								
									
										22
									
								
								keyboards/rgbkb/sol3/halconf.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								keyboards/rgbkb/sol3/halconf.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#define HAL_USE_DAC TRUE
 | 
			
		||||
 | 
			
		||||
#define HAL_USE_GPT TRUE
 | 
			
		||||
 | 
			
		||||
#define HAL_USE_I2C TRUE
 | 
			
		||||
 | 
			
		||||
#define HAL_USE_PWM TRUE
 | 
			
		||||
 | 
			
		||||
#define HAL_USE_SERIAL TRUE
 | 
			
		||||
 | 
			
		||||
#include_next <halconf.h>
 | 
			
		||||
							
								
								
									
										24
									
								
								keyboards/rgbkb/sol3/keymaps/default/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								keyboards/rgbkb/sol3/keymaps/default/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
// No need for the single versions when multi performance isn't a problem =D
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SPLASH
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
 | 
			
		||||
 | 
			
		||||
// 20m timeout (20m * 60s * 1000mil)
 | 
			
		||||
// #define RGB_DISABLE_TIMEOUT 1200000
 | 
			
		||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
 | 
			
		||||
 | 
			
		||||
#define STM32_ONBOARD_EEPROM_SIZE 2048
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										173
									
								
								keyboards/rgbkb/sol3/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										173
									
								
								keyboards/rgbkb/sol3/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,173 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
 | 
			
		||||
/* Qwerty
 | 
			
		||||
 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐  ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
 * │ GESC │   1  │   2  │   3  │   4  │   5  │   -  │  │   =  │   6  │   7  │   8  │   9  │   0  │ BkSp │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │ Tab  │   Q  │   W  │   E  │   R  │   T  │   [  │  │   ]  │   Y  │   U  │   I  │   O  │   P  │   \  │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │FNCAPS│   A  │   S  │   D  │   F  │   G  │   (  │  │   )  │   H  │   J  │   K  │   L  │   ;  │   '  │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │Shift │   Z  │   X  │   C  │   V  │   B  │   {  │  │   }  │   N  │   M  │   ,  │   .  │   /  │Enter │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │ Ctrl │  Win │  Alt │  RGB │ ADJ  │      │ DEL  │  │ Enter│      │  FN  │ Left │ Down │ Up   │Right │
 | 
			
		||||
 * └──────┴──────┴──────┴──────┴──────┤ Space├──────┤  ├──────┤ Space├──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
 *                                    │      │ DEL  │  │ Enter│      │
 | 
			
		||||
 *                                    └──────┴──────┘  └──────┴──────┘
 | 
			
		||||
 * ┌──────┬──────┬──────┬──────┬──────┬──────┐                ┌──────┬──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
 * │Vol Dn│Vol Up│Vol Dn│Vol Up│Vol Dn│Vol Up│                │Vol Dn│Vol Up│Vol Dn│Vol Up│Vol Dn│Vol Up│
 | 
			
		||||
 * └──────┴──────┴──────┴──────┴──────┴──────┘                └──────┴──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
 * ┌──────┬──────┬──────┬──────┬──────┐                              ┌──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
 * │Vol Dn│Vol Up│ Prev │ Play │ Next │                              │Vol Dn│Vol Up│ Prev │ Play │ Next │
 | 
			
		||||
 * └──────┴──────┴──────┴──────┴──────┘                              └──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
enum sol_layers {
 | 
			
		||||
    _QWERTY,
 | 
			
		||||
    _COLEMAK,
 | 
			
		||||
    _GAME,
 | 
			
		||||
    _FN,
 | 
			
		||||
    _ADJUST
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum sol_keycodes {
 | 
			
		||||
    // Disables touch processing
 | 
			
		||||
    TCH_TOG = SAFE_RANGE,
 | 
			
		||||
    MENU_BTN,
 | 
			
		||||
    MENU_UP,
 | 
			
		||||
    MENU_DN,
 | 
			
		||||
    RGB_RST
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define FN       MO(_FN)
 | 
			
		||||
#define ADJUST   MO(_ADJUST)
 | 
			
		||||
#define COLEMAK  DF(_COLEMAK)
 | 
			
		||||
#define GAME     DF(_GAME)
 | 
			
		||||
#define QWERTY   DF(_QWERTY)
 | 
			
		||||
#define FN_CAPS  LT(_FN, KC_CAPS)
 | 
			
		||||
//#define RGB_ADJ  LT(_ADJUST, RGB_TOG)
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
 | 
			
		||||
    [_QWERTY] = LAYOUT(
 | 
			
		||||
        KC_GESC,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_MINS,                  KC_EQL,  KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC,
 | 
			
		||||
        KC_TAB,   KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_LBRC,                  KC_RBRC, KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSLS,
 | 
			
		||||
        FN_CAPS,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_LPRN,                  KC_RPRN, KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,
 | 
			
		||||
        KC_LSFT,  KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_LCBR,                  KC_RCBR, KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_SFTENT,
 | 
			
		||||
        KC_LCTL,  KC_LGUI, KC_LALT, RGB_TOG, ADJUST,  KC_SPC,  KC_PGDN, KC_DEL, KC_ENT,  KC_PGUP, KC_SPC,  KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT, KC_RCTL,
 | 
			
		||||
 | 
			
		||||
        KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU,                                     KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU,
 | 
			
		||||
        KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV,                                                       KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_COLEMAK] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    _______,                   _______, KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, _______,
 | 
			
		||||
        _______, KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    _______,                   _______, KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    _______,
 | 
			
		||||
        _______, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    _______,                   _______, KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_GAME] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, KC_F1,                     KC_F5,   _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_F2,                     KC_F6,   KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    _______,
 | 
			
		||||
        _______, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_F3,                     KC_F7,   KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, _______,
 | 
			
		||||
        _______, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_F4,                     KC_F8,   KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, _______,
 | 
			
		||||
        _______, KC_NO,   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_FN] = LAYOUT(
 | 
			
		||||
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F11,                    KC_F12,  KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  _______,
 | 
			
		||||
        _______, KC_HOME, KC_UP,   KC_END,  _______, _______, _______,                   _______, _______, KC_HOME, KC_UP,   KC_END,  KC_PSCR, KC_PGUP,
 | 
			
		||||
        _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,                   _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS,  KC_PGDN,
 | 
			
		||||
        _______,  AU_TOG,  MU_TOG,  MU_MOD, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, CK_TOGG,   CK_UP, CK_DOWN, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_ADJUST] = LAYOUT(
 | 
			
		||||
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F11,                    KC_F12,  KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  _______,
 | 
			
		||||
        _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET,   _______, _______,                   _______, _______, KC_P7,   KC_P8,   KC_P9,   _______, _______,
 | 
			
		||||
        _______, RGB_HUD, RGB_VAD, RGB_HUI, RGB_RST, _______, DM_REC1,                   _______, _______, KC_P4,   KC_P5,   KC_P6,   _______, _______,
 | 
			
		||||
        _______, RGB_SPD, _______, RGB_SPI, _______, _______, DM_RSTP,                   _______, _______, KC_P1,   KC_P2,   KC_P3,   _______, GAME,
 | 
			
		||||
        _______, RGB_RMOD,RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, KC_P0,   KC_PDOT, KC_NLCK, QWERTY,  COLEMAK,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
    switch (keycode)
 | 
			
		||||
    {
 | 
			
		||||
        case MENU_BTN:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_menu_selection();
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case MENU_UP:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_menu_action(true);
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case MENU_DN:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_menu_action(false);
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case RGB_RST:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                eeconfig_update_rgb_matrix_default();
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case TCH_TOG:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                touch_encoder_toggle();
 | 
			
		||||
            }
 | 
			
		||||
            return false;  // Skip all further processing of this key
 | 
			
		||||
        default:
 | 
			
		||||
            return true;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void render_layer_status(void) {
 | 
			
		||||
    // Host Keyboard Layer Status
 | 
			
		||||
    oled_write_P(PSTR("Layer"), false);
 | 
			
		||||
    switch (get_highest_layer(layer_state)) {
 | 
			
		||||
        case _QWERTY:
 | 
			
		||||
            oled_write_ln_P(PSTR("QWRTY"), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _COLEMAK:
 | 
			
		||||
            oled_write_ln_P(PSTR("Colemk"), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _GAME:
 | 
			
		||||
            oled_write_ln_P(PSTR("Game  "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _FN:
 | 
			
		||||
            oled_write_ln_P(PSTR("FN   "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _ADJUST:
 | 
			
		||||
            oled_write_ln_P(PSTR("Adjst"), false);
 | 
			
		||||
            break;
 | 
			
		||||
        default:
 | 
			
		||||
            oled_write_ln_P(PSTR("Undef"), false);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								keyboards/rgbkb/sol3/keymaps/kageurufu/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								keyboards/rgbkb/sol3/keymaps/kageurufu/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/kageurufu> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. Frank Tackitt
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
// No need for the single versions when multi performance isn't a problem =D
 | 
			
		||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
 | 
			
		||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
 | 
			
		||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
 | 
			
		||||
#define DISABLE_RGB_MATRIX_SPLASH
 | 
			
		||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
 | 
			
		||||
 | 
			
		||||
// 20m timeout (20m * 60s * 1000mil)
 | 
			
		||||
// #define RGB_DISABLE_TIMEOUT 1200000
 | 
			
		||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
 | 
			
		||||
// 224B per layer right now
 | 
			
		||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
 | 
			
		||||
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047
 | 
			
		||||
 | 
			
		||||
#define VIA_QMK_RGBLIGHT_ENABLE
 | 
			
		||||
 | 
			
		||||
#define STM32_ONBOARD_EEPROM_SIZE 2048
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										61
									
								
								keyboards/rgbkb/sol3/keymaps/kageurufu/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								keyboards/rgbkb/sol3/keymaps/kageurufu/keymap.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,61 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/kageurufu> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. Frank Tackitt
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
#include "kageurufu.h"
 | 
			
		||||
 | 
			
		||||
extern keymap_config_t keymap_config;
 | 
			
		||||
 | 
			
		||||
/* Base Layout
 | 
			
		||||
  * ,------------------------------------------------.  ,------------------------------------------------.
 | 
			
		||||
  * |   `  |      |      |      |      |      |      |  |      |      |      |      |      |      | BkSp |
 | 
			
		||||
  * |------+------+------+------+------+------|------|  |------|------+------+------+------+------+------|
 | 
			
		||||
  * | Tab  |      |      |      |      |      |      |  |      |      |      |      |      |      |   \  |
 | 
			
		||||
  * |------+------+------+------+------+------|------|  |------|------+------+------+------+------+------|
 | 
			
		||||
  * | Esc  |      |      |      |      |      |      |  |      |      |      |      |      |      |   '  |
 | 
			
		||||
  * |------+------+------+------+------+------+------|  |------+------+------+------+------+------+------|
 | 
			
		||||
  * | Sft( |      |      |      |      |      |      |  |      |      |      |      |      |      | Sft) |
 | 
			
		||||
  * |------+------+------+------+------+------+------|  |------+------+------+------+------+------+------|
 | 
			
		||||
  * | Ctrl |  Win |  Win |  Alt |  FN  | Space|  RGB |  |  FN  |  FN  |   -  |   =  | Down | PgUp | PgDn |
 | 
			
		||||
  * |------+------+------+------+------+------+------|  |------+------+------+------+------+------+------|
 | 
			
		||||
  *                                    | Space| Bksp |  | Enter| Space|
 | 
			
		||||
  *                                    `-------------'  `--------=----'
 | 
			
		||||
  */
 | 
			
		||||
#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__, \
 | 
			
		||||
      KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU,                                     KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, \
 | 
			
		||||
      KC_MNXT, KC_MPLY, KC_MPRV, KC_VOLD, KC_VOLU,                                                       KC_MNXT, KC_MPLY, KC_MPRV, KC_VOLD, KC_VOLU )
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
 | 
			
		||||
  [_QWERTY] = EXPAND_LAYOUT(
 | 
			
		||||
      KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    RGB_MOD,                   KC_EQL,  KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC,
 | 
			
		||||
      KC_TAB,  _________________QWERTY_L1_________________, KC_LBRC,                   KC_RBRC, _________________QWERTY_R1_________________, KC_BSLS,
 | 
			
		||||
      FN_ESC,  _________________QWERTY_L2_________________, RGB_SAI,                   RGB_VAI, _________________QWERTY_R2_________________, KC_QUOT,
 | 
			
		||||
      KC_LSPO, _________________QWERTY_L3_________________, RGB_SAD,                   RGB_VAD, _________________QWERTY_R3_________________, KC_RSPC,
 | 
			
		||||
      KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN,      KC_SPC,  KC_MUTE, KC_BSPC, KC_ENT,  FN,      KC_SPC,  KC_MINS, KC_EQL,  KC_DOWN, KC_PGUP, KC_PGDN
 | 
			
		||||
  ),
 | 
			
		||||
 | 
			
		||||
  [_FN] = EXPAND_LAYOUT(
 | 
			
		||||
      ________________FUNCTION_L1________________, _______,                   KC_PSCR, ________________FUNCTION_R1________________,
 | 
			
		||||
      ________________FUNCTION_L2________________, _______,                   _______, ________________FUNCTION_R2________________,
 | 
			
		||||
      ________________FUNCTION_L3________________, _______,                   _______, ________________FUNCTION_R3________________,
 | 
			
		||||
      ________________FUNCTION_L4________________, _______,                   _______, ________________FUNCTION_R4________________,
 | 
			
		||||
      ________________FUNCTION_L5________________, ADJ,     KC_DEL,  _______, ADJ,     ________________FUNCTION_R5________________
 | 
			
		||||
      ),
 | 
			
		||||
 | 
			
		||||
  [_ADJ] = EXPAND_LAYOUT(
 | 
			
		||||
      _________________ADJUST_L1_________________, _______,                   _______, _________________ADJUST_R1_________________,
 | 
			
		||||
      _________________ADJUST_L2_________________, _______,                   _______, _________________ADJUST_R2_________________,
 | 
			
		||||
      _________________ADJUST_L3_________________, _______,                   _______, _________________ADJUST_R3_________________,
 | 
			
		||||
      _________________ADJUST_L4_________________, _______,                   _______, _________________ADJUST_R4_________________,
 | 
			
		||||
      _________________ADJUST_L5_________________, _______, _______, _______, _______, _________________ADJUST_R5_________________
 | 
			
		||||
 | 
			
		||||
      )
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										1
									
								
								keyboards/rgbkb/sol3/keymaps/kageurufu/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								keyboards/rgbkb/sol3/keymaps/kageurufu/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
VIA_ENABLE = yes
 | 
			
		||||
							
								
								
									
										32
									
								
								keyboards/rgbkb/sol3/keymaps/via/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								keyboards/rgbkb/sol3/keymaps/via/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
// No need for the single versions when multi performance isn't a problem =D
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SPLASH
 | 
			
		||||
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
 | 
			
		||||
 | 
			
		||||
// 20m timeout (20m * 60s * 1000mil)
 | 
			
		||||
// #define RGB_DISABLE_TIMEOUT 1200000
 | 
			
		||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
 | 
			
		||||
// 224B per layer right now
 | 
			
		||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
 | 
			
		||||
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047
 | 
			
		||||
 | 
			
		||||
#define VIA_QMK_RGBLIGHT_ENABLE
 | 
			
		||||
 | 
			
		||||
#define STM32_ONBOARD_EEPROM_SIZE 2048
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										218
									
								
								keyboards/rgbkb/sol3/keymaps/via/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										218
									
								
								keyboards/rgbkb/sol3/keymaps/via/keymap.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,218 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
 | 
			
		||||
/* Qwerty
 | 
			
		||||
 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐  ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
 * │ GESC │   1  │   2  │   3  │   4  │   5  │   -  │  │   =  │   6  │   7  │   8  │   9  │   0  │ BkSp │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │ Tab  │   Q  │   W  │   E  │   R  │   T  │   [  │  │   ]  │   Y  │   U  │   I  │   O  │   P  │   \  │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │FNCAPS│   A  │   S  │   D  │   F  │   G  │   (  │  │   )  │   H  │   J  │   K  │   L  │   ;  │   '  │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │Shift │   Z  │   X  │   C  │   V  │   B  │   {  │  │   }  │   N  │   M  │   ,  │   .  │   /  │Enter │
 | 
			
		||||
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
 * │ Ctrl │  Win │  Alt │  RGB │ ADJ  │      │ DEL  │  │ Enter│      │  FN  │ Left │ Down │ Up   │Right │
 | 
			
		||||
 * └──────┴──────┴──────┴──────┴──────┤ Space├──────┤  ├──────┤ Space├──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
 *                                    │      │ DEL  │  │ Enter│      │
 | 
			
		||||
 *                                    └──────┴──────┘  └──────┴──────┘
 | 
			
		||||
 * ┌──────┬──────┬──────┬──────┬──────┬──────┐                ┌──────┬──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
 * │Vol Dn│Vol Up│Vol Dn│Vol Up│Vol Dn│Vol Up│                │Vol Dn│Vol Up│Vol Dn│Vol Up│Vol Dn│Vol Up│
 | 
			
		||||
 * └──────┴──────┴──────┴──────┴──────┴──────┘                └──────┴──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
 * ┌──────┬──────┬──────┬──────┬──────┐                              ┌──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
 * │Vol Dn│Vol Up│ Prev │ Play │ Next │                              │Vol Dn│Vol Up│ Prev │ Play │ Next │
 | 
			
		||||
 * └──────┴──────┴──────┴──────┴──────┘                              └──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
enum sol_layers {
 | 
			
		||||
    _QWERTY,
 | 
			
		||||
    _COLEMAK,
 | 
			
		||||
    _GAME,
 | 
			
		||||
    _FN,
 | 
			
		||||
    _ADJUST,
 | 
			
		||||
    _VIA1,
 | 
			
		||||
    _VIA2,
 | 
			
		||||
    _VIA3
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum sol_keycodes {
 | 
			
		||||
    // Disables touch processing
 | 
			
		||||
    TCH_TOG = SAFE_RANGE,
 | 
			
		||||
    MENU_BTN,
 | 
			
		||||
    MENU_UP,
 | 
			
		||||
    MENU_DN,
 | 
			
		||||
    RGB_RST
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define FN       MO(_FN)
 | 
			
		||||
#define ADJUST   MO(_ADJUST)
 | 
			
		||||
#define COLEMAK  DF(_COLEMAK)
 | 
			
		||||
#define GAME     DF(_GAME)
 | 
			
		||||
#define QWERTY   DF(_QWERTY)
 | 
			
		||||
#define FN_CAPS  LT(_FN, KC_CAPS)
 | 
			
		||||
//#define RGB_ADJ  LT(_ADJUST, RGB_TOG)
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
 | 
			
		||||
    [_QWERTY] = LAYOUT(
 | 
			
		||||
        KC_GESC,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_MINS,                  KC_EQL,  KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC,
 | 
			
		||||
        KC_TAB,   KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_LBRC,                  KC_RBRC, KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSLS,
 | 
			
		||||
        FN_CAPS,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_LPRN,                  KC_RPRN, KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,
 | 
			
		||||
        KC_LSFT,  KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_LCBR,                  KC_RCBR, KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_SFTENT,
 | 
			
		||||
        KC_LCTL,  KC_LGUI, KC_LALT, RGB_TOG, ADJUST,  KC_SPC,  KC_PGDN, KC_DEL, KC_ENT,  KC_PGUP, KC_SPC,  KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT, KC_RCTL,
 | 
			
		||||
 | 
			
		||||
        KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU,                                     KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU,
 | 
			
		||||
        KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV,                                                       KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_COLEMAK] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    _______,                   _______, KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, _______,
 | 
			
		||||
        _______, KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    _______,                   _______, KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    _______,
 | 
			
		||||
        _______, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    _______,                   _______, KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_GAME] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, KC_F1,                     KC_F5,   _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_F2,                     KC_F6,   KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    _______,
 | 
			
		||||
        _______, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_F3,                     KC_F7,   KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, _______,
 | 
			
		||||
        _______, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_F4,                     KC_F8,   KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, _______,
 | 
			
		||||
        _______, KC_NO,   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_FN] = LAYOUT(
 | 
			
		||||
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F11,                    KC_F12,  KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  _______,
 | 
			
		||||
        _______, KC_HOME, KC_UP,   KC_END,  _______, _______, _______,                   _______, _______, KC_HOME, KC_UP,   KC_END,  KC_PSCR, KC_PGUP,
 | 
			
		||||
        _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,                   _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS,  KC_PGDN,
 | 
			
		||||
        _______,  AU_TOG,  MU_TOG,  MU_MOD, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, CK_TOGG,   CK_UP, CK_DOWN, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_ADJUST] = LAYOUT(
 | 
			
		||||
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F11,                    KC_F12,  KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  _______,
 | 
			
		||||
        _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET,   _______, _______,                   _______, _______, KC_P7,   KC_P8,   KC_P9,   _______, _______,
 | 
			
		||||
        _______, RGB_HUD, RGB_VAD, RGB_HUI, RGB_RST, _______, DM_REC1,                   _______, _______, KC_P4,   KC_P5,   KC_P6,   _______, _______,
 | 
			
		||||
        _______, RGB_SPD, _______, RGB_SPI, _______, _______, DM_RSTP,                   _______, _______, KC_P1,   KC_P2,   KC_P3,   _______, GAME,
 | 
			
		||||
        _______, RGB_RMOD,RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, KC_P0,   KC_PDOT, KC_NLCK, QWERTY,  COLEMAK,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_VIA1] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_VIA2] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
    [_VIA3] = LAYOUT(
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
 | 
			
		||||
 | 
			
		||||
        _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
			
		||||
        _______, _______, _______, _______, _______,                                                       _______, _______, _______, _______, _______
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
    switch (keycode)
 | 
			
		||||
    {
 | 
			
		||||
        case MENU_BTN:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_menu_selection();
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case MENU_UP:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_menu_action(true);
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case MENU_DN:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_menu_action(false);
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case RGB_RST:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                eeconfig_update_rgb_matrix_default();
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case TCH_TOG:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                touch_encoder_toggle();
 | 
			
		||||
            }
 | 
			
		||||
            return false;  // Skip all further processing of this key
 | 
			
		||||
        default:
 | 
			
		||||
            return true;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void render_layer_status(void) {
 | 
			
		||||
    // Host Keyboard Layer Status
 | 
			
		||||
    oled_write_P(PSTR("Layer"), false);
 | 
			
		||||
    switch (get_highest_layer(layer_state)) {
 | 
			
		||||
        case _QWERTY:
 | 
			
		||||
            oled_write_ln_P(PSTR("QWRTY"), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _COLEMAK:
 | 
			
		||||
            oled_write_ln_P(PSTR("Colemk"), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _GAME:
 | 
			
		||||
            oled_write_ln_P(PSTR("Game  "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _FN:
 | 
			
		||||
            oled_write_ln_P(PSTR("FN   "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _ADJUST:
 | 
			
		||||
            oled_write_ln_P(PSTR("Adjst"), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _VIA1:
 | 
			
		||||
            oled_write_ln_P(PSTR("VIA1 "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _VIA2:
 | 
			
		||||
            oled_write_ln_P(PSTR("VIA2 "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        case _VIA3:
 | 
			
		||||
            oled_write_ln_P(PSTR("VIA3 "), false);
 | 
			
		||||
            break;
 | 
			
		||||
        default:
 | 
			
		||||
            oled_write_ln_P(PSTR("Undef"), false);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										1
									
								
								keyboards/rgbkb/sol3/keymaps/via/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								keyboards/rgbkb/sol3/keymaps/via/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
VIA_ENABLE = yes
 | 
			
		||||
							
								
								
									
										30
									
								
								keyboards/rgbkb/sol3/mcuconf.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								keyboards/rgbkb/sol3/mcuconf.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include_next <mcuconf.h>
 | 
			
		||||
 | 
			
		||||
#undef STM32_DAC_USE_DAC1_CH1
 | 
			
		||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
 | 
			
		||||
 | 
			
		||||
#undef STM32_DAC_USE_DAC1_CH2
 | 
			
		||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
 | 
			
		||||
 | 
			
		||||
#undef STM32_GPT_USE_TIM6
 | 
			
		||||
#define STM32_GPT_USE_TIM6 TRUE
 | 
			
		||||
 | 
			
		||||
#undef STM32_I2C_USE_I2C1
 | 
			
		||||
#define STM32_I2C_USE_I2C1 TRUE
 | 
			
		||||
 | 
			
		||||
#undef STM32_PWM_USE_TIM3
 | 
			
		||||
#define STM32_PWM_USE_TIM3 TRUE
 | 
			
		||||
 | 
			
		||||
#undef STM32_SERIAL_USE_USART1
 | 
			
		||||
#define STM32_SERIAL_USE_USART1 TRUE
 | 
			
		||||
							
								
								
									
										12
									
								
								keyboards/rgbkb/sol3/rev1/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								keyboards/rgbkb/sol3/rev1/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#define DEVICE_VER 0x0001
 | 
			
		||||
							
								
								
									
										287
									
								
								keyboards/rgbkb/sol3/rev1/rev1.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										287
									
								
								keyboards/rgbkb/sol3/rev1/rev1.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,287 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "rev1.h"
 | 
			
		||||
#include "split_util.h"
 | 
			
		||||
 | 
			
		||||
#define NUMBER_OF_TOUCH_ENCODERS 2
 | 
			
		||||
#define TOUCH_ENCODER_OPTIONS TOUCH_SEGMENTS + 2
 | 
			
		||||
 | 
			
		||||
#define NUMBER_OF_ENCODERS 6
 | 
			
		||||
#define ENCODER_OPTIONS 2
 | 
			
		||||
 | 
			
		||||
typedef struct PACKED {
 | 
			
		||||
    uint8_t r;
 | 
			
		||||
    uint8_t c;
 | 
			
		||||
} encodermap_t;
 | 
			
		||||
 | 
			
		||||
// this maps encoders and then touch encoders to their respective electrical matrix entry
 | 
			
		||||
// mapping is row (y) then column (x) when looking at the electrical layout
 | 
			
		||||
const encodermap_t encoder_map[NUMBER_OF_ENCODERS][ENCODER_OPTIONS] = 
 | 
			
		||||
{
 | 
			
		||||
    { {  5, 0 }, {  5, 1 } }, // Encoder 0 matrix entries
 | 
			
		||||
    { {  5, 2 }, {  5, 3 } }, // Encoder 1 matrix entries
 | 
			
		||||
    { {  5, 4 }, {  5, 5 } }, // Encoder 2 matrix entries
 | 
			
		||||
    { { 11, 0 }, { 11, 1 } }, // Encoder 3 matrix entries
 | 
			
		||||
    { { 11, 2 }, { 11, 3 } }, // Encoder 4 matrix entries
 | 
			
		||||
    { { 11, 4 }, { 11, 5 } }  // Encoder 5 matrix entries
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] = 
 | 
			
		||||
{
 | 
			
		||||
    { { 1, 7 }, { 0, 7 }, { 2, 7 }, {  5, 6 }, {  5, 7 }, }, // Touch Encoder 0 matrix entries
 | 
			
		||||
    { { 7, 7 }, { 6, 7 }, { 8, 7 }, { 11, 6 }, { 11, 7 }, }  // Touch Encoder 1 matrix entries
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static bool limit_lightning = false;
 | 
			
		||||
 | 
			
		||||
RGB rgb_matrix_hsv_to_rgb(HSV hsv) {
 | 
			
		||||
    if (limit_lightning) hsv.v /= 2;
 | 
			
		||||
    return hsv_to_rgb(hsv); 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool dip_switch_update_kb(uint8_t index, bool active) {
 | 
			
		||||
    if (!dip_switch_update_user(index, active))
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    switch(index) {
 | 
			
		||||
        case 0: {
 | 
			
		||||
            limit_lightning = active;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
        case 1: {
 | 
			
		||||
            // Handle RGB Encoder switch press
 | 
			
		||||
            action_exec((keyevent_t){
 | 
			
		||||
                .key = (keypos_t){.row = isLeftHand ? 4 : 10, .col = 6},
 | 
			
		||||
                .pressed = active, .time = (timer_read() | 1) /* time should not be 0 */
 | 
			
		||||
            });
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void process_encoder_matrix(encodermap_t pos) {
 | 
			
		||||
    action_exec((keyevent_t){
 | 
			
		||||
        .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */
 | 
			
		||||
    });
 | 
			
		||||
#if TAP_CODE_DELAY > 0
 | 
			
		||||
    wait_ms(TAP_CODE_DELAY);
 | 
			
		||||
#endif
 | 
			
		||||
    action_exec((keyevent_t){
 | 
			
		||||
        .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
 | 
			
		||||
    if (!encoder_update_user(index, clockwise))
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1
 | 
			
		||||
    process_encoder_matrix(encoder_map[index][clockwise ? 0 : 1]);
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool touch_encoder_update_kb(uint8_t index, bool clockwise) {
 | 
			
		||||
    if (!touch_encoder_update_user(index, clockwise))
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1
 | 
			
		||||
    process_encoder_matrix(touch_encoder_map[index][clockwise ? 0 : 1]);
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) {
 | 
			
		||||
    if (!touch_encoder_tapped_user(index, section))
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    process_encoder_matrix(touch_encoder_map[index][section + 2]);
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void matrix_slave_scan_kb() {
 | 
			
		||||
    dip_switch_read(false);
 | 
			
		||||
    matrix_slave_scan_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
// clang-format off
 | 
			
		||||
led_config_t g_led_config = { {
 | 
			
		||||
    {  41,  42,  43,  44,  45,  46,  47 },
 | 
			
		||||
    {  54,  53,  52,  51,  50,  49,  48 },
 | 
			
		||||
    {  55,  56,  57,  58,  59,  60,  61 },
 | 
			
		||||
    {  68,  67,  66,  65,  64,  63,  62 },
 | 
			
		||||
    {  69,  70,  71,  72,  73,  74,  75,  76 },
 | 
			
		||||
    { 119, 120, 121, 122, 123, 124, 125 },
 | 
			
		||||
    { 132, 131, 130, 129, 128, 127, 126 },
 | 
			
		||||
    { 133, 134, 135, 136, 137, 138, 139 },
 | 
			
		||||
    { 146, 145, 144, 143, 142, 141, 140 },
 | 
			
		||||
    { 147, 148, 149, 150, 151, 152, 153 }
 | 
			
		||||
}, { // ALL XY VALUES DIVIDE BY 2, THEN ADD 5
 | 
			
		||||
    {   1,   6 }, {   1,  13 }, {   1,  19 }, {   1,  25 }, {   1,  31 }, {   1,  37 }, {   1,  43 }, {   1,  49 }, {   4,  52 }, {  11,  52 },
 | 
			
		||||
    {  17,  52 }, {  23,  52 }, {  29,  52 }, {  35,  52 }, {  41,  54 }, {  46,  57 }, {  52,  60 }, {  57,  63 }, {  62,  66 }, {  68,  69 },
 | 
			
		||||
    {  73,  67 }, {  76,  62 }, {  79,  57 }, {  78,  51 }, {  77,  45 }, {  76,  39 }, {  76,  33 }, {  76,  27 }, {  76,  21 }, {  76,  14 },
 | 
			
		||||
    {  76,   8 }, {  72,   3 }, {  59,   3 }, {  53,   3 }, {  46,   3 }, {  40,   3 }, {  34,   3 }, {  28,   3 }, {  22,   3 }, {  10,   3 }, {   3,   3 },
 | 
			
		||||
    {   9,   6 }, {  21,   6 }, {  30,   6 }, {  40,   6 }, {  49,   6 }, {  59,   6 }, {  71,   6 },
 | 
			
		||||
    {  71,  16 }, {  59,  16 }, {  49,  16 }, {  40,  16 }, {  30,  16 }, {  21,  16 }, {   9,  16 },
 | 
			
		||||
    {   9,  25 }, {  21,  25 }, {  30,  25 }, {  40,  25 }, {  49,  25 }, {  59,  25 }, {  71,  25 },
 | 
			
		||||
    {  71,  35 }, {  59,  35 }, {  49,  35 }, {  40,  35 }, {  30,  35 }, {  21,  35 }, {   9,  35 },
 | 
			
		||||
    {   9,  44 }, {  21,  44 }, {  30,  44 }, {  40,  44 }, {  49,  44 }, {  66,  50 }, {  75,  54 }, {  70,  62 }, {  60,  60 },
 | 
			
		||||
 | 
			
		||||
    { 160,   6 }, { 160,  13 }, { 160,  19 }, { 160,  25 }, { 160,  31 }, { 160,  37 }, { 160,  43 }, { 160,  49 }, { 157,  52 }, { 151,  52 },
 | 
			
		||||
    { 145,  52 }, { 138,  52 }, { 132,  52 }, { 126,  52 }, { 120,  54 }, { 115,  57 }, { 110,  60 }, { 105,  63 }, {  99,  66 }, {  94,  69 },
 | 
			
		||||
    {  89,  67 }, {  86,  62 }, {  83,  57 }, {  83,  51 }, {  85,  45 }, {  86,  39 }, {  86,  33 }, {  86,  27 }, {  86,  21 }, {  86,  14 },
 | 
			
		||||
    {  86,   8 }, {  90,   3 }, { 103,   3 }, { 109,   3 }, { 115,   3 }, { 121,   3 }, { 127,   3 }, { 133,   3 }, { 140,   3 }, { 152,   3 }, { 158,   3 },
 | 
			
		||||
    { 153,   6 }, { 141,   6 }, { 131,   6 }, { 122,   6 }, { 112,   6 }, { 103,   6 }, {  91,   6 },
 | 
			
		||||
    {  91,  16 }, { 103,  16 }, { 112,  16 }, { 122,  16 }, { 131,  16 }, { 141,  16 }, { 153,  16 },
 | 
			
		||||
    { 153,  25 }, { 141,  25 }, { 131,  25 }, { 122,  25 }, { 112,  25 }, { 103,  25 }, {  91,  25 },
 | 
			
		||||
    {  91,  35 }, { 103,  35 }, { 112,  35 }, { 122,  35 }, { 131,  35 }, { 141,  35 }, { 153,  35 },
 | 
			
		||||
    { 153,  44 }, { 141,  44 }, { 131,  44 }, { 122,  44 }, { 112,  44 }, {  96,  50 }, {  87,  54 }, {  92,  62 }, { 102,  60 },
 | 
			
		||||
}, {
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 1, 1, 1, 1, 1, 1, 1, 1,
 | 
			
		||||
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 4, 4, 4, 4, 4, 1,
 | 
			
		||||
    1, 1, 1, 1, 1, 1, 1, 1, 1
 | 
			
		||||
} };
 | 
			
		||||
// clang-format on
 | 
			
		||||
 | 
			
		||||
void rgb_matrix_increase_flags(void)
 | 
			
		||||
{
 | 
			
		||||
    switch (rgb_matrix_get_flags()) {
 | 
			
		||||
        case LED_FLAG_ALL: {
 | 
			
		||||
            rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
 | 
			
		||||
            rgb_matrix_set_color_all(0, 0, 0);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
 | 
			
		||||
            rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
 | 
			
		||||
            rgb_matrix_set_color_all(0, 0, 0);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        case LED_FLAG_UNDERGLOW: {
 | 
			
		||||
            rgb_matrix_set_flags(LED_FLAG_NONE);
 | 
			
		||||
            rgb_matrix_disable_noeeprom();
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        default: {
 | 
			
		||||
            rgb_matrix_set_flags(LED_FLAG_ALL);
 | 
			
		||||
            rgb_matrix_enable_noeeprom();
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__attribute__((weak)) 
 | 
			
		||||
void render_layer_status(void) {
 | 
			
		||||
    // Keymap specific, expected to be overridden
 | 
			
		||||
    // Host Keyboard Layer Status
 | 
			
		||||
    oled_write_P(PSTR("Layer"), false);
 | 
			
		||||
    oled_write_ln_P(PSTR("Undef"), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__attribute__((weak))
 | 
			
		||||
void render_leds_status(void)
 | 
			
		||||
{
 | 
			
		||||
    // Host Keyboard LED Status
 | 
			
		||||
    static const char PROGMEM led_icon[] = {
 | 
			
		||||
        0x0F,0x3A,0
 | 
			
		||||
    };
 | 
			
		||||
    oled_write_P(led_icon, false);
 | 
			
		||||
    led_t led_state = host_keyboard_led_state();
 | 
			
		||||
    oled_write_P(   led_state.num_lock ? PSTR("N") : PSTR(" "), false);
 | 
			
		||||
    oled_write_P(  led_state.caps_lock ? PSTR("C") : PSTR(" "), false);
 | 
			
		||||
    oled_write_P(led_state.scroll_lock ? PSTR("S") : PSTR(" "), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__attribute__((weak))
 | 
			
		||||
void render_touch_status(void)
 | 
			
		||||
{
 | 
			
		||||
    // Host Touch LED Status
 | 
			
		||||
    static const char PROGMEM touch_icon[] = {
 | 
			
		||||
        0x12,0x3A,0
 | 
			
		||||
    };
 | 
			
		||||
    oled_write_P(touch_icon, false);
 | 
			
		||||
    oled_write_P(         touch_encoder_is_on() ? PSTR("T") : PSTR(" "), false);
 | 
			
		||||
    oled_write_P(touch_encoder_is_calibrating() ? PSTR("C") : PSTR(" "), false);
 | 
			
		||||
    oled_write_P(PSTR(" "), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__attribute__((weak))
 | 
			
		||||
void render_audio_status(void)
 | 
			
		||||
{
 | 
			
		||||
    // Host Audio Status
 | 
			
		||||
    static const char PROGMEM audio_icon[] = {
 | 
			
		||||
        0x0E,0x3A,0
 | 
			
		||||
    };
 | 
			
		||||
    oled_write_P(audio_icon, false);
 | 
			
		||||
    oled_write_P( audio_is_on() ? PSTR("A")  : PSTR(" "), false);
 | 
			
		||||
    oled_write_P(is_clicky_on() ? PSTR("C")  : PSTR(" "), false);
 | 
			
		||||
    oled_write_P( is_music_on() ? PSTR("M")  : PSTR(" "), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
 | 
			
		||||
    // Sol 3 uses OLED_ROTATION_270 for default rotation on both halves
 | 
			
		||||
    return oled_init_user(OLED_ROTATION_270);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool oled_task_kb(void) {
 | 
			
		||||
    if (!oled_task_user())
 | 
			
		||||
        return false;
 | 
			
		||||
    
 | 
			
		||||
    if (is_keyboard_left()) {
 | 
			
		||||
        render_icon();
 | 
			
		||||
        oled_write_P(PSTR("     "), false);
 | 
			
		||||
        render_layer_status();
 | 
			
		||||
        oled_write_P(PSTR("     "), false);
 | 
			
		||||
        render_leds_status();
 | 
			
		||||
        oled_write_P(PSTR("     "), false);
 | 
			
		||||
        render_touch_status();
 | 
			
		||||
        oled_write_P(PSTR("     "), false);
 | 
			
		||||
        render_audio_status();
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        render_icon();
 | 
			
		||||
        oled_write_P(PSTR("     "), false);
 | 
			
		||||
        render_rgb_menu();
 | 
			
		||||
    }
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
    if (!process_record_user(keycode, record))
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    switch(keycode) {
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
        case RGB_TOG:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                rgb_matrix_increase_flags();
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										74
									
								
								keyboards/rgbkb/sol3/rev1/rev1.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								keyboards/rgbkb/sol3/rev1/rev1.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,74 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "sol3.h"
 | 
			
		||||
 | 
			
		||||
// clang-format off
 | 
			
		||||
/* Blank ascii map to reuse, with labeled possible encoder positions, *rgb encoder only
 | 
			
		||||
┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐  ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
│      │      │      │      │      │      │  E2  │  │  E5  │      │      │      │      │      │      │
 | 
			
		||||
├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
│      │      │      │      │      │      │      │  │      │      │      │      │      │      │      │
 | 
			
		||||
├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
│      │      │      │      │      │      │      │  │      │      │      │      │      │      │      │
 | 
			
		||||
├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
│      │      │      │      │      │      │  E2  │  │  E5  │      │      │      │      │      │      │
 | 
			
		||||
├──────┼──────┼──────┼──────┼──────┼──────┼──────┤  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 | 
			
		||||
│      │      │      │  E1  │  E1  │      │  E0* │  │  E3* │      │  E4  │  E4  │      │      │      │
 | 
			
		||||
└──────┴──────┴──────┴──────┴──────┤      ├──────┤  ├──────┤      ├──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
                                   │      │  E0  │  │  E3  │      │
 | 
			
		||||
                                   └──────┴──────┘  └──────┴──────┘
 | 
			
		||||
┌──────┬──────┬──────┬──────┬──────┬──────┐                ┌──────┬──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
│  E0↑ │  E0↓ │  E1↑ │  E1↓ │  E2↑ │  E2↓ │                │  E3↑ │  E3↓ │  E4↑ │  E4↓ │  E5↑ │  E5↓ │
 | 
			
		||||
└──────┴──────┴──────┴──────┴──────┴──────┘                └──────┴──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
┌──────┬──────┬──────┬──────┬──────┐                              ┌──────┬──────┬──────┬──────┬──────┐
 | 
			
		||||
│      │      │      │      │      │                              │      │      │      │      │      │
 | 
			
		||||
└──────┴──────┴──────┴──────┴──────┘                              └──────┴──────┴──────┴──────┴──────┘
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#define LAYOUT( \
 | 
			
		||||
    L00, L01, L02, L03, L04, L05, L06,           R00, R01, R02, R03, R04, R05, R06, \
 | 
			
		||||
    L10, L11, L12, L13, L14, L15, L16,           R10, R11, R12, R13, R14, R15, R16, \
 | 
			
		||||
    L20, L21, L22, L23, L24, L25, L26,           R20, R21, R22, R23, R24, R25, R26, \
 | 
			
		||||
    L30, L31, L32, L33, L34, L35, L36,           R30, R31, R32, R33, R34, R35, R36, \
 | 
			
		||||
    L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \
 | 
			
		||||
    \
 | 
			
		||||
    E0L, E0R, E1L, E1R, E2L, E2R,                     E3L, E3R, E4L, E4R, E5L, E5R, \
 | 
			
		||||
    LT0, LT1, LT2, LSL, LSR,                               RT0, RT1, RT2, RSL, RSR \
 | 
			
		||||
) \
 | 
			
		||||
{ \
 | 
			
		||||
    /* Left Half */ \
 | 
			
		||||
    { L00, L01, L02, L03, L04, L05, L06, LT0   }, \
 | 
			
		||||
    { L10, L11, L12, L13, L14, L15, L16, LT1   }, \
 | 
			
		||||
    { L20, L21, L22, L23, L24, L25, L26, LT2   }, \
 | 
			
		||||
    { L30, L31, L32, L33, L34, L35, L36, KC_NO }, \
 | 
			
		||||
    { L40, L41, L42, L43, L44, L45, L46, L47   }, \
 | 
			
		||||
    { E0L, E0R, E1L, E1R, E2L, E2R, LSL, LSR   }, \
 | 
			
		||||
    /* Right Half */ \
 | 
			
		||||
    { R06, R05, R04, R03, R02, R01, R00, RT0   }, \
 | 
			
		||||
    { R16, R15, R14, R13, R12, R11, R10, RT1   }, \
 | 
			
		||||
    { R26, R25, R24, R23, R22, R21, R20, RT2   }, \
 | 
			
		||||
    { R36, R35, R34, R33, R32, R31, R30, KC_NO }, \
 | 
			
		||||
    { R47, R46, R45, R44, R43, R42, R41, R40   }, \
 | 
			
		||||
    { E3L, E3R, E4L, E4R, E5L, E5R, RSL, RSR   } \
 | 
			
		||||
}
 | 
			
		||||
// clang-format on
 | 
			
		||||
 | 
			
		||||
// weak functions overridable by the user
 | 
			
		||||
void render_layer_status(void);
 | 
			
		||||
void render_leds_status(void);
 | 
			
		||||
void render_touch_status(void);
 | 
			
		||||
void render_audio_status(void);
 | 
			
		||||
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
// utility function to cycle active led zones
 | 
			
		||||
void rgb_matrix_increase_flags(void);
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										0
									
								
								keyboards/rgbkb/sol3/rev1/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								keyboards/rgbkb/sol3/rev1/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										49
									
								
								keyboards/rgbkb/sol3/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								keyboards/rgbkb/sol3/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,49 @@
 | 
			
		|||
# MCU name
 | 
			
		||||
MCU = STM32F303
 | 
			
		||||
 | 
			
		||||
# Bootloader selection
 | 
			
		||||
BOOTLOADER = stm32-dfu
 | 
			
		||||
 | 
			
		||||
# Touch encoder needs
 | 
			
		||||
SRC += ../common/touch_encoder.c
 | 
			
		||||
SRC += ../common/common_oled.c
 | 
			
		||||
QUANTUM_LIB_SRC += i2c_master.c
 | 
			
		||||
 | 
			
		||||
# 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 = yes        # Console for debug
 | 
			
		||||
COMMAND_ENABLE = no         # Commands for debug and configuration
 | 
			
		||||
NKRO_ENABLE = yes           # Enable N-Key Rollover
 | 
			
		||||
AUDIO_ENABLE = yes          # Audio output
 | 
			
		||||
AUDIO_DRIVER = dac_additive
 | 
			
		||||
 | 
			
		||||
DYNAMIC_MACRO_ENABLE = yes
 | 
			
		||||
DIP_SWITCH_ENABLE = yes
 | 
			
		||||
 | 
			
		||||
WS2812_DRIVER = pwm
 | 
			
		||||
RGBLIGHT_ENABLE = no
 | 
			
		||||
RGB_MATRIX_ENABLE = yes
 | 
			
		||||
RGB_MATRIX_DRIVER = WS2812
 | 
			
		||||
 | 
			
		||||
OLED_ENABLE = yes
 | 
			
		||||
OLED_DRIVER = SSD1306    # Enable the OLED Driver
 | 
			
		||||
 | 
			
		||||
ENCODER_ENABLE = yes
 | 
			
		||||
 | 
			
		||||
SPLIT_KEYBOARD = yes
 | 
			
		||||
SERIAL_DRIVER = usart
 | 
			
		||||
LTO_ENABLE = yes
 | 
			
		||||
OPT = 3
 | 
			
		||||
 | 
			
		||||
OPT_DEFS += -DOLED_FONT_H=\"../common/glcdfont.c\"
 | 
			
		||||
OPT_DEFS += -Ikeyboards/rgbkb/common
 | 
			
		||||
 | 
			
		||||
# TODO: Implement fast matrix scanning
 | 
			
		||||
# matrix optimisations
 | 
			
		||||
# SRC += matrix.c
 | 
			
		||||
 | 
			
		||||
DEFAULT_FOLDER = rgbkb/sol3/rev1
 | 
			
		||||
							
								
								
									
										38
									
								
								keyboards/rgbkb/sol3/sol3.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								keyboards/rgbkb/sol3/sol3.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,38 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "sol3.h"
 | 
			
		||||
#include "eeconfig.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
#include <transactions.h>
 | 
			
		||||
 | 
			
		||||
extern audio_config_t audio_config;
 | 
			
		||||
 | 
			
		||||
void keyboard_post_init_kb(void) {
 | 
			
		||||
    touch_encoder_init();
 | 
			
		||||
    transaction_register_rpc(TOUCH_ENCODER_SYNC, touch_encoder_slave_sync);
 | 
			
		||||
    transaction_register_rpc(RGB_MENU_SYNC, rgb_menu_slave_sync);
 | 
			
		||||
    keyboard_post_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void eeconfig_init_kb(void) {
 | 
			
		||||
    // Reset Keyboard EEPROM value to blank, rather than to a set value
 | 
			
		||||
    eeconfig_update_kb(0);
 | 
			
		||||
 | 
			
		||||
    audio_config.raw = eeconfig_read_audio();
 | 
			
		||||
    audio_config.clicky_enable = false;
 | 
			
		||||
    eeconfig_update_audio(audio_config.raw);
 | 
			
		||||
 | 
			
		||||
    eeconfig_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void housekeeping_task_kb(void) {
 | 
			
		||||
    touch_encoder_update(TOUCH_ENCODER_SYNC);
 | 
			
		||||
    rgb_menu_update(RGB_MENU_SYNC);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										18
									
								
								keyboards/rgbkb/sol3/sol3.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								keyboards/rgbkb/sol3/sol3.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
/*
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 * "THE BEER-WARE LICENSE" (Revision 42):
 | 
			
		||||
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 | 
			
		||||
 * notice you can do whatever you want with this stuff. If we meet some day, and
 | 
			
		||||
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 | 
			
		||||
 * ----------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#if defined(KEYBOARD_rgbkb_sol3_rev1)
 | 
			
		||||
#    include "rev1.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "quantum.h"
 | 
			
		||||
#include "touch_encoder.h"
 | 
			
		||||
#include "common_oled.h"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue