Skip to content

Commit cdc1938

Browse files
committed
chore: Enable IDE compilation
1 parent c3db60b commit cdc1938

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/Arduino_ConnectionHandler.h

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
INCLUDES
2323
******************************************************************************/
2424

25+
#if defined __has_include
26+
#if __has_include (<Notecard.h>)
27+
#define USE_NOTECARD
28+
#endif
29+
#endif
30+
2531
#if !defined(__AVR__)
2632
# include <Arduino_DebugUtils.h>
2733
#endif

src/Arduino_NotecardConnectionHandler.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@
1515
a commercial license, send an email to [email protected].
1616
*/
1717

18+
#if defined __has_include
19+
#if __has_include (<Notecard.h>)
20+
#define USE_NOTECARD
21+
#endif
22+
#endif
23+
1824
/******************************************************************************
1925
INCLUDE
2026
******************************************************************************/
2127

22-
#include "Arduino_NotecardConnectionHandler.h"
23-
2428
#if defined(USE_NOTECARD) /* Only compile if the Notecard is present */
2529

30+
#include "Arduino_NotecardConnectionHandler.h"
31+
2632
#include <Arduino.h>
2733
#include <Arduino_DebugUtils.h>
2834
#include <Wire.h>

0 commit comments

Comments
 (0)