Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot
2025-11-30 19:25:52 +00:00
92 changed files with 307 additions and 348 deletions

View File

@@ -47,8 +47,7 @@
#ifndef SOLENOID_PINS #ifndef SOLENOID_PINS
# ifdef SOLENOID_PIN # ifdef SOLENOID_PIN
# define SOLENOID_PINS \ # define SOLENOID_PINS {SOLENOID_PIN}
{ SOLENOID_PIN }
# else # else
# error SOLENOID_PINS array not defined # error SOLENOID_PINS array not defined
# endif # endif

View File

@@ -34,8 +34,7 @@
#endif #endif
#ifndef SNLED27351_CURRENT_TUNE #ifndef SNLED27351_CURRENT_TUNE
# define SNLED27351_CURRENT_TUNE \ # define SNLED27351_CURRENT_TUNE {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
#endif #endif
const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = { const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = {

View File

@@ -34,8 +34,7 @@
#endif #endif
#ifndef SNLED27351_CURRENT_TUNE #ifndef SNLED27351_CURRENT_TUNE
# define SNLED27351_CURRENT_TUNE \ # define SNLED27351_CURRENT_TUNE {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
#endif #endif
const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = { const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = {

View File

@@ -301,24 +301,18 @@ bool oled_init(oled_rotation_t rotation) {
oled_driver_init(); oled_driver_init();
static const uint8_t PROGMEM display_setup1[] = { static const uint8_t PROGMEM display_setup1[] = {
I2C_CMD, I2C_CMD, DISPLAY_OFF, DISPLAY_CLOCK, OLED_DISPLAY_CLOCK, MULTIPLEX_RATIO,
DISPLAY_OFF,
DISPLAY_CLOCK,
OLED_DISPLAY_CLOCK,
MULTIPLEX_RATIO,
#if OLED_IC_COM_PINS_ARE_COLUMNS #if OLED_IC_COM_PINS_ARE_COLUMNS
OLED_DISPLAY_WIDTH - 1, OLED_DISPLAY_WIDTH - 1,
#else #else
OLED_DISPLAY_HEIGHT - 1, OLED_DISPLAY_HEIGHT - 1,
#endif #endif
#if OLED_IC == OLED_IC_SH1107 #if OLED_IC == OLED_IC_SH1107
SH1107_DISPLAY_START_LINE, SH1107_DISPLAY_START_LINE, 0x00,
0x00,
#else #else
DISPLAY_START_LINE | 0x00, DISPLAY_START_LINE | 0x00,
#endif #endif
CHARGE_PUMP, CHARGE_PUMP, 0x14,
0x14,
#if OLED_IC_HAS_HORIZONTAL_MODE #if OLED_IC_HAS_HORIZONTAL_MODE
// MEMORY_MODE is unsupported on SH1106 (Page Addressing only) // MEMORY_MODE is unsupported on SH1106 (Page Addressing only)
MEMORY_MODE, MEMORY_MODE,

View File

@@ -53,12 +53,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
# ifndef OLED_SOURCE_MAP # ifndef OLED_SOURCE_MAP
# define OLED_SOURCE_MAP \ # define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56}
{ 0, 8, 16, 24, 32, 40, 48, 56 }
# endif # endif
# ifndef OLED_TARGET_MAP # ifndef OLED_TARGET_MAP
# define OLED_TARGET_MAP \ # define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0}
{ 56, 48, 40, 32, 24, 16, 8, 0 }
# endif # endif
// If OLED_BLOCK_TYPE is uint32_t, these tables would look like: // If OLED_BLOCK_TYPE is uint32_t, these tables would look like:
// #define OLED_SOURCE_MAP { 32, 40, 48, 56 } // #define OLED_SOURCE_MAP { 32, 40, 48, 56 }
@@ -97,12 +95,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# endif # endif
# ifndef OLED_SOURCE_MAP # ifndef OLED_SOURCE_MAP
# define OLED_SOURCE_MAP \ # define OLED_SOURCE_MAP {0, 8, 16, 24}
{ 0, 8, 16, 24 }
# endif # endif
# ifndef OLED_TARGET_MAP # ifndef OLED_TARGET_MAP
# define OLED_TARGET_MAP \ # define OLED_TARGET_MAP {24, 16, 8, 0}
{ 24, 16, 8, 0 }
# endif # endif
#elif defined(OLED_DISPLAY_64X48) #elif defined(OLED_DISPLAY_64X48)
@@ -132,12 +128,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# endif # endif
# ifndef OLED_SOURCE_MAP # ifndef OLED_SOURCE_MAP
# define OLED_SOURCE_MAP \ # define OLED_SOURCE_MAP {0, 8}
{ 0, 8 }
# endif # endif
# ifndef OLED_TARGET_MAP # ifndef OLED_TARGET_MAP
# define OLED_TARGET_MAP \ # define OLED_TARGET_MAP {8, 0}
{ 8, 0 }
# endif # endif
#elif defined(OLED_DISPLAY_64X128) #elif defined(OLED_DISPLAY_64X128)
@@ -170,12 +164,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# endif # endif
# ifndef OLED_SOURCE_MAP # ifndef OLED_SOURCE_MAP
# define OLED_SOURCE_MAP \ # define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56}
{ 0, 8, 16, 24, 32, 40, 48, 56 }
# endif # endif
# ifndef OLED_TARGET_MAP # ifndef OLED_TARGET_MAP
# define OLED_TARGET_MAP \ # define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0}
{ 56, 48, 40, 32, 24, 16, 8, 0 }
# endif # endif
#elif defined(OLED_DISPLAY_128X128) #elif defined(OLED_DISPLAY_128X128)
@@ -208,12 +200,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
# ifndef OLED_SOURCE_MAP # ifndef OLED_SOURCE_MAP
# define OLED_SOURCE_MAP \ # define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56}
{ 0, 8, 16, 24, 32, 40, 48, 56 }
# endif # endif
# ifndef OLED_TARGET_MAP # ifndef OLED_TARGET_MAP
# define OLED_TARGET_MAP \ # define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0}
{ 56, 48, 40, 32, 24, 16, 8, 0 }
# endif # endif
#else // defined(OLED_DISPLAY_128X64) #else // defined(OLED_DISPLAY_128X64)
// Default 128x32 // Default 128x32
@@ -242,12 +232,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
# ifndef OLED_SOURCE_MAP # ifndef OLED_SOURCE_MAP
# define OLED_SOURCE_MAP \ # define OLED_SOURCE_MAP {0, 8, 16, 24}
{ 0, 8, 16, 24 }
# endif # endif
# ifndef OLED_TARGET_MAP # ifndef OLED_TARGET_MAP
# define OLED_TARGET_MAP \ # define OLED_TARGET_MAP {24, 16, 8, 0}
{ 24, 16, 8, 0 }
# endif # endif
// If OLED_BLOCK_TYPE is uint8_t, these tables would look like: // If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }

View File

@@ -72,14 +72,12 @@ STATIC_ASSERT(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.motio
# ifndef PMW33XX_CS_PIN # ifndef PMW33XX_CS_PIN
# ifdef POINTING_DEVICE_CS_PIN # ifdef POINTING_DEVICE_CS_PIN
# define PMW33XX_CS_PIN POINTING_DEVICE_CS_PIN # define PMW33XX_CS_PIN POINTING_DEVICE_CS_PIN
# define PMW33XX_CS_PINS \ # define PMW33XX_CS_PINS {PMW33XX_CS_PIN}
{ PMW33XX_CS_PIN }
# else # else
# error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS" # error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS"
# endif # endif
# else # else
# define PMW33XX_CS_PINS \ # define PMW33XX_CS_PINS {PMW33XX_CS_PIN}
{ PMW33XX_CS_PIN }
# endif # endif
#endif #endif
@@ -88,8 +86,7 @@ STATIC_ASSERT(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.motio
# if !defined(PMW33XX_CS_PIN_RIGHT) # if !defined(PMW33XX_CS_PIN_RIGHT)
# define PMW33XX_CS_PIN_RIGHT PMW33XX_CS_PIN # define PMW33XX_CS_PIN_RIGHT PMW33XX_CS_PIN
# endif # endif
# define PMW33XX_CS_PINS_RIGHT \ # define PMW33XX_CS_PINS_RIGHT {PMW33XX_CS_PIN_RIGHT}
{ PMW33XX_CS_PIN_RIGHT }
#endif #endif
// Defines so the old variable names are swapped by the appropiate value on each half // Defines so the old variable names are swapped by the appropiate value on each half

View File

@@ -188,8 +188,7 @@ void ws2812_init(void) {
0, 0,
WS2812_SPI_DIVISOR WS2812_SPI_DIVISOR
# else # else
WS2812_SPI_DIVISOR_CR1_BR_X, WS2812_SPI_DIVISOR_CR1_BR_X, 0
0
# endif # endif
#else #else
// HAL_SPI_V2 // HAL_SPI_V2

View File

@@ -135,8 +135,7 @@ void clear_oneshot_swaphands(void);
void neutralize_flashing_modifiers(uint8_t active_mods); void neutralize_flashing_modifiers(uint8_t active_mods);
#endif #endif
#ifndef MODS_TO_NEUTRALIZE #ifndef MODS_TO_NEUTRALIZE
# define MODS_TO_NEUTRALIZE \ # define MODS_TO_NEUTRALIZE {MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI)}
{ MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI) }
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -21,12 +21,10 @@
// in beats-per-minute // in beats-per-minute
#endif #endif
#define SONG(notes...) \ #define SONG(notes...) {notes}
{ notes }
// Note Types // Note Types
#define MUSICAL_NOTE(note, duration) \ #define MUSICAL_NOTE(note, duration) {(NOTE##note), duration}
{ (NOTE##note), duration }
#define BREVE_NOTE(note) MUSICAL_NOTE(note, 128) #define BREVE_NOTE(note) MUSICAL_NOTE(note, 128)
#define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64) #define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64)

View File

@@ -16,7 +16,9 @@ static const pin_t backlight_pins[] = BACKLIGHT_PINS;
# define FOR_EACH_LED(x) \ # define FOR_EACH_LED(x) \
for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \
pin_t backlight_pin = backlight_pins[i]; \ pin_t backlight_pin = backlight_pins[i]; \
{ x } \ { \
x \
} \
} }
#else #else
// we support only one backlight pin // we support only one backlight pin

View File

@@ -49,7 +49,6 @@ void dip_switch_task(void);
#ifdef DIP_SWITCH_MAP_ENABLE #ifdef DIP_SWITCH_MAP_ENABLE
# define NUM_DIP_STATES 2 # define NUM_DIP_STATES 2
# define DIP_SWITCH_OFF_ON(off, on) \ # define DIP_SWITCH_OFF_ON(off, on) {(off), (on)}
{ (off), (on) }
extern const uint16_t dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES]; extern const uint16_t dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES];
#endif // DIP_SWITCH_MAP_ENABLE #endif // DIP_SWITCH_MAP_ENABLE

View File

@@ -111,8 +111,7 @@ void encoder_signal_queue_drain(void);
# ifdef ENCODER_MAP_ENABLE # ifdef ENCODER_MAP_ENABLE
# define NUM_DIRECTIONS 2 # define NUM_DIRECTIONS 2
# define ENCODER_CCW_CW(ccw, cw) \ # define ENCODER_CCW_CW(ccw, cw) {(cw), (ccw)}
{ (cw), (ccw) }
extern const uint16_t encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS]; extern const uint16_t encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS];
# endif // ENCODER_MAP_ENABLE # endif // ENCODER_MAP_ENABLE

View File

@@ -7,10 +7,8 @@
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS {0}
{ 0 } #define ENCODER_B_PINS {1}
#define ENCODER_B_PINS \
{ 1 }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -7,14 +7,10 @@
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS {0, 2}
{ 0, 2 } #define ENCODER_B_PINS {1, 3}
#define ENCODER_B_PINS \ #define ENCODER_A_PINS_RIGHT {4, 6}
{ 1, 3 } #define ENCODER_B_PINS_RIGHT {5, 7}
#define ENCODER_A_PINS_RIGHT \
{ 4, 6 }
#define ENCODER_B_PINS_RIGHT \
{ 5, 7 }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -7,14 +7,10 @@
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS {0, 2, 4}
{ 0, 2, 4 } #define ENCODER_B_PINS {1, 3, 5}
#define ENCODER_B_PINS \ #define ENCODER_A_PINS_RIGHT {6, 8}
{ 1, 3, 5 } #define ENCODER_B_PINS_RIGHT {7, 9}
#define ENCODER_A_PINS_RIGHT \
{ 6, 8 }
#define ENCODER_B_PINS_RIGHT \
{ 7, 9 }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -7,14 +7,10 @@
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS {0, 2}
{ 0, 2 } #define ENCODER_B_PINS {1, 3}
#define ENCODER_B_PINS \ #define ENCODER_A_PINS_RIGHT {4, 6, 8}
{ 1, 3 } #define ENCODER_B_PINS_RIGHT {5, 7, 9}
#define ENCODER_A_PINS_RIGHT \
{ 4, 6, 8 }
#define ENCODER_B_PINS_RIGHT \
{ 5, 7, 9 }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -8,13 +8,13 @@
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS \
{} { \
}
#define ENCODER_B_PINS \ #define ENCODER_B_PINS \
{} { \
#define ENCODER_A_PINS_RIGHT \ }
{ 0, 2 } #define ENCODER_A_PINS_RIGHT {0, 2}
#define ENCODER_B_PINS_RIGHT \ #define ENCODER_B_PINS_RIGHT {1, 3}
{ 1, 3 }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -7,14 +7,14 @@
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS {0, 2}
{ 0, 2 } #define ENCODER_B_PINS {1, 3}
#define ENCODER_B_PINS \
{ 1, 3 }
#define ENCODER_A_PINS_RIGHT \ #define ENCODER_A_PINS_RIGHT \
{} { \
}
#define ENCODER_B_PINS_RIGHT \ #define ENCODER_B_PINS_RIGHT \
{} { \
}
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -7,14 +7,10 @@
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* Here, "pins" from 0 to 31 are allowed. */ /* Here, "pins" from 0 to 31 are allowed. */
#define ENCODER_A_PINS \ #define ENCODER_A_PINS {0, 2}
{ 0, 2 } #define ENCODER_B_PINS {1, 3}
#define ENCODER_B_PINS \ #define ENCODER_A_PINS_RIGHT {4, 6}
{ 1, 3 } #define ENCODER_B_PINS_RIGHT {5, 7}
#define ENCODER_A_PINS_RIGHT \
{ 4, 6 }
#define ENCODER_B_PINS_RIGHT \
{ 5, 7 }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -64,10 +64,8 @@
// configure on input_pin of the joystick_axes array entry to NO_PIN // configure on input_pin of the joystick_axes array entry to NO_PIN
// to prevent it from being read from the ADC. This allows outputting forged axis value. // to prevent it from being read from the ADC. This allows outputting forged axis value.
#define JOYSTICK_AXIS_VIRTUAL \ #define JOYSTICK_AXIS_VIRTUAL {NO_PIN, 0, JOYSTICK_MAX_VALUE / 2, JOYSTICK_MAX_VALUE}
{ NO_PIN, 0, JOYSTICK_MAX_VALUE / 2, JOYSTICK_MAX_VALUE } #define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) {INPUT_PIN, LOW, REST, HIGH}
#define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) \
{ INPUT_PIN, LOW, REST, HIGH }
typedef struct { typedef struct {
pin_t input_pin; pin_t input_pin;

View File

@@ -57,10 +57,8 @@ typedef struct combo_t {
#endif #endif
} combo_t; } combo_t;
#define COMBO(ck, ca) \ #define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)}
{ .keys = &(ck)[0], .keycode = (ca) } #define COMBO_ACTION(ck) {.keys = &(ck)[0]}
#define COMBO_ACTION(ck) \
{ .keys = &(ck)[0] }
#define COMBO_END 0 #define COMBO_END 0
#ifndef COMBO_TERM #ifndef COMBO_TERM

View File

@@ -39,7 +39,8 @@
# define key_override_printf dprintf # define key_override_printf dprintf
#else #else
# define key_override_printf(str, ...) \ # define key_override_printf(str, ...) \
{} { \
}
#endif #endif
// Helpers // Helpers

View File

@@ -59,22 +59,40 @@ typedef struct {
} tap_dance_dual_role_t; } tap_dance_dual_role_t;
#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \ #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \
{ .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, .user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), } { \
.fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, \
.user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), \
}
#define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \ #define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \
{ .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), } { \
.fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, \
.user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), \
}
#define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ #define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \
{ .fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), } { \
.fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, \
.user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), \
}
#define ACTION_TAP_DANCE_FN(user_fn) \ #define ACTION_TAP_DANCE_FN(user_fn) \
{ .fn = {NULL, user_fn, NULL, NULL}, .user_data = NULL, } { \
.fn = {NULL, user_fn, NULL, NULL}, \
.user_data = NULL, \
}
#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) \ #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) \
{ .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, NULL}, .user_data = NULL, } { \
.fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, NULL}, \
.user_data = NULL, \
}
#define ACTION_TAP_DANCE_FN_ADVANCED_WITH_RELEASE(user_fn_on_each_tap, user_fn_on_each_release, user_fn_on_dance_finished, user_fn_on_dance_reset) \ #define ACTION_TAP_DANCE_FN_ADVANCED_WITH_RELEASE(user_fn_on_each_tap, user_fn_on_each_release, user_fn_on_dance_finished, user_fn_on_dance_reset) \
{ .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, .user_data = NULL, } { \
.fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, \
.user_data = NULL, \
}
#define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code) #define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code)
#define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions) #define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions)

View File

@@ -186,8 +186,7 @@ typedef struct {
# define RGBLIGHT_USE_TIMER # define RGBLIGHT_USE_TIMER
# define RGBLIGHT_END_SEGMENT_INDEX (255) # define RGBLIGHT_END_SEGMENT_INDEX (255)
# define RGBLIGHT_END_SEGMENTS \ # define RGBLIGHT_END_SEGMENTS {RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0}
{ RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 }
# ifndef RGBLIGHT_MAX_LAYERS # ifndef RGBLIGHT_MAX_LAYERS
# define RGBLIGHT_MAX_LAYERS 8 # define RGBLIGHT_MAX_LAYERS 8
# endif # endif
@@ -202,10 +201,8 @@ typedef uint32_t rgblight_layer_mask_t;
# else # else
# error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32) # error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32)
# endif # endif
# define RGBLIGHT_LAYER_SEGMENTS(...) \ # define RGBLIGHT_LAYER_SEGMENTS(...) {__VA_ARGS__, RGBLIGHT_END_SEGMENTS}
{ __VA_ARGS__, RGBLIGHT_END_SEGMENTS } # define RGBLIGHT_LAYERS_LIST(...) {__VA_ARGS__, NULL}
# define RGBLIGHT_LAYERS_LIST(...) \
{ __VA_ARGS__, NULL }
// Get/set enabled rgblight layers // Get/set enabled rgblight layers
void rgblight_set_layer_state(uint8_t layer, bool enabled); void rgblight_set_layer_state(uint8_t layer, bool enabled);

View File

@@ -14,10 +14,7 @@
#endif #endif
#ifndef SECURE_UNLOCK_SEQUENCE #ifndef SECURE_UNLOCK_SEQUENCE
# define SECURE_UNLOCK_SEQUENCE \ # define SECURE_UNLOCK_SEQUENCE {{0, 0}}
{ \
{ 0, 0 } \
}
#endif #endif
static secure_status_t secure_status = SECURE_LOCKED; static secure_status_t secure_status = SECURE_LOCKED;

View File

@@ -73,16 +73,13 @@
#define sizeof_member(type, member) sizeof(((type *)NULL)->member) #define sizeof_member(type, member) sizeof(((type *)NULL)->member)
#define trans_initiator2target_initializer_cb(member, cb) \ #define trans_initiator2target_initializer_cb(member, cb) {sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb}
{ sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb }
#define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL) #define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL)
#define trans_target2initiator_initializer_cb(member, cb) \ #define trans_target2initiator_initializer_cb(member, cb) {0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb}
{ 0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb }
#define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL) #define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL)
#define trans_initiator2target_cb(cb) \ #define trans_initiator2target_cb(cb) {0, 0, 0, 0, cb}
{ 0, 0, 0, 0, cb }
#define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0) #define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0)
#define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length) #define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length)

View File

@@ -20,5 +20,4 @@
#define RETRO_TAPPING #define RETRO_TAPPING
#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_RIGHT_CTRL #define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_RIGHT_CTRL
#define MODS_TO_NEUTRALIZE \ #define MODS_TO_NEUTRALIZE {MOD_BIT(KC_LEFT_GUI)}
{ MOD_BIT(KC_LEFT_GUI) }