mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
last commit for glasser code
This commit is contained in:
@@ -245,7 +245,7 @@
|
||||
* PA15 - ROW4
|
||||
*/
|
||||
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \
|
||||
PIN_MODE_INPUT(GPIOA_PIN1) | \
|
||||
PIN_MODE_ALTERNATE(GPIOA_PIN1) | \
|
||||
PIN_MODE_INPUT(GPIOA_PIN2) | \
|
||||
PIN_MODE_INPUT(GPIOA_PIN3) | \
|
||||
PIN_MODE_INPUT(GPIOA_PIN4) | \
|
||||
@@ -325,7 +325,7 @@
|
||||
PIN_ODR_HIGH(GPIOA_SWCLK) | \
|
||||
PIN_ODR_HIGH(GPIOA_PIN15))
|
||||
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \
|
||||
PIN_AFIO_AF(GPIOA_PIN1, 0) | \
|
||||
PIN_AFIO_AF(GPIOA_PIN1, 1) | \
|
||||
PIN_AFIO_AF(GPIOA_PIN2, 0) | \
|
||||
PIN_AFIO_AF(GPIOA_PIN3, 0) | \
|
||||
PIN_AFIO_AF(GPIOA_PIN4, 0) | \
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
* @brief System time counter resolution.
|
||||
* @note Allowed values are 16 or 32 bits.
|
||||
*/
|
||||
#define CH_CFG_ST_RESOLUTION 32
|
||||
#define CH_CFG_ST_RESOLUTION 16
|
||||
|
||||
/**
|
||||
* @brief System tick frequency.
|
||||
|
||||
@@ -125,10 +125,10 @@
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#define WS2812_LED_N 1
|
||||
#define WS2812_LED_N 2
|
||||
#define RGBLED_NUM WS2812_LED_N
|
||||
#define WS2812_TIM_N 1
|
||||
#define WS2812_TIM_CH 1
|
||||
#define WS2812_TIM_N 2
|
||||
#define WS2812_TIM_CH 2
|
||||
#define PORT_WS2812 GPIOA
|
||||
#define PIN_WS2812 1
|
||||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
|
||||
|
||||
@@ -182,8 +182,8 @@
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 TRUE
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
#define STM32_PWM_USE_TIM4 FALSE
|
||||
#define STM32_PWM_USE_TIM8 FALSE
|
||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
||||
@@ -224,7 +224,7 @@
|
||||
* ST driver system settings.
|
||||
*/
|
||||
#define STM32_ST_IRQ_PRIORITY 8
|
||||
#define STM32_ST_USE_TIMER 2
|
||||
#define STM32_ST_USE_TIMER 3
|
||||
|
||||
/*
|
||||
* UART driver system settings.
|
||||
|
||||
@@ -17,13 +17,20 @@
|
||||
#include "rgblight.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// rgblight_enable();
|
||||
// rgblight_mode(1);
|
||||
// rgblight_setrgb(0xFF, 0xFF, 0xFF);
|
||||
ws2812_init();
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xFF, 0xFF, 0xFF);
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
|
||||
int s = 0;
|
||||
for (int n = 0; n < WS2812_LED_N; n++) {
|
||||
int s0 = s + 10*n;
|
||||
ws2812_write_led(n, s0%255, (s0+85)%255, (s0+170)%255);
|
||||
}
|
||||
s += 10;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user