ifdef PROGMEM references to support ESP8266/Galileo etc

This commit is contained in:
Nick O'Leary 2015-08-26 22:15:55 +01:00
parent 3852808aac
commit acc9fe500e
2 changed files with 9 additions and 6 deletions

View File

@ -275,7 +275,7 @@ boolean PubSubClient::publish(char* topic, uint8_t* payload, unsigned int plengt
}
return false;
}
#ifdef PROGMEM
boolean PubSubClient::publish_P(char* topic, uint8_t* PROGMEM payload, unsigned int plength, boolean retained) {
uint8_t llen = 0;
uint8_t digit;
@ -320,6 +320,7 @@ boolean PubSubClient::publish_P(char* topic, uint8_t* PROGMEM payload, unsigned
return rc == tlen + 4 + plength;
}
#endif
boolean PubSubClient::write(uint8_t header, uint8_t* buf, uint16_t length) {
uint8_t lenBuf[4];

View File

@ -76,7 +76,9 @@ public:
boolean publish(char *, char *);
boolean publish(char *, uint8_t *, unsigned int);
boolean publish(char *, uint8_t *, unsigned int, boolean);
#ifdef PROGMEM
boolean publish_P(char *, uint8_t PROGMEM *, unsigned int, boolean);
#endif
boolean subscribe(char *);
boolean subscribe(char *, uint8_t qos);
boolean unsubscribe(char *);