|
12 | 12 | #ifndef ADAFRUITIO_WIFI_H
|
13 | 13 | #define ADAFRUITIO_WIFI_H
|
14 | 14 |
|
15 |
| -#if defined(ARDUINO_ARCH_SAMD) && defined(WINC1501_RESET_PIN) |
| 15 | +#if defined(ARDUINO_SAMD_MKR1000) |
16 | 16 |
|
17 |
| -#include "AdafruitIO_MKR1000.h" |
| 17 | + #include "AdafruitIO_MKR1000.h" |
| 18 | + typedef AdafruitIO_MKR1000 AdafruitIO_WiFi; |
18 | 19 |
|
19 |
| -class AdafruitIO_WiFi: public AdafruitIO_MKR1000 { |
| 20 | +#elif !defined(ARDUINO_SAMD_MKR1000) && defined(ARDUINO_ARCH_SAMD) |
20 | 21 |
|
21 |
| - public: |
22 |
| - AdafruitIO_WiFi(const char *user, const char *key, const char *ssid, const char *pass) : |
23 |
| - AdafruitIO_MKR1000(user, key, ssid, pass) {} |
24 |
| - AdafruitIO_WiFi(const __FlashStringHelper *user, const __FlashStringHelper *key, const __FlashStringHelper *ssid, const __FlashStringHelper *pass) : |
25 |
| - AdafruitIO_MKR1000(user, key, ssid, pass) {} |
26 |
| - |
27 |
| -}; |
28 |
| - |
29 |
| -#elif defined(ARDUINO_ARCH_SAMD) && !defined(WINC1501_RESET_PIN) |
30 |
| - |
31 |
| -#include "AdafruitIO_WINC1500.h" |
32 |
| - |
33 |
| -class AdafruitIO_WiFi: public AdafruitIO_WINC1500 { |
34 |
| - |
35 |
| - public: |
36 |
| - AdafruitIO_WiFi(const char *user, const char *key, const char *ssid, const char *pass) : |
37 |
| - AdafruitIO_WINC1500(user, key, ssid, pass) {} |
38 |
| - AdafruitIO_WiFi(const __FlashStringHelper *user, const __FlashStringHelper *key, const __FlashStringHelper *ssid, const __FlashStringHelper *pass) : |
39 |
| - AdafruitIO_WINC1500(user, key, ssid, pass) {} |
40 |
| - |
41 |
| -}; |
| 22 | + #include "AdafruitIO_WINC1500.h" |
| 23 | + typedef AdafruitIO_WINC1500 AdafruitIO_WiFi; |
42 | 24 |
|
43 | 25 | #elif defined(ESP8266)
|
44 | 26 |
|
45 |
| -#include "AdafruitIO_ESP8266.h" |
46 |
| - |
47 |
| -class AdafruitIO_WiFi: public AdafruitIO_ESP8266 { |
48 |
| - |
49 |
| - public: |
50 |
| - AdafruitIO_WiFi(const char *user, const char *key, const char *ssid, const char *pass) : |
51 |
| - AdafruitIO_ESP8266(user, key, ssid, pass) {} |
52 |
| - AdafruitIO_WiFi(const __FlashStringHelper *user, const __FlashStringHelper *key, const __FlashStringHelper *ssid, const __FlashStringHelper *pass) : |
53 |
| - AdafruitIO_ESP8266(user, key, ssid, pass) {} |
54 |
| - |
55 |
| -}; |
| 27 | + #include "AdafruitIO_ESP8266.h" |
| 28 | + typedef AdafruitIO_ESP8266 AdafruitIO_WiFi; |
56 | 29 |
|
57 | 30 | #elif defined(ARDUINO_STM32_FEATHER)
|
58 | 31 |
|
59 |
| -#include "AdafruitIO_WICED.h" |
60 |
| - |
61 |
| -class AdafruitIO_WiFi: public AdafruitIO_WICED { |
62 |
| - |
63 |
| - public: |
64 |
| - AdafruitIO_WiFi(const char *user, const char *key, const char *ssid, const char *pass) : |
65 |
| - AdafruitIO_WICED(user, key, ssid, pass) {} |
66 |
| - AdafruitIO_WiFi(const __FlashStringHelper *user, const __FlashStringHelper *key, const __FlashStringHelper *ssid, const __FlashStringHelper *pass) : |
67 |
| - AdafruitIO_WICED(user, key, ssid, pass) {} |
68 |
| - |
69 |
| -}; |
| 32 | + #include "AdafruitIO_WICED.h" |
| 33 | + typedef AdafruitIO_WICED AdafruitIO_WiFi; |
70 | 34 |
|
71 | 35 | #endif
|
72 | 36 |
|
|
0 commit comments