process_keycode: remove direct quantum.h includes (#21486)

This commit is contained in:
Ryan 2023-07-11 17:07:24 +10:00 committed by GitHub
parent 39a97d2ee4
commit eee0384167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 257 additions and 155 deletions

View File

@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include "keyboard.h"
#include "action.h"
#include "bitwise.h"
#ifdef DYNAMIC_KEYMAP_ENABLE
# ifndef DYNAMIC_KEYMAP_LAYER_COUNT

View File

@ -5,6 +5,10 @@
#include "usb_descriptor.h"
#include "process_midi.h"
#ifdef AUDIO_ENABLE
# include "audio.h"
#endif
/*******************************************************************************
* MIDI
******************************************************************************/

View File

@ -1,5 +1,9 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
float compute_freq_for_midi_note(uint8_t note);
bool process_audio(uint16_t keycode, keyrecord_t *record);

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,11 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#include "keyboard.h"
#include "keycodes.h"
#ifndef AUTO_SHIFT_TIMEOUT
# define AUTO_SHIFT_TIMEOUT 175

View File

@ -6,7 +6,11 @@
#include "process_autocorrect.h"
#include <string.h>
#include "keycodes.h"
#include "quantum_keycodes.h"
#include "keycode_config.h"
#include "send_string.h"
#include "action_util.h"
#if __has_include("autocorrect_data.h")
# include "autocorrect_data.h"

View File

@ -6,7 +6,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_autocorrect(uint16_t keycode, keyrecord_t *record);
bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods);

View File

@ -16,6 +16,8 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_backlight(uint16_t keycode, keyrecord_t *record);

View File

@ -13,6 +13,14 @@
// limitations under the License.
#include "process_caps_word.h"
#include "process_auto_shift.h"
#include "caps_word.h"
#include "keycodes.h"
#include "quantum_keycodes.h"
#include "modifiers.h"
#include "timer.h"
#include "action_tapping.h"
#include "action_util.h"
#ifdef CAPS_WORD_INVERT_ON_SHIFT
static uint8_t held_mods = 0;

View File

@ -14,8 +14,9 @@
#pragma once
#include "quantum.h"
#include "caps_word.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
/**
* @brief Process handler for Caps Word feature.

View File

@ -1,5 +1,9 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
void clicky_play(void);
bool process_clicky(uint16_t keycode, keyrecord_t *record);

View File

@ -14,11 +14,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"
#include "print.h"
#include "process_combo.h"
#include <stddef.h>
#include "process_auto_shift.h"
#include "caps_word.h"
#include "timer.h"
#include "keyboard.h"
#include "keymap_common.h"
#include "action_layer.h"
#include "action_tapping.h"
#include "action.h"
#include "action_util.h"
#include "keymap_introspection.h"
__attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {}

View File

@ -16,9 +16,11 @@
#pragma once
#include "progmem.h"
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#include "keycodes.h"
#include "quantum_keycodes.h"
#ifdef EXTRA_SHORT_COMBOS
# define MAX_COMBO_LENGTH 6

View File

@ -17,6 +17,15 @@
/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
#include "process_dynamic_macro.h"
#include <stddef.h>
#include "action_layer.h"
#include "keycodes.h"
#include "debug.h"
#include "wait.h"
#ifdef BACKLIGHT_ENABLE
# include "backlight.h"
#endif
// default feedback method
void dynamic_macro_led_blink(void) {

View File

@ -18,7 +18,9 @@
/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
/* May be overridden with a custom value. Be aware that the effective
* macro length is half of this value: each keypress is recorded twice

View File

@ -14,8 +14,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "process_dynamic_tapping_term.h"
#include "quantum.h"
#include "keycodes.h"
#include "send_string.h"
#ifndef DYNAMIC_TAPPING_TERM_INCREMENT
# define DYNAMIC_TAPPING_TERM_INCREMENT 5

View File

@ -16,6 +16,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"

View File

@ -14,6 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_grave_esc.h"
#include "keycodes.h"
#include "modifiers.h"
#include "action_util.h"
/* true if the last press of QK_GRAVE_ESCAPE was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
* Used to ensure that the correct keycode is released if the key is released.

View File

@ -15,6 +15,8 @@
*/
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_grave_esc(uint16_t keycode, keyrecord_t *record);

View File

@ -15,6 +15,7 @@
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"

View File

@ -17,6 +17,7 @@
#pragma once
#include <stdint.h>
#include "quantum.h"
#include <stdbool.h>
#include "action.h"
bool process_joystick(uint16_t keycode, keyrecord_t *record);

View File

@ -16,7 +16,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
void cancel_key_lock(void);
bool process_key_lock(uint16_t *keycode, keyrecord_t *record);

View File

@ -15,12 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "process_key_override.h"
#include "report.h"
#include "timer.h"
#include "process_key_override.h"
#include <debug.h>
#include "debug.h"
#ifndef KEY_OVERRIDE_REPEAT_DELAY
# define KEY_OVERRIDE_REPEAT_DELAY 500

View File

@ -18,9 +18,8 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "action.h"
#include "action_layer.h"
/**

View File

@ -16,6 +16,7 @@
#include "process_leader.h"
#include "leader.h"
#include "quantum_keycodes.h"
bool process_leader(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {

View File

@ -16,6 +16,8 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_leader(uint16_t keycode, keyrecord_t *record);

View File

@ -14,8 +14,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_magic.h"
#include "keycode_config.h"
#include "keycodes.h"
#include "eeconfig.h"
#ifdef AUDIO_ENABLE
# include "audio.h"
# ifndef AG_NORM_SONG
# define AG_NORM_SONG SONG(AG_NORM_SOUND)
# endif

View File

@ -15,6 +15,8 @@
*/
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_magic(uint16_t keycode, keyrecord_t *record);

View File

@ -15,12 +15,13 @@
*/
#include "process_midi.h"
#ifdef MIDI_ENABLE
# include <LUFA/Drivers/USB/USB.h>
# include "midi.h"
# include "qmk_midi.h"
#include <LUFA/Drivers/USB/USB.h>
#include "midi.h"
#include "qmk_midi.h"
#include "timer.h"
#include "debug.h"
# ifdef MIDI_BASIC
#ifdef MIDI_BASIC
void process_midi_basic_noteon(uint8_t note) {
midi_send_noteon(&midi_device, 0, note, 127);
@ -34,12 +35,9 @@ void process_midi_all_notes_off(void) {
midi_send_cc(&midi_device, 0, 0x7B, 0);
}
# endif // MIDI_BASIC
# ifdef MIDI_ADVANCED
# include "timer.h"
#endif // MIDI_BASIC
#ifdef MIDI_ADVANCED
static uint8_t tone_status[2][MIDI_TONE_COUNT];
static uint8_t midi_modulation;
@ -248,11 +246,11 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) {
return true;
}
# endif // MIDI_ADVANCED
#endif // MIDI_ADVANCED
void midi_task(void) {
midi_device_process(&midi_device);
# ifdef MIDI_ADVANCED
#ifdef MIDI_ADVANCED
if (timer_elapsed(midi_modulation_timer) < midi_config.modulation_interval) return;
midi_modulation_timer = timer_read();
@ -270,7 +268,5 @@ void midi_task(void) {
if (midi_modulation > 127) midi_modulation = 127;
}
# endif
#endif
}
#endif // MIDI_ENABLE

View File

@ -16,7 +16,10 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#include "quantum_keycodes.h"
#ifdef MIDI_ENABLE

Some files were not shown because too many files have changed in this diff Show More