Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
BluetoothMIDI_Interface.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Settings/NamespaceSettings.hpp>
4
5#ifdef DOXYGEN
9struct BLEMIDIBackend {};
13#define CS_BLE_MIDI_SUPPORTED 1
17#define CS_USE_NIMBLE
18
19#elif defined(ESP32)
20#include <sdkconfig.h>
21#if CONFIG_BT_BLE_ENABLED
22// ESP32 with BLE support
23#ifdef CS_USE_NIMBLE
24// NimBLE backend
29#define CS_BLE_MIDI_SUPPORTED 1
30#else
31// Bluedroid backend (default)
36#define CS_BLE_MIDI_SUPPORTED 1
37#endif
38#endif
39
40#elif defined(ARDUINO_RASPBERRY_PI_PICO_W)
41// Pico W
42#if ENABLE_BLE
47#define CS_BLE_MIDI_SUPPORTED 1
48#endif
49
50#elif (defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARDUINO_NANO33BLE)) || \
51 (defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_RP2040)) || \
52 (defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_GIGA)) || \
53 defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_SAMD_NANO_33_IOT) || \
54 defined(ARDUINO_SAMD_MKRWIFI1010)
55// Arduino Nano 33 BLE, RP2040, Arduino GIGA, Arduino UNO R4 WiFi,
56// Arduino Nano 33 IoT, Arduino MKR 1010 WiFi
61#define CS_BLE_MIDI_SUPPORTED 1
62#endif
63
64#ifdef CS_BLE_MIDI_SUPPORTED
77#endif
78
79#ifndef CS_BLE_MIDI_SUPPORTED
80#define CS_BLE_MIDI_NOT_SUPPORTED
81#endif
ESP32BLEBackend< ble_backend::ESP32BluedroidBLE > ESP32BluedroidBackend
ESP32 Bluedroid backend intended to be plugged into GenericBLEMIDI_Interface.
ESP32BLEBackend< ble_backend::ESP32NimBLE > ESP32NimBLEBackend
ESP32 NimBLE backend intended to be plugged into GenericBLEMIDI_Interface.
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
ArduinoBLE backend intended to be plugged into GenericBLEMIDI_Interface.
Raspberry Pi Pico BTstack background backend intended to be plugged into GenericBLEMIDI_Interface.
Bluetooth Low Energy MIDI Interface.
An array wrapper for easy copying, comparing, and iterating.
Definition Array.hpp:32
Default backend for the BluetoothMIDI_Interface class.
A class for MIDI interfaces sending MIDI messages over a Bluetooth Low Energy (BLE) connection.