-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'project-chip:master' into source_location
- Loading branch information
Showing
474 changed files
with
9,175 additions
and
12,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (c) 2024 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Check for Unintentional Submodule Updates | ||
|
||
on: | ||
pull_request: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
paths: | ||
- "third_party/**" | ||
- ".gitmodules" | ||
|
||
jobs: | ||
check-submodule-update-label: | ||
name: Check For Submodule Update Label | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose')" | ||
steps: | ||
- name: Error Message | ||
run: echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes. | ||
- name: Fail Job | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## Providers Implemented for ESP32 Platform | ||
|
||
The ESP32 platform has implemented several providers that can be used with data | ||
stored in the factory or by setting fixed data. | ||
|
||
Below are the providers that have been implemented: | ||
|
||
- [Commissionable Data Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L47) | ||
This provider reads the discriminator and setup pincode related parameters | ||
from the factory partition. | ||
- [Device Attestation Credentials Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L56) | ||
This provider manages the attestation data. | ||
- [Device Instance Info Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L86) | ||
This provider reads basic device information from the factory partition. | ||
- [Device Info Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32DeviceInfoProvider.h#L31) | ||
This provider provides fixed labels, supported calendar types, and supported | ||
locales from the factory partition. | ||
- [Supported Modes](https://github.com/project-chip/connectedhomeip/blob/master/examples/platform/esp32/mode-support/static-supported-modes-manager.h#L28) | ||
This provider offers the supported modes for the mode-select cluster. | ||
|
||
More information can be found in the [factory data guide](factory_data.md). | ||
|
||
### Device Info Provider | ||
|
||
Currently, there are two implementations for this provider: | ||
|
||
1. [Reads data stored in the factory partition](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L56) | ||
_(This will be deprecated in the future)_ | ||
2. [Provides APIs to set fixed data that gets read later](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/StaticESP32DeviceInfoProvider.h) | ||
|
||
- New products should use the `StaticESP32DeviceInfoProvider`. Utilize the | ||
`Set...()` APIs to set the fixed data. | ||
- Existing products using the first implementation can continue to use it if | ||
they do not wish to change the data. | ||
- For products using the first implementation and wanting to change the fixed | ||
data via OTA, they should switch to the second implementation in the OTA | ||
image and use the `Set...()` APIs to set the fixed data. | ||
|
||
#### Example: | ||
|
||
```cpp | ||
#include <platform/ESP32/StaticESP32FactoryDataProvider.h> | ||
|
||
DeviceLayer::StaticESP32DeviceInfoProvider deviceInfoProvider; | ||
|
||
// Define array for Supported Calendar Types | ||
using namespace chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; | ||
CalendarTypeEnum supportedCalendarTypes[] = { | ||
CalendarTypeEnum::kGregorian, CalendarTypeEnum::kCoptic, | ||
CalendarTypeEnum::kEthiopian, CalendarTypeEnum::kChinese, | ||
}; | ||
|
||
// Define array for Supported Locales | ||
const char* supportedLocales[] = { | ||
"en-US", | ||
"en-EU", | ||
}; | ||
|
||
// Define array for Fixed labels { EndpointId, Label, Value } | ||
struct StaticESP32DeviceInfoProvider::FixedLabelEntry fixedLabels[] = { | ||
{ 0, "Room", "Bedroom 2" }, | ||
{ 0, "Orientation", "North" }, | ||
{ 0, "Direction", "Up" }, | ||
}; | ||
|
||
Span<CalendarTypeEnum> sSupportedCalendarTypes(supportedCalendarTypes); | ||
Span<const char*> sSupportedLocales(supportedLocales); | ||
Span<StaticESP32DeviceInfoProvider::FixedLabelEntry> sFixedLabels(fixedLabels); | ||
|
||
{ | ||
deviceInfoProvider.SetSupportedLocales(sSupportedLocales); | ||
deviceInfoProvider.SetSupportedCalendarTypes(sSupportedCalendarTypes); | ||
deviceInfoProvider.SetFixedLabels(sFixedLabels); | ||
DeviceLayer::SetDeviceInfoProvider(&deviceInfoProvider); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,7 @@ | |
|
||
#include "Globals.h" | ||
|
||
#if (LED_ENABLE == 1) | ||
LED_Handle sAppRedHandle; | ||
LED_Handle sAppGreenHandle; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.