Skip to content

Commit c226aff

Browse files
committed
Adding conditional compilation for using the MKRGSM for OTA storage since the MKRGSM library is only available when the AIoTC stack is compiled for MKR GSM 1400
1 parent f214215 commit c226aff

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/ArduinoIoTCloud_Config.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
#define OTA_STORAGE_MKRMEM (0)
2727
#endif
2828

29+
#ifndef OTA_STORAGE_MKRGSM
30+
#define OTA_STORAGE_MKRGSM (0)
31+
#endif
32+
2933
/******************************************************************************
3034
* AUTOMATIC CONFIGURED DEFINES
3135
******************************************************************************/
@@ -34,7 +38,7 @@
3438
#define OTA_STORAGE_MKRMEM (0)
3539
#endif
3640

37-
#if OTA_STORAGE_MKRMEM
41+
#if OTA_STORAGE_MKRMEM || OTA_STORAGE_MKRGSM
3842
#define OTA_ENABLED (1)
3943
#else
4044
#define OTA_ENABLED (0)

src/utility/ota/OTAStorage_MKRGSM.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
INCLUDE
2020
******************************************************************************/
2121

22+
#include <ArduinoIoTCloud_Config.h>
23+
#if OTA_STORAGE_MKRGSM
24+
2225
#include "OTAStorage_MKRGSM.h"
2326

2427
/******************************************************************************
@@ -83,3 +86,5 @@ void OTAStorage_MKRGSM::deinit()
8386
{
8487
/* Nothing to do */
8588
}
89+
90+
#endif /* OTA_STORAGE_MKRGSM */

src/utility/ota/OTAStorage_MKRGSM.h

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* INCLUDE
2323
******************************************************************************/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#if OTA_STORAGE_MKRGSM
27+
2528
#include "OTAStorage.h"
2629

2730
#include <GSMFileUtils.h>
@@ -52,4 +55,6 @@ class OTAStorage_MKRGSM : public OTAStorage
5255

5356
};
5457

58+
#endif /* OTA_STORAGE_MKRGSM */
59+
5560
#endif /* ARDUINO_OTA_STORAGE_MKRGSM_H_ */

0 commit comments

Comments
 (0)