FastLED 3.9.15
Loading...
Searching...
No Matches

◆ sendCommon()

template<class Transport, class Settings, class Platform>
void MidiInterface< Transport, Settings, Platform >::sendCommon ( MidiType inType,
unsigned inData1 = 0 )
inline

Send a Common message. Common messages reset the running status.

Parameters
inTypeThe available Common types are: TimeCodeQuarterFrame, SongPosition, SongSelect and TuneRequest.
See also
MidiType
Parameters
inData1The byte that goes with the common message.

Definition at line 443 of file MIDI.hpp.

444{
445 switch (inType)
446 {
448 case SongPosition:
449 case SongSelect:
450 case TuneRequest:
451 break;
452 default:
453 // Invalid Common marker
454 return;
455 }
456
457 if (mTransport.beginTransmission(inType))
458 {
459 mTransport.write((byte)inType);
460 switch (inType)
461 {
463 mTransport.write(inData1);
464 break;
465 case SongPosition:
466 mTransport.write(inData1 & 0x7f);
467 mTransport.write((inData1 >> 7) & 0x7f);
468 break;
469 case SongSelect:
470 mTransport.write(inData1 & 0x7f);
471 break;
472 case TuneRequest:
473 break;
474 default:
475 break; // LCOV_EXCL_LINE - Coverage blind spot
476 }
477 mTransport.endTransmission();
479 }
480
483}
Transport & mTransport
Definition MIDI.h:267
StatusByte mRunningStatus_TX
Definition MIDI.h:275
The main class for MIDI handling. It is templated over the type of serial port to provide abstraction...
Definition MIDI.h:55
void UpdateLastSentTime()
Definition MIDI.hpp:1385

References InvalidType, mRunningStatus_TX, mTransport, SongPosition, SongSelect, TimeCodeQuarterFrame, TuneRequest, and UpdateLastSentTime().

Referenced by sendSongPosition(), sendSongSelect(), sendTimeCodeQuarterFrame(), and sendTuneRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: