Skip to content

Commit 386c487

Browse files
committed
[Realtek] Remove include ember internals
1 parent 65be4d8 commit 386c487

35 files changed

+20
-1569
lines changed

examples/light-switch-app/realtek_bee/main/AppTask.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
3333
#include <app/server/Dnssd.h>
3434
#include <app/server/Server.h>
35-
#include <app/util/attribute-storage.h>
3635
#include <data-model-providers/codegen/Instance.h>
3736

3837
#include <credentials/DeviceAttestationCredsProvider.h>

examples/light-switch-app/realtek_bee/main/BindingHandler.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#include "AppConfig.h"
2121
#include <app/CommandSender.h>
2222
#include <app/clusters/bindings/BindingManager.h>
23+
#include <app/clusters/bindings/bindings.h>
2324
#include <app/server/Server.h>
2425
#include <controller/InvokeInteraction.h>
2526
#include <controller/ReadInteraction.h>
26-
#include <platform/CHIPDeviceLayer.h>
27-
#include <app/clusters/bindings/bindings.h>
2827
#include <lib/support/CodeUtils.h>
28+
#include <platform/CHIPDeviceLayer.h>
2929

3030
using namespace chip;
3131
using namespace chip::app;
@@ -555,11 +555,12 @@ void BindingHandler::RegisterSwitchCommands()
555555
static const shell_command_t sSwitchCommand = { &SwitchCommandHandler, "switch",
556556
"Light-switch commands. Usage: switch <subcommand>" };
557557

558-
sShellSwitchGroupsOnOffSubCommands.RegisterCommands(sSwitchGroupsOnOffSubCommands, ArraySize(sSwitchGroupsOnOffSubCommands));
559-
sShellSwitchOnOffSubCommands.RegisterCommands(sSwitchOnOffSubCommands, ArraySize(sSwitchOnOffSubCommands));
560-
sShellSwitchGroupsSubCommands.RegisterCommands(sSwitchGroupsSubCommands, ArraySize(sSwitchGroupsSubCommands));
561-
sShellSwitchBindingSubCommands.RegisterCommands(sSwitchBindingSubCommands, ArraySize(sSwitchBindingSubCommands));
562-
sShellSwitchSubCommands.RegisterCommands(sSwitchSubCommands, ArraySize(sSwitchSubCommands));
558+
sShellSwitchGroupsOnOffSubCommands.RegisterCommands(sSwitchGroupsOnOffSubCommands,
559+
MATTER_ARRAY_SIZE(sSwitchGroupsOnOffSubCommands));
560+
sShellSwitchOnOffSubCommands.RegisterCommands(sSwitchOnOffSubCommands, MATTER_ARRAY_SIZE(sSwitchOnOffSubCommands));
561+
sShellSwitchGroupsSubCommands.RegisterCommands(sSwitchGroupsSubCommands, MATTER_ARRAY_SIZE(sSwitchGroupsSubCommands));
562+
sShellSwitchBindingSubCommands.RegisterCommands(sSwitchBindingSubCommands, MATTER_ARRAY_SIZE(sSwitchBindingSubCommands));
563+
sShellSwitchSubCommands.RegisterCommands(sSwitchSubCommands, MATTER_ARRAY_SIZE(sSwitchSubCommands));
563564

564565
Engine::Root().RegisterCommands(&sSwitchCommand, 1);
565566
}

examples/light-switch-app/realtek_bee/main/CHIPDeviceManager.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,13 @@
2525
#include <stdlib.h>
2626

2727
#include "CHIPDeviceManager.h"
28-
#include <app/util/basic-types.h>
2928
#include <core/ErrorStr.h>
3029
#include <platform/Realtek_bee/FactoryDataProvider.h>
3130
#include <support/CHIPMem.h>
3231
#include <support/CodeUtils.h>
3332

3433
#include "Globals.h"
3534

36-
#include <app-common/zap-generated/attributes/Accessors.h>
37-
#include <app-common/zap-generated/ids/Attributes.h>
38-
#include <app-common/zap-generated/ids/Clusters.h>
39-
#include <app/util/af-types.h>
40-
#include <app/util/attribute-storage.h>
41-
#include <app/util/util.h>
42-
4335
using namespace ::chip;
4436

