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

Test branch #60

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ endif()

if(CONFIG_ENABLE_ICD_SERVER)
chip_gn_arg_append("chip_enable_icd_server" "true")
if(CONFIG_ICD_ENFORCE_SIT_SLOW_POLL_LIMIT)
chip_gn_arg_append("icd_enforce_sit_slow_poll_limit" "true")
endif()
if(CONFIG_ICD_REPORT_ON_ACTIVE_MODE)
chip_gn_arg_append("chip_icd_report_on_active_mode" "true")
endif()
Expand Down
9 changes: 1 addition & 8 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ menu "CHIP Core"
default 8
help
The maximum number of simultaneously active CHIP exchange contexts.

An exchange context object is used to track the state of an ongoing CHIP message
exchange (conversation) with a peer, e.g. a cloud service, a mobile application, or
another device.
Expand Down Expand Up @@ -410,13 +410,6 @@ menu "CHIP Device Layer"
help
Enables or Disables ICD server

config ICD_ENFORCE_SIT_SLOW_POLL_LIMIT
bool "Enforce SIT Slow Polling Max value to 15 seconds"
depends on ENABLE_ICD_SERVER
default n
help
Set to true to enforce SIT Slow Polling Max value to 15seconds

config ICD_REPORT_ON_ACTIVE_MODE
bool "Emit a report on entering active mode"
depends on ENABLE_ICD_SERVER
Expand Down
8 changes: 8 additions & 0 deletions config/esp32/components/chip/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ dependencies:
- if: "idf_version >=5.0"
- if: "target != esp32h2"

# This matches the dependency of esp_insights
espressif/esp_diag_data_store:
version: "1.0.1"
require: public
rules:
- if: "idf_version >=5.0"
- if: "target != esp32h2"

espressif/esp_rcp_update:
version: "1.2.0"
rules:
Expand Down
1 change: 0 additions & 1 deletion config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_dsls" CONFIG_CHIP_ICD_DSLS_SUPPORT)
matter_add_gn_arg_bool ("icd_enforce_sit_slow_poll_limit" TRUE)
endif()

