Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Sep 8, 2020
1 parent b5bd95f commit e224b34
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions doxygen/custom_stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ div.navpath > ul {
.directory td.desc {
padding: 0.4em 0.5em 0.4em 0.5em;
}
.markdownTable tr:last-child td {
border-bottom: 1px solid #334262;
}
h2.memtitle, .memproto, .fieldtable th {
background-color: #dde;
background-image: none;
Expand Down
2 changes: 1 addition & 1 deletion src/MIDI_Interfaces/BluetoothMIDI_Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BluetoothMIDI_Interface : public Parsing_MIDI_Interface,

uint8_t connected = 0;

bool hasSpaceFor(size_t bytes) { return index + bytes < BUFFER_LENGTH; }
bool hasSpaceFor(size_t bytes) { return bytes <= BUFFER_LENGTH - index; }

public:
BluetoothMIDI_Interface() : Parsing_MIDI_Interface(parser) {}
Expand Down
4 changes: 2 additions & 2 deletions src/MIDI_Interfaces/MIDI_Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ class Parsing_MIDI_Interface : public MIDI_Interface {
private:
/**
* @brief Try reading and parsing a single incoming MIDI message.
* @return Returns the type of the read message, or @ref NO_MESSAGE if no
* MIDI message was available.
* @return Returns the type of the read message, or
* `MIDIReadEvent::NO_MESSAGE` if no MIDI message was available.
*/
virtual MIDIReadEvent read() = 0;

Expand Down
9 changes: 5 additions & 4 deletions src/MIDI_Parsers/MIDI_Parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

BEGIN_CS_NAMESPACE

/// Result of the MIDI interface read methods.
enum class MIDIReadEvent : uint8_t {
NO_MESSAGE = 0,
CHANNEL_MESSAGE = 1,
SYSEX_MESSAGE = 2,
REALTIME_MESSAGE = 3,
NO_MESSAGE = 0, ///< No new incoming methods.
CHANNEL_MESSAGE = 1, ///< A MIDI channel message was received.
SYSEX_MESSAGE = 2, ///< A MIDI system exclusive message was received.
REALTIME_MESSAGE = 3, ///< A MIDI real-time message was received.
};

class MIDI_Parser {
Expand Down
8 changes: 4 additions & 4 deletions src/MIDI_Senders/RelativeCCSender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum relativeCCmode {
*
* | Encoded | Value |
* |---------:|------:|
* | 000'0000 | 0 |
* | 000'0000 | 0 |
* | 000'0001 | +1 |
* | 011'1111 | +63 |
* | 100'0000 | -64 |
Expand All @@ -30,7 +30,7 @@ enum relativeCCmode {
* | 000'0000 | -64 |
* | 000'0001 | -63 |
* | 011'1111 | -1 |
* | 100'0000 | 0 |
* | 100'0000 | 0 |
* | 100'0001 | +1 |
* | 111'1111 | +63 |
*/
Expand All @@ -43,8 +43,8 @@ enum relativeCCmode {
* | Encoded | Value |
* |---------:|------:|
* | 000'0000 | +0 |
* | 000'0001 | 1 |
* | 011'1111 | 63 |
* | 000'0001 | +1 |
* | 011'1111 | +63 |
* | 100'0000 | -0 |
* | 100'0001 | -1 |
* | 111'1111 | -63 |
Expand Down

0 comments on commit e224b34

Please sign in to comment.