forked from mirrors/qmk_firmware
qmk cformat (#10767)
This commit is contained in:
parent
75a18e69f9
commit
991c75081c
4 changed files with 11 additions and 13 deletions
|
@ -40,7 +40,7 @@ void haptic_init(void) {
|
||||||
#ifdef SOLENOID_ENABLE
|
#ifdef SOLENOID_ENABLE
|
||||||
|| (haptic_config.dwell == 0)
|
|| (haptic_config.dwell == 0)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
// this will be called, if the eeprom is not corrupt,
|
// this will be called, if the eeprom is not corrupt,
|
||||||
// but the previous firmware didn't have haptic enabled,
|
// but the previous firmware didn't have haptic enabled,
|
||||||
// or the previous firmware didn't have solenoid enabled,
|
// or the previous firmware didn't have solenoid enabled,
|
||||||
|
|
|
@ -246,9 +246,7 @@ static uint16_t cie_lightness(uint16_t v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// rescale the supplied backlight value to be in terms of the value limit
|
// rescale the supplied backlight value to be in terms of the value limit
|
||||||
static uint32_t rescale_limit_val(uint32_t val) {
|
static uint32_t rescale_limit_val(uint32_t val) { return (val * (BACKLIGHT_LIMIT_VAL + 1)) / 256; }
|
||||||
return (val * (BACKLIGHT_LIMIT_VAL + 1)) / 256;
|
|
||||||
}
|
|
||||||
|
|
||||||
// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val.
|
// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val.
|
||||||
static inline void set_pwm(uint16_t val) { OCRxx = val; }
|
static inline void set_pwm(uint16_t val) { OCRxx = val; }
|
||||||
|
|
|
@ -230,14 +230,14 @@ void process_record_handler(keyrecord_t *record) {
|
||||||
|
|
||||||
#if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE)
|
#if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE)
|
||||||
void register_button(bool pressed, enum mouse_buttons button) {
|
void register_button(bool pressed, enum mouse_buttons button) {
|
||||||
#ifdef PS2_MOUSE_ENABLE
|
# ifdef PS2_MOUSE_ENABLE
|
||||||
tp_buttons = pressed ? tp_buttons | button : tp_buttons & ~button;
|
tp_buttons = pressed ? tp_buttons | button : tp_buttons & ~button;
|
||||||
#endif
|
# endif
|
||||||
#ifdef POINTING_DEVICE_ENABLE
|
# ifdef POINTING_DEVICE_ENABLE
|
||||||
report_mouse_t currentReport = pointing_device_get_report();
|
report_mouse_t currentReport = pointing_device_get_report();
|
||||||
currentReport.buttons = pressed ? currentReport.buttons | button : currentReport.buttons & ~button;
|
currentReport.buttons = pressed ? currentReport.buttons | button : currentReport.buttons & ~button;
|
||||||
pointing_device_set_report(currentReport);
|
pointing_device_set_report(currentReport);
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -742,9 +742,9 @@ void process_action(keyrecord_t *record, action_t action) {
|
||||||
retro_tapping_counter = 0;
|
retro_tapping_counter = 0;
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
# ifdef RETRO_TAPPING_PER_KEY
|
# ifdef RETRO_TAPPING_PER_KEY
|
||||||
get_retro_tapping(get_event_keycode(record->event, false), record) &&
|
get_retro_tapping(get_event_keycode(record->event, false), record) &&
|
||||||
# endif
|
# endif
|
||||||
retro_tapping_counter == 2) {
|
retro_tapping_counter == 2) {
|
||||||
tap_code(action.layer_tap.code);
|
tap_code(action.layer_tap.code);
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,9 +193,9 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
#if JOYSTICK_AXES_COUNT > 0
|
#if JOYSTICK_AXES_COUNT > 0
|
||||||
# if JOYSTICK_AXES_RESOLUTION > 8
|
# if JOYSTICK_AXES_RESOLUTION > 8
|
||||||
int16_t axes[JOYSTICK_AXES_COUNT];
|
int16_t axes[JOYSTICK_AXES_COUNT];
|
||||||
# else
|
# else
|
||||||
int8_t axes[JOYSTICK_AXES_COUNT];
|
int8_t axes[JOYSTICK_AXES_COUNT];
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue