Unverified Commit 3dcb4bbf authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

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.
parent 59981aed
// 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.");
/**
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
\ No newline at end of file
#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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment