summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/midi/midi_device.c
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
committerzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
commite7931289918221081cbe2a7ea5df27a5d86324db (patch)
tree0b06145520f8aaf5ff5cb928aa5176fc2dd23619 /tmk_core/protocol/midi/midi_device.c
parentc0ee3d2c79388187883b1b1b1d1a0b6842acf741 (diff)
parentcf31355f08dca311a013168eb3eb995e2fc6a3d1 (diff)
Merge remote-tracking branch 'origin/develop'
Diffstat (limited to 'tmk_core/protocol/midi/midi_device.c')
-rw-r--r--tmk_core/protocol/midi/midi_device.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tmk_core/protocol/midi/midi_device.c b/tmk_core/protocol/midi/midi_device.c
index 58fe685e2d..77c010b156 100644
--- a/tmk_core/protocol/midi/midi_device.c
+++ b/tmk_core/protocol/midi/midi_device.c
@@ -60,12 +60,17 @@ void midi_device_init(MidiDevice* device) {
void midi_device_input(MidiDevice* device, uint8_t cnt, uint8_t* input) {
uint8_t i;
- for (i = 0; i < cnt; i++) bytequeue_enqueue(&device->input_queue, input[i]);
+ for (i = 0; i < cnt; i++)
+ bytequeue_enqueue(&device->input_queue, input[i]);
}
-void midi_device_set_send_func(MidiDevice* device, midi_var_byte_func_t send_func) { device->send_func = send_func; }
+void midi_device_set_send_func(MidiDevice* device, midi_var_byte_func_t send_func) {
+ device->send_func = send_func;
+}
-void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_func_t pre_process_func) { device->pre_input_process_callback = pre_process_func; }
+void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_func_t pre_process_func) {
+ device->pre_input_process_callback = pre_process_func;
+}
void midi_device_process(MidiDevice* device) {
// call the pre_input_process_callback if there is one