Skip to content

Commit a6f1318

Browse files
committed
trigger callback once byte event
1 parent 7a057bb commit a6f1318

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libraries/Bluefruit52Lib/src/services/BLEMidi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,11 @@ void BLEMidi::_write_handler(uint8_t* data, uint16_t len)
194194
// write the status or MIDI data to the FIFO
195195
_rxd_fifo.write(data++, 1);
196196
len--;
197-
198-
if ( _write_cb ) _write_cb();
199197
}
200198

199+
// Call write callback if configured
200+
if ( _write_cb ) _write_cb();
201+
201202
#ifdef MIDI_LIB_INCLUDED
202203
// read while possible if configured
203204
if ( _midilib_obj )

0 commit comments

Comments
 (0)