File tree Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 1
- #include < Matter .h>
2
- #if DEVICE_HAS_MATTER
1
+ #include < sdkconfig .h>
2
+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
3
3
4
- #include < Arduino .h>
4
+ #include < Matter .h>
5
5
#include < app/server/Server.h>
6
6
#include " MatterEndPoint.h"
7
7
@@ -156,4 +156,4 @@ void ArduinoMatter::decommission() {
156
156
// Global Matter Object
157
157
ArduinoMatter Matter;
158
158
159
- #endif /* DEVICE_HAS_MATTER */
159
+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include < sdkconfig.h>
3
+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
4
+
2
5
#include < Arduino.h>
3
6
#include < esp_matter.h>
4
- #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION || CHIP_DEVICE_CONFIG_ENABLE_THREAD
5
- #define DEVICE_HAS_MATTER 1
6
- #else
7
- #define DEVICE_HAS_MATTER 0
8
- #endif
9
-
10
- #if DEVICE_HAS_MATTER
11
7
12
8
using namespace esp_matter ;
13
9
@@ -36,4 +32,4 @@ class ArduinoMatter {
36
32
37
33
extern ArduinoMatter Matter;
38
34
39
- #endif /* DEVICE_HAS_MATTER */
35
+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include < sdkconfig.h>
3
+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
2
4
3
5
#include < Matter.h>
4
- #if DEVICE_HAS_MATTER
5
-
6
6
#include < functional>
7
7
8
8
// Matter Endpoint Base Class. Controls the endpoint ID and allows the child class to overwrite attribute change call
@@ -20,4 +20,4 @@ class MatterEndPoint {
20
20
protected:
21
21
uint16_t endpoint_id = 0 ;
22
22
};
23
- #endif /* DEVICE_HAS_MATTER */
23
+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 1
- #include < Matter .h>
2
- #if DEVICE_HAS_MATTER
1
+ #include < sdkconfig .h>
2
+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
3
3
4
- #include < Arduino .h>
4
+ #include < Matter .h>
5
5
#include < app/server/Server.h>
6
6
#include < MatterOnOffLight.h>
7
7
@@ -105,4 +105,4 @@ MatterOnOffLight::operator bool() {
105
105
void MatterOnOffLight::operator =(bool newState) {
106
106
setOnOff (newState);
107
107
}
108
- #endif /* DEVICE_HAS_MATTER */
108
+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include < sdkconfig.h>
3
+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
2
4
3
5
#include < Matter.h>
4
- #if DEVICE_HAS_MATTER
5
-
6
6
#include < MatterEndPoint.h>
7
7
8
8
class MatterOnOffLight : public MatterEndPoint {
@@ -31,4 +31,4 @@ class MatterOnOffLight : public MatterEndPoint {
31
31
bool state = false ; // default initial state is off, but it can be changed by begin(bool)
32
32
EndPointCB _onChangeCB = NULL ;
33
33
};
34
- #endif /* DEVICE_HAS_MATTER */
34
+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
You can’t perform that action at this time.
0 commit comments