Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs] Adds refrigerator application #35433

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2a603b2
Added the refrigerator application
shgutte Aug 28, 2024
eddf15a
Added Implementation of the application
shgutte Aug 29, 2024
102b8dd
Added RefrigeratorManager
shgutte Aug 29, 2024
52119fe
Added changes for the callback and the attribute update
shgutte Sep 2, 2024
5d4e901
Added changes fot attribute data type
shgutte Sep 2, 2024
d4129a6
added changes for the refrigrator UI
shgutte Sep 3, 2024
aaa526f
Updated the wifi args and open thread files
shgutte Sep 3, 2024
5aff725
Added changes for refrigerator UI
shgutte Sep 3, 2024
12a577d
Added build fixes
shgutte Sep 4, 2024
86005cf
Fixed build errors
shgutte Sep 5, 2024
0e150dd
Added changes for new zap attributes
shgutte Sep 10, 2024
c8008ce
Added changes for the readme file
shgutte Sep 10, 2024
3c2c9c0
Added date and spelling mistake changes
shgutte Sep 12, 2024
cabf323
Added changes for spelling mistake
shgutte Sep 12, 2024
0280c54
Added updated zap matter file and removed the commented code
shgutte Sep 12, 2024
8302f2d
Removed the unwanted services from gn file
shgutte Sep 12, 2024
e52dcb2
Added function header
shgutte Sep 12, 2024
d049031
Updated task name and removed the incorrect data
shgutte Sep 12, 2024
e1738d0
Added callbacks
shgutte Sep 12, 2024
9be01e2
Modified the datat type and the removed the callback
shgutte Sep 12, 2024
9711a77
Removed unwated changes
shgutte Sep 14, 2024
7fddbd9
Added changes for authors
shgutte Sep 14, 2024
8f5a4ea
Restyled by whitespace
restyled-commits Sep 14, 2024
b07d01c
Restyled by clang-format
restyled-commits Sep 14, 2024
2174c28
Restyled by gn
restyled-commits Sep 14, 2024
56b316a
Added changes according to comments
shgutte Sep 17, 2024
411c828
Added the WiFi boards in the board list
shgutte Sep 17, 2024
f9201cc
Update examples/refrigerator-app/silabs/include/CHIPProjectConfig.h
shgutte Sep 17, 2024
7a66313
Update examples/refrigerator-app/silabs/README.md
shgutte Sep 17, 2024
82d4ecf
Fixed the unint32_t alignment for the
shgutte Sep 17, 2024
aaa8aa2
Added changes according to comment
shgutte Sep 17, 2024
2c517ba
Removing warning
shgutte Sep 17, 2024
fdf9129
Replaced the SILABS_LOGS with CHIPLog
shgutte Sep 17, 2024
08a818f
Corrected the application name
shgutte Sep 17, 2024
a03f94f
Update examples/refrigerator-app/silabs/README.md
shgutte Sep 17, 2024
b468185
Update examples/refrigerator-app/silabs/README.md
shgutte Sep 17, 2024
46e84d3
Update examples/refrigerator-app/silabs/src/RefrigeratorUI.cpp
shgutte Sep 17, 2024
6484154
Update examples/refrigerator-app/silabs/src/AppTask.cpp
shgutte Sep 17, 2024
e7430d7
Update examples/refrigerator-app/silabs/src/AppTask.cpp
shgutte Sep 17, 2024
409e482
Update examples/refrigerator-app/silabs/src/AppTask.cpp
shgutte Sep 17, 2024
e557411
Update examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp
shgutte Sep 17, 2024
71239cf
Update examples/refrigerator-app/silabs/src/AppTask.cpp
shgutte Sep 17, 2024
b5a9777
Update examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp
shgutte Sep 17, 2024
57b99d3
Update examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp
shgutte Sep 17, 2024
20c0303
Update examples/refrigerator-app/silabs/include/AppTask.h
shgutte Sep 17, 2024
040d804
Removed commented code
shgutte Sep 18, 2024
a58a8c3
Updated read me for OTA documentation for SiWx917
shgutte Sep 18, 2024
c415c55
Adds changes for refrigerator modes and callbacks
shgutte Sep 18, 2024
507d424
Added chip logs
shgutte Sep 18, 2024
4fbb566
Updated the error message
shgutte Sep 18, 2024
10944f2
Restyled by whitespace
restyled-commits Sep 18, 2024
dff3955
Restyled by clang-format
restyled-commits Sep 18, 2024
faffde2
Merge branch 'master' into feature/refrigerator-app-csa
shgutte Sep 19, 2024
bd2804c
Updated refrigerator app matter file
shgutte Sep 23, 2024
3ca5ddb
Added the changes related to zap file and the mode supported
shgutte Sep 26, 2024
6aeee76
Restyled by whitespace
restyled-commits Sep 26, 2024
4ee7f01
Restyled by clang-format
restyled-commits Sep 26, 2024
d303c59
Added changes for Temperature Controller feature Map
shgutte Oct 2, 2024
e068bb5
Updated featureMap value for matter file
shgutte Oct 2, 2024
36f09cd
Removed the temperature level
shgutte Oct 2, 2024
b0706ca
Removed the startup and on mode from attributes
shgutte Oct 3, 2024
3b4de3e
Setting min and max temperature for the controlled cabinet
shgutte Oct 3, 2024
a9b101a
Removed the Temperature level attribute from the Temperature controller
shgutte Oct 3, 2024
4e86d8d
Removed the min and max temperature
shgutte Oct 3, 2024
ece4c4e
Removed the attribute update for refrigerator and temperature cluster
shgutte Oct 3, 2024
cf95594
Added changes for the zap file
shgutte Oct 9, 2024
656d005
Added restyle changes
shgutte Oct 9, 2024
b09507b
Updated matter file
shgutte Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 243 additions & 0 deletions examples/refrigerator-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
# 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/efr32_sdk.gni")
import("//build_overrides/pigweed.gni")

