used event loop only if defined in supported features (enabled by macros) for backward compatibily with older IDFs
This commit is contained in:
1 parent
5afe3e6b24
commit
edd67e1c8c
3 files changed
+28
-2
No files matched your search
@@ -19,6 +19,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef ESP_EVENT_DECLARE_BASE
|
||||
// Define event loop types if macros not available
|
||||
typedef void * esp_event_loop_handle_t;
|
||||
typedef void * esp_event_handler_t;
|
||||
#endif
|
||||
|
||||
typedef struct esp_mqtt_client *esp_mqtt_client_handle_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,10 +27,15 @@
|
||||
*/
|
||||
|
||||
#ifdef ESP_IDF_VERSION
|
||||
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 3, 0)
|
||||
// Features supported from 3.3
|
||||
#define MQTT_SUPPORTED_FEATURE_EVENT_LOOP
|
||||
#endif
|
||||
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
|
||||
|
||||
// Features supported in 4.0
|
||||
#define MQTT_SUPPORTED_FEATURE_WS_SUBPROTOCOL
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user