#include <MIDI_Interfaces/USBMIDI/mbed/PluggableUSBMIDI.hpp>
Definition at line 18 of file PluggableUSBMIDI.hpp.
Public Types | |
using | setup_packet_t = USBDevice::setup_packet_t |
using | DeviceState = USBDevice::DeviceState |
using | microseconds = std::chrono::microseconds |
Public Member Functions | |
PluggableUSBMIDI () | |
~PluggableUSBMIDI () | |
bool | connected () const |
Check if this class is connected and ready. | |
bool | connectedForWrite () const |
uint32_t | read () |
Try reading a 4-byte MIDI USB message. | |
void | setTimeout (microseconds timeout) |
Set the timeout, the number of microseconds to buffer the outgoing MIDI messages. | |
void | setErrorTimeout (microseconds timeout) |
Protected Types | |
using | MessageType |
using | MessageType |
Protected Attributes | |
interrupt_atomic< bool > | usb_connected {false} |
microseconds | timeout_duration {1'000} |
microseconds | error_timeout_duration {40'000} |
mbed::Timeout | timeout |
usb_ep_t | bulk_in_ep |
usb_ep_t | bulk_out_ep |
uint8_t | config_descriptor [0x65] |
Private Types | |
using | rbuffer_t |
using | wbuffer_t |
Private Member Functions | |
void | start_timeout () |
void | cancel_timeout () |
void | tx_start (const void *data, uint32_t size) |
void | tx_start_timeout (const void *data, uint32_t size) |
void | tx_start_isr (const void *data, uint32_t size) |
void | rx_start (void *data, uint32_t size) |
void | rx_start_isr (void *data, uint32_t size) |
uint32_t | index_of (wbuffer_t *p) const |
wbuffer_t * | other_buf (wbuffer_t *p) |
uint32_t | write_impl (const MessageType *msgs, uint32_t num_msgs) |
Static Private Member Functions | |
static constexpr uint32_t | get_packet_size () |
Private Attributes | |
struct BulkRX::Reading | reading |
struct BulkTX::Writing | writing |
bool | disconnected |
Static Private Attributes | |
static constexpr uint16_t | MaxPacketSize |
static constexpr uint16_t | SizeReserved |
static constexpr uint16_t | NumRxPackets |
static constexpr std::memory_order | mo_seq |
static constexpr std::memory_order | mo_rel |
static constexpr std::memory_order | mo_acq |
static constexpr std::memory_order | mo_rlx |
static constexpr std::memory_order | mo_acq_rel |
using setup_packet_t = USBDevice::setup_packet_t |
Definition at line 26 of file PluggableUSBMIDI.hpp.
using DeviceState = USBDevice::DeviceState |
Definition at line 27 of file PluggableUSBMIDI.hpp.
using microseconds = std::chrono::microseconds |
Definition at line 28 of file PluggableUSBMIDI.hpp.
|
inherited |
Definition at line 14 of file BulkRX.hpp.
Definition at line 56 of file BulkRX.hpp.
|
inherited |
Definition at line 14 of file BulkTX.hpp.
Definition at line 101 of file BulkTX.hpp.
PluggableUSBMIDI | ( | ) |
~PluggableUSBMIDI | ( | ) |
Definition at line 34 of file PluggableUSBMIDI.hpp.
|
inlineprivate |
Definition at line 36 of file PluggableUSBMIDI.hpp.
|
inlineprivate |
Definition at line 40 of file PluggableUSBMIDI.hpp.
Definition at line 41 of file PluggableUSBMIDI.hpp.
Definition at line 45 of file PluggableUSBMIDI.hpp.
Definition at line 48 of file PluggableUSBMIDI.hpp.
Definition at line 49 of file PluggableUSBMIDI.hpp.
Definition at line 52 of file PluggableUSBMIDI.hpp.
bool connected | ( | ) | const |
Check if this class is connected and ready.
|
inline |
Definition at line 57 of file PluggableUSBMIDI.hpp.
|
inline |
Try reading a 4-byte MIDI USB message.
Definition at line 62 of file PluggableUSBMIDI.hpp.
|
inline |
Set the timeout, the number of microseconds to buffer the outgoing MIDI messages.
A shorter timeout usually results in lower latency, but also causes more overhead, because more packets might be required.
Definition at line 78 of file PluggableUSBMIDI.hpp.
|
inline |
Definition at line 80 of file PluggableUSBMIDI.hpp.
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
inlineoverrideprotected |
Definition at line 97 of file PluggableUSBMIDI.hpp.
|
inlineprotected |
Definition at line 110 of file PluggableUSBMIDI.hpp.
|
inlineprotected |
Definition at line 113 of file PluggableUSBMIDI.hpp.
|
inlineprotected |
Definition at line 118 of file PluggableUSBMIDI.hpp.
|
inherited |
Try reading a single message.
|
protectedinherited |
|
inherited |
Send a MIDI USB message.
May block.
msg | The 4-byte MIDI USB message to send. |
|
inherited |
Send multiple MIDI USB messages.
May block.
msgs | An array of 4-byte MIDI USB messages to send. |
num_msgs | The number of messages in the array. |
|
inlineinherited |
Send multiple MIDI USB messages. May block.
Definition at line 32 of file BulkTX.hpp.
|
inherited |
Send multiple MIDI USB messages without blocking.
msgs | An array of 4-byte MIDI USB messages to send. |
num_msgs | The number of messages in the array. |
|
inherited |
Try sending the buffered data now.
Start transmitting the latest packet if possible, even if it isn't full yet. If the latest packet is empty, this function has no effect.
|
inherited |
Check if all transfers have completed.
|
inlineinherited |
Get the number messages that failed to send.
Definition at line 54 of file BulkTX.hpp.
|
inlineinherited |
Get and clear the number messages that failed to send.
Definition at line 56 of file BulkTX.hpp.
|
protectedinherited |
|
protectedinherited |
Definition at line 104 of file BulkTX.hpp.
Definition at line 105 of file BulkTX.hpp.
|
privateinherited |
|
protectedinherited |
|
protected |
Definition at line 100 of file PluggableUSBMIDI.hpp.
|
protected |
Definition at line 101 of file PluggableUSBMIDI.hpp.
|
protected |
Definition at line 102 of file PluggableUSBMIDI.hpp.
|
protected |
Definition at line 103 of file PluggableUSBMIDI.hpp.
|
protected |
Definition at line 105 of file PluggableUSBMIDI.hpp.
|
protected |
Definition at line 106 of file PluggableUSBMIDI.hpp.
|
protected |
Definition at line 107 of file PluggableUSBMIDI.hpp.
Definition at line 24 of file BulkRX.hpp.
Definition at line 25 of file BulkRX.hpp.
Definition at line 26 of file BulkRX.hpp.
|
staticconstexprprivateinherited |
Definition at line 37 of file BulkRX.hpp.
|
staticconstexprprivateinherited |
Definition at line 38 of file BulkRX.hpp.
|
staticconstexprprivateinherited |
Definition at line 39 of file BulkRX.hpp.
|
staticconstexprprivateinherited |
Definition at line 40 of file BulkRX.hpp.
|
staticconstexprprivateinherited |
Definition at line 41 of file BulkRX.hpp.
|
privateinherited |
|
privateinherited |
|
privateinherited |
Definition at line 102 of file BulkTX.hpp.