forked from mirrors/qmk_userspace
process_keycode: remove direct quantum.h
includes (#21486)
This commit is contained in:
parent
39a97d2ee4
commit
eee0384167
46 changed files with 257 additions and 155 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue