| } else { | } else { | ||||
| tx_packet->len = MIDI_TX_SIZE; | tx_packet->len = MIDI_TX_SIZE; | ||||
| usb_tx(MIDI_TX_ENDPOINT, tx_packet); | usb_tx(MIDI_TX_ENDPOINT, tx_packet); | ||||
| tx_packet = usb_malloc(); | |||||
| tx_packet = NULL; | |||||
| } | } | ||||
| tx_noautoflush = 0; | tx_noautoflush = 0; | ||||
| } | } | ||||
| if (tx_noautoflush == 0 && tx_packet && tx_packet->index > 0) { | if (tx_noautoflush == 0 && tx_packet && tx_packet->index > 0) { | ||||
| tx_packet->len = tx_packet->index * 4; | tx_packet->len = tx_packet->index * 4; | ||||
| usb_tx(MIDI_TX_ENDPOINT, tx_packet); | usb_tx(MIDI_TX_ENDPOINT, tx_packet); | ||||
| tx_packet = usb_malloc(); | |||||
| tx_packet = NULL; | |||||
| } | } | ||||
| } | } | ||||