if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ Trigger Support, set the following parameter to true:
chip_enable_icd_lit = true
```

TI examples have only been tested with the ICD Server configuration. To enable
the client configuration, set `chip_enable_icd_client` to true.

Persistent subscriptions allow devices to attempt resuming existing
subscriptions following a device reset. To enable persistent subscriptions, set
the following parameter to true:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class DeviceProvisioningFragment : Fragment() {
override fun onICDRegistrationInfoRequired() {
Log.d(TAG, "onICDRegistrationInfoRequired")
deviceController.updateCommissioningICDRegistrationInfo(
ICDRegistrationInfo.newBuilder().build()
ICDRegistrationInfo.newBuilder().setICDStayActiveDurationMsec(30000L).build()
)
}

Expand Down
1 change: 0 additions & 1 deletion examples/contact-sensor-app/nxp/k32w0/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ chip_generate_link_map_file = true

chip_enable_icd_server = true
chip_enable_icd_lit = false
icd_enforce_sit_slow_poll_limit = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true

Expand Down
1 change: 0 additions & 1 deletion examples/contact-sensor-app/nxp/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ chip_with_lwip = false
chip_enable_icd_server = true
chip_enable_icd_lit = false
chip_enable_icd_dsls = false
icd_enforce_sit_slow_poll_limit = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true

Expand Down
1 change: 0 additions & 1 deletion examples/contact-sensor-app/nxp/mcxw71/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ chip_with_lwip = false

chip_enable_icd_server = true
chip_enable_icd_lit = false
icd_enforce_sit_slow_poll_limit = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3222,7 +3222,7 @@ endpoint 2 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 2;
ram attribute featureMap default = 6;
ram attribute clusterRevision default = 2;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5587,7 +5587,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "2",
"defaultValue": "6",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
1 change: 0 additions & 1 deletion examples/lit-icd-app/silabs/build_for_wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ sl_enable_test_event_trigger = true
chip_enable_icd_server = true
chip_subscription_timeout_resumption = false
sl_use_subscription_syncing = true
icd_enforce_sit_slow_poll_limit = true
chip_enable_icd_lit = true

# ICD Matter Configuration flags
Expand Down
1 change: 0 additions & 1 deletion examples/lit-icd-app/silabs/openthread.gni
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ sl_enable_test_event_trigger = true
chip_enable_icd_server = true
chip_subscription_timeout_resumption = false
sl_use_subscription_syncing = true
icd_enforce_sit_slow_poll_limit = true
chip_icd_report_on_active_mode = true
chip_enable_icd_lit = true

Expand Down
1 change: 0 additions & 1 deletion examples/lock-app/nxp/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ chip_with_lwip = false

chip_enable_icd_server = true
chip_enable_icd_lit = false
icd_enforce_sit_slow_poll_limit = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true

Expand Down
1 change: 0 additions & 1 deletion examples/lock-app/nxp/mcxw71/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ chip_with_lwip = false

chip_enable_icd_server = true
chip_enable_icd_lit = false
icd_enforce_sit_slow_poll_limit = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true

Expand Down
67 changes: 67 additions & 0 deletions examples/platform/silabs/Si70xxSensor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2019 Google LLC.
* All rights reserved.
*
* 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.
*/

#include "sl_board_control.h"
#include "sl_i2cspm_instances.h"
#include "sl_si70xx.h"
#include <Si70xxSensor.h>
#include <lib/support/CodeUtils.h>

namespace {

constexpr uint16_t kSensorTemperatureOffset = 475;
bool initialized = false;

} // namespace

namespace Si70xxSensor {

sl_status_t Init()
{
sl_status_t status = SL_STATUS_OK;

status = sl_board_enable_sensor(SL_BOARD_SENSOR_RHT);
VerifyOrReturnError(status == SL_STATUS_OK, status);

status = sl_si70xx_init(sl_i2cspm_sensor, SI7021_ADDR);
VerifyOrReturnError(status == SL_STATUS_OK, status);

initialized = true;
return status;
}

sl_status_t GetSensorData(uint16_t & relativeHumidity, int16_t & temperature)
{
VerifyOrReturnError(initialized, SL_STATUS_NOT_INITIALIZED);

sl_status_t status = SL_STATUS_OK;
int32_t tempTemperature = 0;
uint32_t tempHumidity = 0;

status = sl_si70xx_measure_rh_and_temp(sl_i2cspm_sensor, SI7021_ADDR, &tempHumidity, &tempTemperature);
VerifyOrReturnError(status == SL_STATUS_OK, status);

// Sensor precision is milliX. We need to reduce to change the precision to centiX to fit with the cluster attributes presicion.
temperature = static_cast<int16_t>(tempTemperature / 10) - kSensorTemperatureOffset;
relativeHumidity = static_cast<uint16_t>(tempHumidity / 10);

return status;
}

}; // namespace Si70xxSensor
48 changes: 48 additions & 0 deletions examples/platform/silabs/Si70xxSensor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2019 Google LLC.
* All rights reserved.
*
* 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.
*/

#pragma once

#include "sl_status.h"
#include <stdint.h>

namespace Si70xxSensor {

/**
* @brief Initialises the Si70xx Sensor.
*
* @return sl_status_t SL_STATUS_OK if there were no errors occured during initialisation.
* Error if an underlying platform error occured
*/
sl_status_t Init();

/**
* @brief Reads Humidity and temperature values from the Si70xx sensor.
* The init function must be called before calling the GetSensorData.
*
* @param[out] relativeHumidity Relative humidity percentage in centi-pourcentage (1000 == 10.00%)
* @param[out] temperature Ambiant temperature in centi-celsium (1000 == 10.00C)
*
* @return sl_status_t SL_STATUS_OK if there were no errors occured during initialisation.
* SL_STATUS_NOT_INITIALIZED if the sensor was not initialised
* Error if an underlying platform error occured
*/
sl_status_t GetSensorData(uint16_t & relativeHumidity, int16_t & temperature);

}; // namespace Si70xxSensor
7 changes: 7 additions & 0 deletions examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ source_set("siwx917-common") {
public_deps += [ ":test-event-trigger" ]
}

if (sl_enable_si70xx_sensor) {
sources += [
"${silabs_common_plat_dir}/Si70xxSensor.cpp",
"${silabs_common_plat_dir}/Si70xxSensor.h",
]
}

if (app_data_model != "") {
public_deps += [ app_data_model ]
}
Expand Down
62 changes: 0 additions & 62 deletions examples/platform/silabs/TemperatureSensor.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions examples/platform/silabs/TemperatureSensor.h

This file was deleted.

1 change: 0 additions & 1 deletion examples/platform/silabs/display/demo-ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,5 @@ void demoUIClearMainScreen(uint8_t * name)
{
GLIB_clear(&glibContext);
demoUIDisplayHeader((char *) name);
demoUIDisplayApp(false);
demoUIDisplayProtocols();
}
3 changes: 1 addition & 2 deletions examples/platform/silabs/display/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class SilabsLCD
int DrawPixel(void * pContext, int32_t x, int32_t y);
int Update(void);
void WriteDemoUI(bool state);
void WriteDemoUI();
void SetCustomUI(customUICB cb);

void GetScreen(Screen_e & screen);
Expand All @@ -85,8 +86,6 @@ class SilabsLCD
bool protocol1 = false; /* data */
} DemoState_t;

void WriteDemoUI();

#ifdef QR_CODE_ENABLED
void WriteQRCode();
void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h);
Expand Down
Loading
Loading