machine/usb: change to not send before endpoint initialization

This commit is contained in:
sago35
2023-01-08 11:59:26 +09:00
committed by Ron Evans
parent a7ff2731b9
commit 5f3534fe72
5 changed files with 33 additions and 21 deletions
+7 -5
View File
@@ -71,11 +71,13 @@ func (m *midi) Handler() {
}
func (m *midi) tx(b []byte) {
if m.waitTxc {
m.buf.Put(b)
} else {
m.waitTxc = true
m.sendUSBPacket(b)
if machine.USBDev.InitEndpointComplete {
if m.waitTxc {
m.buf.Put(b)
} else {
m.waitTxc = true
m.sendUSBPacket(b)
}
}
}