import("${build_root}/config/defaults.gni")
import("${efr32_sdk_build_root}/silabs_executable.gni")

import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/third_party/silabs/silabs_board.gni")

if (chip_enable_pw_rpc) {
import("//build_overrides/pigweed.gni")
import("$dir_pw_build/target_types.gni")
}

assert(current_os == "freertos")

silabs_project_dir = "${chip_root}/examples/refrigerator-app/silabs"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

if (wifi_soc) {
import("${chip_root}/third_party/silabs/SiWx917_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917"
} else {
import("${efr32_sdk_build_root}/efr32_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
}

import("${examples_common_plat_dir}/args.gni")

declare_args() {
# Dump memory usage at link time.
chip_print_memory_usage = false

# Enable the temperature sensor
# Some boards do not have a temperature sensor
use_temp_sensor = false
}

if (wifi_soc) {
siwx917_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/SiWx917",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

defines = []
if (chip_enable_pw_rpc) {
defines += [
"HAL_VCOM_ENABLE=1",
"PW_RPC_ENABLED",
]
}
}
} else {
efr32_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/efr32",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

if (use_wf200) {
include_dirs += [ "${examples_plat_dir}/wf200" ]
}

if (chip_enable_ble_rs911x) {
include_dirs += [
"${chip_root}/src/platform/silabs/efr32/rs911x",
"${examples_plat_dir}/rs911x",
"${examples_plat_dir}/rs911x/hal",
]
}

defines = []
if (chip_enable_pw_rpc) {
defines += [
"HAL_VCOM_ENABLE=1",
"PW_RPC_ENABLED",
]
}

if (use_temp_sensor) {
include_dirs += [
"${efr32_sdk_root}/platform/driver/i2cspm/inc",
"${efr32_sdk_root}/app/bluetooth/common/sensor_rht",
"${efr32_sdk_root}/app/bluetooth/common/sensor_rht/config",
"${efr32_sdk_root}/hardware/driver/si70xx/inc",
"${efr32_sdk_root}/app/bluetooth/common/sensor_select",
"${efr32_sdk_root}/platform/common/config",
]

defines += [ "USE_TEMP_SENSOR" ]
}
}
}

silabs_executable("refrigerator_app") {
output_name = "matter-silabs-refrigerator-example.out"
defines = []
include_dirs = [
"include",
"${chip_root}/examples/refrigerator-app/refrigerator-common/include",
]

sources = [
"${chip_root}/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp",
"${examples_common_plat_dir}/main.cpp",
"src/AppTask.cpp",
"src/RefrigeratorManager.cpp",
"src/ZclCallbacks.cpp",
"src/refrigerator-and-temperature-controlled-cabinet-mode.cpp",
]

if (use_temp_sensor) {
sources += [
"${efr32_sdk_root}/hardware/driver/si70xx/src/sl_si70xx.c",
"${efr32_sdk_root}/platform/common/src/sl_status.c",
"${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c",
"${efr32_sdk_root}/platform/emlib/src/em_i2c.c",
"${examples_common_plat_dir}/TemperatureSensor.cpp",
"${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c",
]
}

if (!disable_lcd) {
sources += [ "src/RefrigeratorUI.cpp" ]
}

deps = [
":sdk",
app_data_model,
]

if (wifi_soc) {
deps += [ "${examples_plat_dir}:siwx917-common" ]
} else {
deps += [ "${examples_plat_dir}:efr32-common" ]
}

if (chip_enable_pw_rpc) {
defines += [
"PW_RPC_ENABLED",
"PW_RPC_ATTRIBUTE_SERVICE=1",
"PW_RPC_BUTTON_SERVICE=1",
"PW_RPC_DESCRIPTOR_SERVICE=1",
"PW_RPC_DEVICE_SERVICE=1",
]

sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
]

deps += [
"$dir_pw_hdlc:default_addresses",
"$dir_pw_hdlc:rpc_channel_output",
"$dir_pw_stream:sys_io_stream",
"${chip_root}/config/efr32/lib/pw_rpc:pw_rpc",
"${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:button_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:device_service.nanopb_rpc",
]

if (wifi_soc) {
deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ]
} else {
deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ]
}

deps += pw_build_LINK_DEPS

include_dirs += [
"${chip_root}/examples/common",
"${chip_root}/examples/common/pigweed/efr32",
]
}

ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]

if (chip_print_memory_usage) {
ldflags += [
"-Wl,--print-memory-usage",
"-fstack-usage",
]
}

# WiFi Settings
if (chip_enable_wifi) {
ldflags += [
"-Wl,--defsym",
"-Wl,SILABS_WIFI=1",
]
}

output_dir = root_out_dir
}

group("silabs") {
deps = [ ":refrigerator_app" ]
}

group("default") {
deps = [ ":silabs" ]
}
Loading
Loading