Clear compile errors if BT needed but not on (#1371)
Fixes #1370 Adds a simple helper assertion to tell the user how to enable BT if it's not enabled, instead of some odd compilation warnings about undefined functions.
This commit was merged in pull request #1371.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// Simple helper header to ensure pico libs support ?BT
|
||||
|
||||
#ifndef ENABLE_CLASSIC
|
||||
#define ENABLE_CLASSIC 0
|
||||
#endif
|
||||
|
||||
static_assert(ENABLE_CLASSIC, "This library needs Bluetooth enabled. Use the 'Tools->IP/Bluetooth Stack' menu in the IDE to enable it.");
|
||||
@@ -1,6 +1,9 @@
|
||||
/**
|
||||
Arduino Wrapper for BTstack
|
||||
*/
|
||||
|
||||
#include <_needsbt.h>
|
||||
|
||||
#ifndef __ARDUINO_BTSTACK_H
|
||||
#define __ARDUINO_BTSTACK_H
|
||||
|
||||
@@ -198,4 +201,4 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __ARDUINO_BTSTACK_H
|
||||
#endif // __ARDUINO_BTSTACK_H
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <_needsbt.h>
|
||||
#include <Arduino.h>
|
||||
#include <functional>
|
||||
#include <pico/cyw43_arch.h>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <_needsbt.h>
|
||||
#include <Arduino.h>
|
||||
#include <functional>
|
||||
#include <pico/cyw43_arch.h>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <_needsbt.h>
|
||||
#include <Arduino.h>
|
||||
#include <api/HardwareSerial.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
Reference in New Issue
Block a user