libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
usb_midi.h
Go to the documentation of this file.
1#pragma once
2#ifndef __DSY_MIDIUSBTRANSPORT_H__
3#define __DSY_MIDIUSBTRANSPORT_H__
4
5#include "hid/usb.h"
6#include "sys/system.h"
7#include "util/ringbuffer.h"
8
9namespace daisy
10{
15{
16 public:
18 size_t size,
19 void* context);
20
46
48
49 void StartRx(MidiRxParseCallback callback, void* context);
50 bool RxActive();
51 void FlushRx();
52 void Tx(uint8_t* buffer, size_t size);
53
54 class Impl;
55
60
61 private:
62 Impl* pimpl_;
63};
64
65} // namespace daisy
66
67#endif // __DSY_MIDIUSBTRANSPORT_H__
Definition leddriver.h:33
USB Transport for MIDI.
Definition usb_midi.h:15
void Init(Config config)
~MidiUsbTransport()
Definition usb_midi.h:57
MidiUsbTransport()
Definition usb_midi.h:56
void Tx(uint8_t *buffer, size_t size)
MidiUsbTransport(const MidiUsbTransport &other)=default
void(* MidiRxParseCallback)(uint8_t *data, size_t size, void *context)
Definition usb_midi.h:17
void StartRx(MidiRxParseCallback callback, void *context)
MidiUsbTransport & operator=(const MidiUsbTransport &other)=default
Hardware defines and helpers for daisy field platform.
Definition index.h:2
Definition usb_midi.h:22
Periph periph
Definition usb_midi.h:30
uint8_t tx_retry_count
Definition usb_midi.h:42
Periph
Definition usb_midi.h:24
@ EXTERNAL
Definition usb_midi.h:26
@ HOST
Definition usb_midi.h:27
@ INTERNAL
Definition usb_midi.h:25
Config()
Definition usb_midi.h:44