diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
commit | 6afdd9d74da250e47ac64d6690bd19d037045e99 (patch) | |
tree | 661f6cfb244c02bcd1fbfe8fb9b2bd9242a91394 /keyboards/mechlovin/adelais/rgb_led | |
parent | 93a55e61b59d20f7cd842cce02e5b18a63a23612 (diff) | |
parent | 1bdf4cdc22ae57d111efb2f7d71e405e5c7b3f11 (diff) | |
download | qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.tar.gz qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/mechlovin/adelais/rgb_led')
10 files changed, 50 insertions, 75 deletions
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index c0cae1600b..7f151ae09a 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -1,11 +1,7 @@ #pragma once -#define PRODUCT_ID 0xAEC1 -#define PRODUCT Adelais En Ciel - #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } -#define UNUSED_PINS #define RGB_DI_PIN A7 #define DRIVER_LED_TOTAL 91 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/info.json b/keyboards/mechlovin/adelais/rgb_led/rev1/info.json new file mode 100644 index 0000000000..92ee67be74 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Adelais En Ciel", + "usb": { + "pid": "0xAEC1" + } +} diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index cd290cdcd1..dbeb73cda2 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -1,8 +1,5 @@ #pragma once -#define PRODUCT_ID 0xAEC2 -#define PRODUCT Adelais En Ciel Rev2 - #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A7 } diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/info.json b/keyboards/mechlovin/adelais/rgb_led/rev2/info.json new file mode 100644 index 0000000000..8af90a2c55 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Adelais En Ciel Rev2", + "usb": { + "pid": "0xAEC2" + } +} diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h index c0817d6062..e16d5f2ce5 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h @@ -17,12 +17,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define PRODUCT_ID 0xAEC3 -#define PRODUCT Adelais En Ciel Rev3 - #define MATRIX_ROW_PINS { A4, A3, C13, A1, A2} -#define MATRIX_COL_PINS { B10, B11, B2, B1, B0, A6, A5, A14, A13, A15, B3, B4, B5, B8, B9 } +#define MATRIX_COL_PINS { B10, B11, B2, B1, B0, A6, A5, A10, A9, A15, B3, B4, B5, B8, B9 } +#ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN A7 #define WS2812_SPI SPID1 // default: SPID1 #define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5 @@ -40,7 +38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#endif +#ifdef RGB_MATRIX_ENABLE //rgb matrix setting // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -52,13 +52,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DRIVER_ADDR_1 0b0110010 #define DRIVER_COUNT 1 #define DRIVER_LED_TOTAL 66 + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set #define ENABLE_RGB_MATRIX_ALPHAS_MODS @@ -108,12 +109,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_DISABLE_KEYCODES +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#endif + +#ifdef ENCODER_ENABLE #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } #define ENCODER_RESOLUTION 4 - #define TAP_CODE_DELAY 10 - +#endif #define LED_NUM_LOCK_PIN A0 #define LED_CAPS_LOCK_PIN C14 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h b/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h index d001829d03..a97c4bbc21 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h @@ -18,9 +18,7 @@ #define HAL_USE_I2C TRUE -#define PAL_USE_CALLBACKS FALSE - -#define PAL_USE_WAIT FALSE +#define HAL_USE_SPI TRUE #include_next <halconf.h> diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/info.json b/keyboards/mechlovin/adelais/rgb_led/rev3/info.json new file mode 100644 index 0000000000..2f963ec895 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Adelais En Ciel Rev3", + "usb": { + "pid": "0xAEC3" + } +} diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h b/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h index 20d2a82c27..aa5ea7335b 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h @@ -18,18 +18,8 @@ #include_next <mcuconf.h> -#undef STM32_GPT_USE_TIM15 -#define STM32_GPT_USE_TIM15 FALSE - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE - -#undef STM32_PWM_USE_TIM3 -#define STM32_PWM_USE_TIM3 FALSE - #undef STM32_SPI_USE_SPI1 #define STM32_SPI_USE_SPI1 TRUE -#undef STM32_SPI_USE_SPI2 -#define STM32_SPI_USE_SPI2 FALSE - +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c index b20f897720..d9ea7993cf 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c @@ -94,8 +94,8 @@ led_config_t g_led_config = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, NO_LED}, {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED}, - {45, NO_LED, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, - {59, NO_LED, 60, NO_LED, 61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65}, + {45, 0, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, + {59, 16, 60, 31, 61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65}, }, { //LED Index to Physical Positon {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {224, 0}, @@ -120,47 +120,3 @@ __attribute__((weak)) void rgb_matrix_indicators_user(void) { #endif - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - #ifdef RGBLIGHT_ENABLE - #ifdef RGB_MATRIX_ENABLE - case KC_F13: // toggle rgb matrix - rgb_matrix_toggle(); - return false; - case KC_F14: - rgb_matrix_step(); - return false; - case KC_F15: - rgb_matrix_increase_speed(); - return false; - case KC_F16: - rgb_matrix_decrease_speed(); - return false; - case KC_F17: - rgb_matrix_increase_hue(); - return false; - case KC_F18: - rgb_matrix_decrease_hue(); - return false; - case KC_F19: - rgb_matrix_increase_sat(); - return false; - case KC_F20: - rgb_matrix_decrease_sat(); - return false; - case KC_F21: - rgb_matrix_increase_val(); - return false; - case KC_F22: - rgb_matrix_decrease_val(); - return false; - #endif - #endif - default: - break; - } - } - return true; -}
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk index 904d20877b..3407a7b780 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk @@ -1,5 +1,19 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Build Options +# change yes to no to disable +# RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3741 RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes WS2812_DRIVER = spi +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
\ No newline at end of file |