Skip to content

Commit a29d0c3

Browse files
authored
Merge pull request #336 from jaecktec/master
Enable ESP32 to use PubSubClient (make MQTT_CALLBACK_SIGNATURE functional)
2 parents b381728 + fa3c436 commit a29d0c3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ boards and shields, including:
3737
- TI CC3000 WiFi - [library](https://github.com/sparkfun/SFE_CC3000_Library)
3838
- Intel Galileo/Edison
3939
- ESP8266
40+
- ESP32
4041

4142
The library cannot currently be used with hardware based on the ENC28J60 chip –
4243
such as the Nanode or the Nuelectronics Ethernet Shield. For those, there is an

src/PubSubClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
// Maximum size of fixed header and variable length size header
7777
#define MQTT_MAX_HEADER_SIZE 5
7878

79-
#ifdef ESP8266
79+
#if defined(ESP8266) || defined(ESP32)
8080
#include <functional>
8181
#define MQTT_CALLBACK_SIGNATURE std::function<void(char*, uint8_t*, unsigned int)> callback
8282
#else

0 commit comments

Comments
 (0)