Skip to content

Commit b868180

Browse files
author
Javier Cardona
committed
Support esp8266 architecture
1 parent 999226a commit b868180

File tree

8 files changed

+929
-5
lines changed

8 files changed

+929
-5
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ maintainer=Parse, LLC.
55
sentence=A library that provides access to Parse
66
paragraph=Provides convenience methods to access the REST API on Parse.com from Arduino.
77
url=https://github.com/ParsePlatform/parse-embedded-sdks
8-
architectures=avr,samd
8+
architectures=avr,samd,esp8266

src/internal/ConnectionClient.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ typedef WiFiClient ConnectionClient;
1414
#include <Bridge.h>
1515
typedef Process ConnectionClient;
1616

17+
#elif ARDUINO_ARCH_ESP8266
18+
19+
#include <WiFiClientSecure.h>
20+
typedef WiFiClientSecure ConnectionClient;
21+
1722
#endif
1823

1924
#endif //__CONNECTION_CLIENT_H__

src/internal/ParseClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ParseClient {
5050

5151
void read(ConnectionClient* client, char* buf, int len);
5252

53-
#if defined (ARDUINO_SAMD_ZERO)
53+
#if defined (ARDUINO_SAMD_ZERO) || defined(ARDUINO_ARCH_ESP8266)
5454
char lastPushTime[41]; // PUSH_TIME_MAX_LEN
5555
bool dataIsDirty;
5656
char pushBuff[5];

src/internal/ParsePush.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ParsePush : public ParseResponse {
3737
protected:
3838
ParsePush(ConnectionClient* pushClient);
3939

40-
#if defined (ARDUINO_SAMD_ZERO)
40+
#if defined (ARDUINO_SAMD_ZERO) || defined(ARDUINO_ARCH_ESP8266)
4141
char lookahead[5];
4242
void setLookahead(const char *read_data);
4343
void read();

src/internal/ParseResponse.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ParseResponse {
4242
bool isUserBuffer;
4343
int p;
4444
int resultCount;
45-
#if defined (ARDUINO_SAMD_ZERO)
45+
#if defined (ARDUINO_SAMD_ZERO) || defined(ARDUINO_ARCH_ESP8266)
4646
long responseLength;
4747
bool isChunked;
4848
bool firstObject;
@@ -56,7 +56,7 @@ class ParseResponse {
5656
virtual void read();
5757
void readWithTimeout(int maxSec);
5858

59-
#if defined (ARDUINO_SAMD_ZERO)
59+
#if defined (ARDUINO_SAMD_ZERO) || defined(ARDUINO_ARCH_ESP8266)
6060
// Zero functions only - do nothing on Yun
6161
void readLine(char *buff, int sz);
6262
bool readJson(char *buff, int sz);

0 commit comments

Comments
 (0)