4537
namespace chip {

examples/light-switch-app/realtek_bee/main/LightSwitch.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <app-common/zap-generated/attributes/Accessors.h>
2323
#include <app/clusters/switch-server/switch-server.h>
2424
#include <app/server/Server.h>
25-
#include <app/util/binding-table.h>
2625
#include <controller/InvokeInteraction.h>
2726

2827
using namespace chip;

examples/light-switch-app/realtek_bee/main/include/CHIPDeviceManager.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@
2828

2929
#include <lib/core/CHIPCore.h>
3030
#include <lib/core/CHIPError.h>
31-
#include <platform/CHIPDeviceLayer.h>
32-
3331
#include <lib/support/DLLUtil.h>
34-
32+
#include <platform/CHIPDeviceLayer.h>
3533
#include <stdarg.h>
3634
#include <stdlib.h>
3735
#include <string.h>
3836

39-
#include <app/util/af-types.h>
40-
4137
namespace chip {
4238
namespace DeviceManager {
4339

examples/light-switch-app/realtek_bee/main/include/DeviceCallbacks.h

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#pragma once
2727

2828
#include "CHIPDeviceManager.h"
29-
#include <app/util/af-types.h>
30-
#include <app/util/basic-types.h>
3129
#include <platform/CHIPDeviceLayer.h>
3230

3331
class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks

examples/light-switch-app/realtek_bee/main/include/LightSwitch.h

-55
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,3 @@
1-
// /*
2-
// *
3-
// * Copyright (c) 2021 Project CHIP Authors
4-
// * All rights reserved.
5-
// *
6-
// * Licensed under the Apache License, Version 2.0 (the "License");
7-
// * you may not use this file except in compliance with the License.
8-
// * You may obtain a copy of the License at
9-
// *
10-
// * http://www.apache.org/licenses/LICENSE-2.0
11-
// *
12-
// * Unless required by applicable law or agreed to in writing, software
13-
// * distributed under the License is distributed on an "AS IS" BASIS,
14-
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
// * See the License for the specific language governing permissions and
16-
// * limitations under the License.
17-
// */
18-
// #pragma once
19-
20-
// #include <stdbool.h>
21-
// #include <stdint.h>
22-
23-
// #include <functional>
24-
25-
// #include "AppEvent.h"
26-
27-
// #include "FreeRTOS.h"
28-
// #include "timers.h" // provides FreeRTOS timer support
29-
30-
// #include <lib/core/CHIPError.h>
31-
32-
// #include <app-common/zap-generated/attributes/Accessors.h>
33-
// #include <app-common/zap-generated/cluster-objects.h>
34-
// #include <app/clusters/switch-server/switch-server.h>
35-
// #include <app/data-model/DecodableList.h>
36-
// #include <app/util/im-client-callbacks.h>
37-
38-
// class SwitchManager
39-
// {
40-
// public:
41-
// void Init(void);
42-
// static void GenericSwitchInitialPress(void);
43-
// static void GenericSwitchReleasePress(void);
44-
// static void ToggleHandler(AppEvent * aEvent);
45-
46-
// private:
47-
// friend SwitchManager & SwitchMgr(void);
48-
// static SwitchManager sSwitch;
49-
// };
50-
51-
// inline SwitchManager & SwitchMgr(void)
52-
// {
53-
// return SwitchManager::sSwitch;
54-
// }
55-
561
/*
572
*
583
* Copyright (c) 2022 Project CHIP Authors

examples/lighting-app/realtek_bee/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-
7474
- To build the demo application:
7575

7676
```bash
77-
$ ./scripts/build/build_examples.py --target realtek-rtl8777g-light build
77+
$ ./scripts/build/build_examples.py --target realtek-rtl8777g-lighting build
7878
```
7979

8080
You can find the target built file called

examples/lighting-app/realtek_bee/main/AppTask.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
3232
#include <app/server/Dnssd.h>
3333
#include <app/server/Server.h>
34-
#include <app/util/attribute-storage.h>
3534
#include <data-model-providers/codegen/Instance.h>
3635

3736
#include <credentials/DeviceAttestationCredsProvider.h>

examples/lighting-app/realtek_bee/main/CHIPDeviceManager.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
#include <app-common/zap-generated/attributes/Accessors.h>
2929
#include <app-common/zap-generated/ids/Attributes.h>
3030
#include <app-common/zap-generated/ids/Clusters.h>
31-
#include <app/util/af-types.h>
32-
#include <app/util/attribute-storage.h>
33-
#include <app/util/basic-types.h>
34-
#include <app/util/util.h>
3531
#include <core/ErrorStr.h>
3632
#include <platform/Realtek_bee/FactoryDataProvider.h>
3733
#include <support/CHIPMem.h>

examples/lighting-app/realtek_bee/main/include/CHIPDeviceManager.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@
2828

2929
#include <lib/core/CHIPCore.h>
3030
#include <lib/core/CHIPError.h>
31-
#include <platform/CHIPDeviceLayer.h>
32-
3331
#include <lib/support/DLLUtil.h>
34-
32+
#include <platform/CHIPDeviceLayer.h>
3533
#include <stdarg.h>
3634
#include <stdlib.h>
3735
#include <string.h>
3836

39-
#include <app/util/af-types.h>
40-
4137
namespace chip {
4238
namespace DeviceManager {
4339

examples/lighting-app/realtek_bee/main/include/DeviceCallbacks.h

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#pragma once
2727

2828
#include "CHIPDeviceManager.h"
29-
#include <app/util/af-types.h>
30-
#include <app/util/basic-types.h>
3129
#include <platform/CHIPDeviceLayer.h>
3230

3331
class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks

examples/lock-app/realtek_bee/main/AppTask.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
3232
#include <app/server/Dnssd.h>
3333
#include <app/server/Server.h>
34-
#include <app/util/attribute-storage.h>
3534
#include <data-model-providers/codegen/Instance.h>
3635

3736
#include <credentials/DeviceAttestationCredsProvider.h>

examples/lock-app/realtek_bee/main/BoltLockManager.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "AppTask.h"
2424
#include <FreeRTOS.h>
2525
#include <app-common/zap-generated/attributes/Accessors.h>
26+
#include <support/CodeUtils.h>
2627

2728
using namespace chip;
2829
using BeeConfig = chip::DeviceLayer::Internal::BeeConfig;
@@ -71,13 +72,13 @@ bool BoltLockManager::ReadConfigValues()
7172
{
7273
size_t outLen;
7374
BeeConfig::ReadConfigValueBin(BeeConfig::kConfigKey_LockUser, reinterpret_cast<uint8_t *>(mUsers),
74-
sizeof(EmberAfPluginDoorLockUserInfo) * ArraySize(mUsers), outLen);
75+
sizeof(EmberAfPluginDoorLockUserInfo) * MATTER_ARRAY_SIZE(mUsers), outLen);
7576

7677
BeeConfig::ReadConfigValueBin(BeeConfig::kConfigKey_LockUserData, reinterpret_cast<uint8_t *>(mUserData),
77-
sizeof(UserData) * ArraySize(mUserData), outLen);
78+
sizeof(UserData) * MATTER_ARRAY_SIZE(mUserData), outLen);
7879

7980
BeeConfig::ReadConfigValueBin(BeeConfig::kConfigKey_Credential, reinterpret_cast<uint8_t *>(mCredentials),
80-
sizeof(EmberAfPluginDoorLockCredentialInfo) * ArraySize(mCredentials), outLen);
81+
sizeof(EmberAfPluginDoorLockCredentialInfo) * MATTER_ARRAY_SIZE(mCredentials), outLen);
8182

8283
BeeConfig::ReadConfigValueBin(BeeConfig::kConfigKey_CredentialData, reinterpret_cast<uint8_t *>(mCredentialData),
8384
sizeof(mCredentialData), outLen);

examples/lock-app/realtek_bee/main/CHIPDeviceManager.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,11 @@
2525
#include <stdlib.h>
2626

2727
#include "CHIPDeviceManager.h"
28-
#include <app/util/basic-types.h>
2928
#include <core/ErrorStr.h>
3029
#include <platform/Realtek_bee/FactoryDataProvider.h>
3130
#include <support/CHIPMem.h>
3231
#include <support/CodeUtils.h>
3332

34-
#include <app-common/zap-generated/attributes/Accessors.h>
35-
#include <app-common/zap-generated/ids/Attributes.h>
36-
#include <app-common/zap-generated/ids/Clusters.h>
37-
#include <app/util/af-types.h>
38-
#include <app/util/attribute-storage.h>
39-
#include <app/util/util.h>
40-
4133
using namespace ::chip;
4234

4335
namespace chip {

examples/lock-app/realtek_bee/main/include/CHIPDeviceManager.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@
2828

2929
#include <lib/core/CHIPCore.h>
3030
#include <lib/core/CHIPError.h>
31-
#include <platform/CHIPDeviceLayer.h>
32-
3331
#include <lib/support/DLLUtil.h>
34-
32+
#include <platform/CHIPDeviceLayer.h>
3533
#include <stdarg.h>
3634
#include <stdlib.h>
3735
#include <string.h>
3836

39-
#include <app/util/af-types.h>
40-
4137
namespace chip {
4238
namespace DeviceManager {
4339

examples/lock-app/realtek_bee/main/include/DeviceCallbacks.h

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#pragma once
2727

2828
#include "CHIPDeviceManager.h"
29-
#include <app/util/af-types.h>
30-
#include <app/util/basic-types.h>
3129
#include <platform/CHIPDeviceLayer.h>
3230

3331
class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks

examples/ota-requestor-app/realtek_bee/README.md

-81
This file was deleted.

0 commit comments

Comments
 (0)