Arduino MIDI Library  Version 5.0.1
SerialMIDI< SerialPort, _Settings > Class Template Reference

#include <serialMIDI.h>

Public Member Functions

 SerialMIDI (SerialPort &inSerial)
 
void begin ()
 
bool beginTransmission (MidiType)
 
void write (byte value)
 
void endTransmission ()
 
byte read ()
 
unsigned available ()
 

Static Public Attributes

static const bool thruActivated = true
 

Detailed Description

template<class SerialPort, class _Settings = DefaultSerialSettings>
class SerialMIDI< SerialPort, _Settings >

Definition at line 43 of file serialMIDI.h.

Constructor & Destructor Documentation

◆ SerialMIDI()

template<class SerialPort , class _Settings = DefaultSerialSettings>
SerialMIDI< SerialPort, _Settings >::SerialMIDI ( SerialPort &  inSerial)
inline

Definition at line 48 of file serialMIDI.h.

49  : mSerial(inSerial)
50  {
51  };

Member Function Documentation

◆ available()

template<class SerialPort , class _Settings = DefaultSerialSettings>
unsigned SerialMIDI< SerialPort, _Settings >::available ( )
inline

Definition at line 85 of file serialMIDI.h.

86  {
87  return mSerial.available();
88  };

◆ begin()

template<class SerialPort , class _Settings = DefaultSerialSettings>
void SerialMIDI< SerialPort, _Settings >::begin ( )
inline

Definition at line 56 of file serialMIDI.h.

57  {
58  // Initialise the Serial port
59  #if defined(AVR_CAKE)
60  mSerial. template open<Settings::BaudRate>();
61  #else
62  mSerial.begin(Settings::BaudRate);
63  #endif
64  }

◆ beginTransmission()

template<class SerialPort , class _Settings = DefaultSerialSettings>
bool SerialMIDI< SerialPort, _Settings >::beginTransmission ( MidiType  )
inline

Definition at line 66 of file serialMIDI.h.

67  {
68  return true;
69  };

◆ endTransmission()

template<class SerialPort , class _Settings = DefaultSerialSettings>
void SerialMIDI< SerialPort, _Settings >::endTransmission ( )
inline

Definition at line 76 of file serialMIDI.h.

77  {
78  };

◆ read()

template<class SerialPort , class _Settings = DefaultSerialSettings>
byte SerialMIDI< SerialPort, _Settings >::read ( )
inline

Definition at line 80 of file serialMIDI.h.

81  {
82  return mSerial.read();
83  };

◆ write()

template<class SerialPort , class _Settings = DefaultSerialSettings>
void SerialMIDI< SerialPort, _Settings >::write ( byte  value)
inline

Definition at line 71 of file serialMIDI.h.

72  {
73  mSerial.write(value);
74  };

Member Data Documentation

◆ thruActivated

template<class SerialPort , class _Settings = DefaultSerialSettings>
const bool SerialMIDI< SerialPort, _Settings >::thruActivated = true
static

Definition at line 54 of file serialMIDI.h.


The documentation for this class was generated from the following file: