From b06d1dcb50e1a6786f22125fcbb3466e131a1808 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 28 Mar 2021 19:37:32 +0200 Subject: [PATCH] Add raw send_bytes function --- src/midi_device.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/midi_device.rs b/src/midi_device.rs index 2f2ae13..92df3d6 100644 --- a/src/midi_device.rs +++ b/src/midi_device.rs @@ -47,7 +47,10 @@ impl MidiClass<'_, B> { }) } - pub fn send_message(&mut self, usb_midi:UsbMidiEventPacket) -> Result { + pub fn send_bytes(&mut self, buffer: [u8; 4]) -> Result { + self.standard_bulkin.write(&buffer) + } + pub fn send_message(&mut self, usb_midi: UsbMidiEventPacket) -> Result { let bytes : [u8;MIDI_PACKET_SIZE] = usb_midi.into(); self.standard_bulkin.write(&bytes) }