Control Surface
main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
src
MIDI_Interfaces
PicoUSBInit.hpp
Go to the documentation of this file.
1
#pragma once
2
13
#include <
AH/Arduino-Wrapper.h
>
14
15
#if defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) && \
16
defined(USE_TINYUSB)
17
#include <Adafruit_TinyUSB.h>
18
namespace
{
19
bool
ensure_usb_init(Print &stream) {
20
if
(&stream ==
static_cast<
Print *
>
(&Serial))
21
return
TinyUSBDevice.mounted();
22
return
true
;
23
}
24
}
// namespace
25
#else
26
namespace
{
27
constexpr
bool
ensure_usb_init(Print &) {
return
true
; }
28
}
// namespace
29
#endif
Arduino-Wrapper.h
Generated by
1.10.0