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 is contained in:
parent
59981aed7f
commit
3dcb4bbf8b
5 changed files with 14 additions and 1 deletions
7
cores/rp2040/_needsbt.h
Normal file
7
cores/rp2040/_needsbt.h
Normal file
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue