Skip to content

Commit

Permalink
Merge branch 'master' into pr/cluster/wncv
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored Sep 26, 2022
2 parents 1737d3d + 797ca40 commit 70803a5
Show file tree
Hide file tree
Showing 379 changed files with 25,600 additions and 12,610 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ jobs:
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target bouffalolab-BL706-IoT-DVK-BL706C-22-light build"
"./scripts/build/build_examples.py --target bouffalolab-BL706-IoT-DVK-light build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py bl702 bl702 lighting-app \
out/bouffalolab-BL706-IoT-DVK-BL706C-22-light/chip-bl702-lighting-example.out /tmp/bloat_reports/
out/bouffalolab-BL706-IoT-DVK-light/chip-bl702-lighting-example.out /tmp/bloat_reports/
- name: Build example BL702 Lighting App with RPCs
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target bouffalolab-BL706-IoT-DVK-BL706C-22-light-rpc build"
"./scripts/build/build_examples.py --target bouffalolab-BL706-IoT-DVK-light-rpc build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py bl702 bl702+rpc lighting-app \
out/bouffalolab-BL706-IoT-DVK-BL706C-22-light-rpc/chip-bl702-lighting-example.out /tmp/bloat_reports/
out/bouffalolab-BL706-IoT-DVK-light-rpc/chip-bl702-lighting-example.out /tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ concurrency:
jobs:
efr32:
name: EFR32
timeout-minutes: 110
timeout-minutes: 110

env:
EFR32_BOARD: BRD4161A
SILABS_BOARD: BRD4161A
BUILD_TYPE: gn_efr32

runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
efr32:
name: EFR32
env:
EFR32_BOARD: BRD4161A
SILABS_BOARD: BRD4161A
BUILD_DIRECTORY: out/lock_app_debug/BRD4161A

runs-on: ubuntu-latest
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
.environment/pigweed-venv/*.log
- name: Build example EFR32 Lock App
run: scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/
out/lock_app_debug $EFR32_BOARD
out/lock_app_debug $SILABS_BOARD

- name: Upload artifact
run: |
Expand All @@ -110,4 +110,4 @@ jobs:
--release-tag "${{ github.event.inputs.releaseTag }}" \
--bundle-files $BUILD_DIRECTORY/lock_app.flashbundle.txt \
--working-directory $BUILD_DIRECTORY \
--bundle-name efr32-$EFR32_BOARD-chip-lock-example
--bundle-name efr32-$SILABS_BOARD-chip-lock-example
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![Examples - nRF Connect SDK](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20nRF%20Connect%20SDK/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-nrfconnect.yaml)
[![Examples - QPG](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20QPG/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-qpg.yaml)
[![Examples - TI CC26X2X7](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20TI%20CC26X2X7/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-cc13x2x7_26x2x7.yaml)
[![Build example - Infineon](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml)

[![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/android.yaml)

Expand Down
12 changes: 9 additions & 3 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -520,32 +520,38 @@ menu "CHIP Device Layer"
visible if ENABLE_ETHERNET_TELEMETRY

config GPIO_RANGE_MIN
int
int
depends on ENABLE_ETHERNET_TELEMETRY
default 0

config GPIO_RANGE_MAX
int
int
depends on ENABLE_ETHERNET_TELEMETRY
default 33 if IDF_TARGET_ESP32
default 46 if IDF_TARGET_ESP32S2
default 19 if IDF_TARGET_ESP32C3
default 48 if IDF_TARGET_ESP32S3
default 26 if IDF_TARGET_ESP32H2

config ETH_MDC_GPIO
int "SMI MDC GPIO number"
depends on ENABLE_ETHERNET_TELEMETRY
range GPIO_RANGE_MIN GPIO_RANGE_MAX
default 23 if ENABLE_ETHERNET_TELEMETRY
default 23 if ENABLE_ETHERNET_TELEMETRY
help
Set the GPIO number used by SMI MDC.

config ETH_MDIO_GPIO
int "SMI MDIO GPIO number"
depends on ENABLE_ETHERNET_TELEMETRY
range GPIO_RANGE_MIN GPIO_RANGE_MAX
default 18 if ENABLE_ETHERNET_TELEMETRY
help
Set the GPIO number used by SMI MDIO.

config ETH_PHY_RST_GPIO
int "PHY Reset GPIO number"
depends on ENABLE_ETHERNET_TELEMETRY
range -1 GPIO_RANGE_MAX
default 5 if ENABLE_ETHERNET_TELEMETRY
help
Expand Down
5 changes: 4 additions & 1 deletion docs/guides/darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ requirements
[Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15_6-release-notes)
for currently known issues.
- Please refer to the iOS/iPadOS 16.0
[Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-16-release-notes)
[Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-16-release-notes)
for currently known issues.
- Please refer to the iOS/iPadOS 16.1
[Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-16_1-release-notes)
for currently known issues.
- Further issues should be reported
[here](https://github.com/project-chip/connectedhomeip/issues)
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down Expand Up @@ -3168,6 +3176,11 @@ server cluster MediaPlayback = 1286 {
kBuffering = 3;
}

bitmap MediaPlaybackFeature : BITMAP32 {
kAdvancedSeek = 0x1;
kVariableSpeed = 0x2;
}

readonly attribute PlaybackStateEnum currentState = 0;
readonly attribute nullable epoch_us startTime = 1;
readonly attribute nullable int64u duration = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define APP_LIGHT_BUTTON CYBSP_USER_BTN1
#define APP_FUNCTION_BUTTON CYBSP_USER_BTN2
#define APP_BUTTON_DEBOUNCE_PERIOD_MS 200
#define APP_BUTTON_MIN_ASSERT_TIME_MS 30

#define APP_BUTTON_PRESSED 0
#define APP_BUTTON_RELEASED 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ButtonHandler::Init(void)
for (uint8_t i = 0; i < kButtonCount; i++)
{
buttonTimers[i] = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel
APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period
APP_BUTTON_MIN_ASSERT_TIME_MS, // timer period
false, // no timer reload (==one-shot)
(void *) (int) i, // init timer id = button index
TimerCallback // timer callback handler (all buttons use
Expand Down Expand Up @@ -90,7 +90,7 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer)
{
// Get the button index of the expired timer and call button event helper.
uint32_t timerId;
uint8_t buttonevent = 0;
uint8_t buttonevent = 1;
timerId = (uint32_t) pvTimerGetTimerID(xTimer);

switch (timerId)
Expand All @@ -106,7 +106,7 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer)
break;
}

if (buttonevent)
if (!buttonevent)
{
GetAppTask().ButtonEventHandler(timerId, APP_BUTTON_PRESSED);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down Expand Up @@ -2565,6 +2573,11 @@ server cluster MediaPlayback = 1286 {
kBuffering = 3;
}

bitmap MediaPlaybackFeature : BITMAP32 {
kAdvancedSeek = 0x1;
kVariableSpeed = 0x2;
}

readonly attribute PlaybackStateEnum currentState = 0;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define APP_LIGHT_BUTTON CYBSP_USER_BTN1
#define APP_FUNCTION_BUTTON CYBSP_USER_BTN2
#define APP_BUTTON_DEBOUNCE_PERIOD_MS 200
#define APP_BUTTON_MIN_ASSERT_TIME_MS 30

#define APP_BUTTON_PRESSED 0
#define APP_BUTTON_RELEASED 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ButtonHandler::Init(void)
for (uint8_t i = 0; i < kButtonCount; i++)
{
buttonTimers[i] = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel
APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period
APP_BUTTON_MIN_ASSERT_TIME_MS, // timer period
false, // no timer reload (==one-shot)
(void *) (int) i, // init timer id = button index
TimerCallback // timer callback handler (all buttons use
Expand Down Expand Up @@ -90,7 +90,7 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer)
{
// Get the button index of the expired timer and call button event helper.
uint32_t timerId;
uint8_t buttonevent = 0;
uint8_t buttonevent = 1;
timerId = (uint32_t) pvTimerGetTimerID(xTimer);

switch (timerId)
Expand All @@ -106,7 +106,7 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer)
break;
}

if (buttonevent)
if (!buttonevent)
{
GetAppTask().ButtonEventHandler(timerId, APP_BUTTON_PRESSED);
}
Expand Down
8 changes: 8 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down
8 changes: 3 additions & 5 deletions examples/bridge-app/linux/Device.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2021 Project CHIP Authors
* Copyright (c) 2021-2022 Project CHIP Authors
* Copyright (c) 2019 Google LLC.
* All rights reserved.
*
Expand All @@ -24,11 +24,9 @@

using namespace chip::app::Clusters::Actions;

// LightingManager LightingManager::sLight;

Device::Device(const char * szDeviceName, std::string szLocation)
{
strncpy(mName, szDeviceName, sizeof(mName));
chip::Platform::CopyString(mName, szDeviceName);
mLocation = szLocation;
mReachable = false;
mEndpointId = 0;
Expand Down Expand Up @@ -66,7 +64,7 @@ void Device::SetName(const char * szName)

ChipLogProgress(DeviceLayer, "Device[%s]: New Name=\"%s\"", mName, szName);

strncpy(mName, szName, sizeof(mName));
chip::Platform::CopyString(mName, szName);

if (changed)
{
Expand Down
12 changes: 6 additions & 6 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def load_config() -> None:
config["silabs-thread"]["GECKO_SDK"] = f"{_REPO_BASE_PATH}third_party/efr32_sdk/repo"
config["silabs-thread"]["TTY"] = None
config["silabs-thread"]["CU"] = None
config["silabs-thread"]["EFR32_BOARD"] = None
config["silabs-thread"]["SILABS_BOARD"] = None
config["ameba"]["AMEBA_SDK"] = None
config["ameba"]["MATTER_SDK"] = None
config["ameba"]["MODEL"] = 'D'
Expand Down Expand Up @@ -493,11 +493,11 @@ def main() -> int:
pass
elif options.build_target == "silabs-thread":
flush_print('Path to gecko sdk is configured within Matter.')
if 'EFR32_BOARD' not in config['silabs-thread'] or config['silabs-thread']['EFR32_BOARD'] is None:
if 'SILABS_BOARD' not in config['silabs-thread'] or config['silabs-thread']['SILABS_BOARD'] is None:
flush_print(
'EFR32_BOARD was not configured. Make sure silabs-thread.EFR32_BOARD is set on your config.yaml file')
'SILABS_BOARD was not configured. Make sure silabs-thread.SILABS_BOARD is set on your config.yaml file')
exit(1)
efr32_board = config['silabs-thread']['EFR32_BOARD']
silabs_board = config['silabs-thread']['SILABS_BOARD']
elif options.build_target == "ameba":
if config['ameba']['AMEBA_SDK'] is None:
flush_print(
Expand Down Expand Up @@ -669,7 +669,7 @@ def main() -> int:
f'{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh')
efr32_cmd_args.append('./')
efr32_cmd_args.append(f'out/{options.sample_device_type_name}')
efr32_cmd_args.append(f'{efr32_board}')
efr32_cmd_args.append(f'{silabs_board}')
efr32_cmd_args.append(
f'\'sample_name=\"{options.sample_device_type_name}\"\'')
if sw_ver_string:
Expand Down Expand Up @@ -808,7 +808,7 @@ def main() -> int:
elif (options.build_target == "silabs-thread") or (options.build_target == "silabs-wifi"):
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32")
shell.run_cmd(
f"python3 out/{options.sample_device_type_name}/{efr32_board}/chip-efr32-chef-example.flash.py")
f"python3 out/{options.sample_device_type_name}/{silabs_board}/chip-efr32-chef-example.flash.py")

shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")
elif (options.build_target == "ameba"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down
8 changes: 8 additions & 0 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,14 @@ server cluster EthernetNetworkDiagnostics = 55 {
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}
Expand Down
Loading

0 comments on commit 70803a5

Please sign in to comment.