Control Surface
main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
src
MIDI_Interfaces
BLEMIDI
ESP32-NimBLE
util.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
ble.h
"
4
5
#define CS_CHECK_ESP(x) \
6
do { \
7
if (auto ret = x; ret != ESP_OK) { \
8
ESP_LOGE("CS-BLEMIDI", "Failed to call '%s': %s (%d)", #x, \
9
esp_err_to_name(ret), static_cast<int>(ret)); \
10
return false; \
11
} \
12
} while (0)
13
#define CS_CHECK_ZERO(x) \
14
do { \
15
if (auto ret = x; ret != 0) { \
16
ESP_LOGE("CS-BLEMIDI", "Failed to call '%s': (%d)", #x, \
17
static_cast<int>(ret)); \
18
return false; \
19
} \
20
} while (0)
21
#define CS_CHECK_ZERO_V(x) \
22
do { \
23
if (auto ret = x; ret != 0) { \
24
ESP_LOGE("CS-BLEMIDI", "Failed to call '%s': (%d)", #x, \
25
static_cast<int>(ret)); \
26
return; \
27
} \
28
} while (0)
ble.h
Generated by
1.10.0