File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 14
14
# Ian Craggs - initial version
15
15
#*******************************************************************************/
16
16
17
+ if (ESP_PLATFORM )
18
+
19
+ idf_component_register (
20
+ INCLUDE_DIRS
21
+ "MQTTClient-C/src/idf"
22
+ "MQTTClient-C/src"
23
+ "MQTTPacket/src"
24
+ SRCS
25
+ "MQTTClient-C/src/FreeRTOS/MQTTFreeRTOSPrimitives.c"
26
+ "MQTTClient-C/src/linux/MQTTLinuxNetwork.c"
27
+ "MQTTClient-C/src/MQTTClient.c"
28
+ "MQTTPacket/src/MQTTConnectClient.c"
29
+ "MQTTPacket/src/MQTTConnectServer.c"
30
+ "MQTTPacket/src/MQTTDeserializePublish.c"
31
+ "MQTTPacket/src/MQTTSerializePublish.c"
32
+ "MQTTPacket/src/MQTTFormat.c"
33
+ "MQTTPacket/src/MQTTPacket.c"
34
+ "MQTTPacket/src/MQTTSubscribeClient.c"
35
+ "MQTTPacket/src/MQTTSubscribeServer.c"
36
+ "MQTTPacket/src/MQTTUnsubscribeClient.c"
37
+ "MQTTPacket/src/MQTTUnsubscribeServer.c"
38
+ REQUIRES
39
+ freertos
40
+ )
41
+
42
+ else ()
43
+
17
44
cmake_minimum_required (VERSION 2.8 )
18
45
project (embedded-mqtt )
19
46
set (CMAKE_BUILD_TYPE Debug )
@@ -44,3 +71,5 @@ enable_testing()
44
71
ADD_SUBDIRECTORY (MQTTPacket )
45
72
ADD_SUBDIRECTORY (MQTTClient )
46
73
ADD_SUBDIRECTORY (MQTTClient-C )
74
+
75
+ endif ()
Original file line number Diff line number Diff line change 43
43
#define xstr (s ) str(s)
44
44
#define str (s ) #s
45
45
#include xstr (MQTTCLIENT_PLATFORM_HEADER )
46
+ #elif defined(ESP_PLATFORM )
47
+ #include "MQTTidf.h"
46
48
#endif
47
49
48
50
#define MAX_PACKET_ID 65535 /* according to the MQTT specification - do not change! */
Original file line number Diff line number Diff line change
1
+ /*******************************************************************************
2
+ * Copyright (c) 2014, 2015 IBM Corp.
3
+ *
4
+ * All rights reserved. This program and the accompanying materials
5
+ * are made available under the terms of the Eclipse Public License v1.0
6
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
7
+ *
8
+ * The Eclipse Public License is available at
9
+ * http://www.eclipse.org/legal/epl-v10.html
10
+ * and the Eclipse Distribution License is available at
11
+ * http://www.eclipse.org/org/documents/edl-v10.php.
12
+ *
13
+ * Contributors:
14
+ * Denis Benato - support for esp-idf: the esp32 platform
15
+ *******************************************************************************/
16
+
17
+ #if !defined(MQTTidf_H )
18
+ #define MQTTidf_H
19
+
20
+ #include "../FreeRTOS/MQTTFreeRTOSPrimitives.h"
21
+ #include "../linux/MQTTLinuxNetwork.h"
22
+
23
+ #endif
You can’t perform that action at this time.
0 commit comments