mirror of
https://github.com/italicsjenga/usbd-midi.git
synced 2024-12-23 12:21:30 +11:00
Add raw send_bytes function
This commit is contained in:
parent
57f69e3a7f
commit
b06d1dcb50
|
@ -47,7 +47,10 @@ impl<B: UsbBus> MidiClass<'_, B> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_message(&mut self, usb_midi:UsbMidiEventPacket) -> Result<usize> {
|
pub fn send_bytes(&mut self, buffer: [u8; 4]) -> Result<usize> {
|
||||||
|
self.standard_bulkin.write(&buffer)
|
||||||
|
}
|
||||||
|
pub fn send_message(&mut self, usb_midi: UsbMidiEventPacket) -> Result<usize> {
|
||||||
let bytes : [u8;MIDI_PACKET_SIZE] = usb_midi.into();
|
let bytes : [u8;MIDI_PACKET_SIZE] = usb_midi.into();
|
||||||
self.standard_bulkin.write(&bytes)
|
self.standard_bulkin.write(&bytes)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue