Skip to content

Commit

Permalink
Gecko SDK 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
silabsbot committed Mar 10, 2022
1 parent 9e70b13 commit 2e82050
Show file tree
Hide file tree
Showing 10,767 changed files with 64,122 additions and 58,142 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=com.silabs.sdk.stack.super

version=4.0.1
version=4.0.2

label=Gecko SDK Suite
description=Gecko SDK Suite
Expand Down
1 change: 0 additions & 1 deletion app/amazon/example/aws_demos/aws_gatt_server.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ component:
- id: bootloader_interface
- id: toolchain_gcc
- id: freertos
- id: cmsis_rtos2
- id: iostream_usart
instance: [vcom]
# AFR - Bluetooth components
Expand Down
1 change: 0 additions & 1 deletion app/amazon/example/aws_demos/aws_mqtt_over_ble.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ component:
- id: bootloader_interface
- id: toolchain_gcc
- id: freertos
- id: cmsis_rtos2
- id: iostream_usart
instance: [vcom]
# AFR - Bluetooth components
Expand Down
1 change: 0 additions & 1 deletion app/amazon/example/aws_tests/aws_tests.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source:
- path: "../../../../util/third_party/aws_iot_libs/vendors/siliconlabs/boards/all/aws_tests/application_code/main.c"
component:
- id: freertos
- id: cmsis_rtos2
- id: aws_tests_core
- id: iostream_usart
instance: [vcom]
Expand Down
1 change: 0 additions & 1 deletion app/amazon/example/aws_tests/aws_tests_bt.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ component:
- id: bootloader_interface
- id: toolchain_gcc
- id: freertos
- id: cmsis_rtos2
- id: aws_tests_core
- id: iostream_usart
instance: [vcom]
Expand Down
576 changes: 288 additions & 288 deletions app/bluetooth/bluetooth_production_demos.xml

Large diffs are not rendered by default.

92 changes: 46 additions & 46 deletions app/bluetooth/bluetooth_production_templates.xml

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions app/bluetooth/btmesh.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This file provides metadata for the stack directory, as part of ESF.
id=com.silabs.stack.btMesh
label=Bluetooth Mesh SDK
description=Bluetooth Mesh Software Development Kit
version=2.2.1.0
prop.subLabel=Bluetooth\\ Mesh\\ 2.2.1

# Default compatibility of the BT Mesh SDK (This is needed for the documentation only)
prop.boardCompatibility=.*
prop.partCompatibility=.*efr32bg2(1|2.*f512).* .*efr32mg2[12].* .*efr32[mb]g1[23]p.* .*mgm(1[23]|2[12]).* .*bgm(13|21|22.*hna).*

# General properties are prepended with "prop."
prop.file.templatesFile=btmesh_production_templates.xml btmesh_alpha_templates.xml btmesh_beta_templates.xml btmesh_test_templates.xml btmesh_internal_templates.xml
prop.file.docsFile=documentation/slBtMesh_docContent.xml
prop.file.demosFile= btmesh_production_demos.xml btmesh_alpha_demos.xml btmesh_beta_demos.xml btmesh_test_demos.xml btmesh_internal_demos.xml
#prop.file.modulesFile=modules.xml
#prop.file.docsFile=docs.xml

prop.file.bleSDK.bgbuildLocation=../../protocol/bluetooth/bin
prop.bgbuildToolchain=true
prop.file.adapterPacks=../../protocol/bluetooth/bin/gatt script/btmesh
prop.file.btconfGattItemSourcePath=gatt_xml
prop.btConfGattItemDatabases=mesh
# This file provides metadata for the stack directory, as part of ESF.
id=com.silabs.stack.btMesh
label=Bluetooth Mesh SDK
description=Bluetooth Mesh Software Development Kit
version=2.2.2.0
prop.subLabel=Bluetooth\\ Mesh\\ 2.2.2

# Default compatibility of the BT Mesh SDK (This is needed for the documentation only)
prop.boardCompatibility=.*
prop.partCompatibility=.*efr32bg2(1|2.*f512|4).* .*efr32mg2[124].* .*efr32[mb]g1[23]p.* .*mgm(1[23]|2[12]).* .*bgm(13|21|22.*hna).*

# General properties are prepended with "prop."
prop.file.templatesFile=btmesh_production_templates.xml btmesh_alpha_templates.xml btmesh_beta_templates.xml btmesh_test_templates.xml btmesh_internal_templates.xml
prop.file.docsFile=documentation/slBtMesh_docContent.xml
prop.file.demosFile= btmesh_production_demos.xml btmesh_alpha_demos.xml btmesh_beta_demos.xml btmesh_test_demos.xml btmesh_internal_demos.xml
#prop.file.modulesFile=modules.xml
#prop.file.docsFile=docs.xml

prop.file.bleSDK.bgbuildLocation=../../protocol/bluetooth/bin
prop.bgbuildToolchain=true
prop.file.adapterPacks=../../protocol/bluetooth/bin/gatt script/btmesh
prop.file.btconfGattItemSourcePath=gatt_xml
prop.btConfGattItemDatabases=mesh
52 changes: 26 additions & 26 deletions app/bluetooth/btmesh_internal_demos.xml

Large diffs are not rendered by default.

728 changes: 504 additions & 224 deletions app/bluetooth/btmesh_production_demos.xml

Large diffs are not rendered by default.

99 changes: 69 additions & 30 deletions app/bluetooth/btmesh_production_templates.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"composition_data": {
"cid": "0x02ff",
"pid": "0xffff",
"vid": "0x0221",
"vid": "0x0222",
"elements": [
{
"name": "Main",
Expand Down
27 changes: 20 additions & 7 deletions app/bluetooth/common/btmesh_hsl_server/sl_btmesh_hsl_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,28 @@
* @brief Bt Mesh HSL Server module
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
// C Standard Library headers
Expand Down
27 changes: 20 additions & 7 deletions app/bluetooth/common/btmesh_hsl_server/sl_btmesh_hsl_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,28 @@
* @brief sl_btmesh_hsl_server.h
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,28 @@
* @brief HSL Transition Handler Module
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,28 @@
* @brief sl_btmesh_hsl_signal_transition_handler.h
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ static uint8_t onoff_request_count;
static uint8_t onoff_trid = 0;
/// lightness level percentage
static uint8_t lightness_percent = 0;
/// lightness level percentage when switching ON
static uint8_t lightness_percent_switch_on = LIGHTNESS_PCT_MAX;
/// lightness level converted from percentage to actual value, range 0..65535
static uint16_t lightness_level = 0;
/// number of lightness requests to be sent
Expand Down Expand Up @@ -248,6 +250,9 @@ void sl_btmesh_change_lightness(int8_t change_percentage)
}
}

if (lightness_percent != 0) {
lightness_percent_switch_on = lightness_percent;
}
sl_btmesh_set_lightness(lightness_percent);
}

Expand Down Expand Up @@ -307,7 +312,7 @@ void sl_btmesh_change_switch_position(uint8_t position)
// Turns light ON or OFF, using Generic OnOff model
if (switch_pos) {
log(SL_BTMESH_ONOFF_LIGHTING_LOGGING_ON_CFG_VAL);
lightness_percent = LIGHTNESS_PCT_MAX;
lightness_percent = lightness_percent_switch_on;
} else {
log(SL_BTMESH_ONOFF_LIGHTING_LOGGING_OFF_CFG_VAL);
lightness_percent = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,16 @@ void sl_btmesh_sensor_server_node_init(void)
#endif // SL_CATALOG_BTMESH_SENSOR_PEOPLE_COUNT_PRESENT
#if defined(SL_BOARD_ENABLE_SENSOR_LIGHT) && SL_BOARD_ENABLE_SENSOR_LIGHT
#ifdef SL_CATALOG_SENSOR_LIGHT_PRESENT
sl_sensor_light_init();
(void)sl_sensor_light_init();
#endif // SL_CATALOG_SENSOR_LIGHT_PRESENT
#ifdef SL_CATALOG_SENSOR_LUX_PRESENT
sl_sensor_lux_init();
(void)sl_sensor_lux_init();
#endif // SL_CATALOG_SENSOR_LUX_PRESENT
#endif // SL_BOARD_ENABLE_SENSOR_LIGHT
#if defined(SL_CATALOG_SENSOR_RHT_PRESENT) \
&& defined(SL_BOARD_ENABLE_SENSOR_RHT) \
&& SL_BOARD_ENABLE_SENSOR_RHT
sl_sensor_rht_init();
(void)sl_sensor_rht_init();
#endif // SL_CATALOG_SENSOR_RHT_PRESENT

#if SENSOR_PEOPLE_COUNT_CADENCE && SENSOR_THERMOMETER_CADENCE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/***************************************************************************//**
* @file
* @brief Air Quality GATT Service Configuration
*******************************************************************************
* # License
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/

#ifndef SL_GATT_SERVICE_GAS_CONFIG_H
#define SL_GATT_SERVICE_GAS_CONFIG_H

// <<< Use Configuration Wizard in Context Menu >>>

// <o SL_GATT_SERVICE_GAS_ECO2_INVALID> Dummy Equivalent CO2 level measurement results for uninitialized sensors. <0-0xFFFF>
// <i> Default: 0xFFFF
#define SL_GATT_SERVICE_GAS_ECO2_INVALID 0xFFFF

// <o SL_GATT_SERVICE_GAS_TVOC_INVALID> Dummy Total Volatile Organic Compounds level measurement results for uninitialized sensors. <0-0xFFFF>
// <i> Default: 0xFFFF
#define SL_GATT_SERVICE_GAS_TVOC_INVALID 0xFFFF
// <<< end of configuration section >>>

#endif // SL_GATT_SERVICE_GAS_CONFIG_H
11 changes: 9 additions & 2 deletions app/bluetooth/common/gatt_service_gas/sl_gatt_service_gas.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @brief Air Quality GATT Service
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
Expand Down Expand Up @@ -33,6 +33,7 @@
#include "gatt_db.h"
#include "app_assert.h"
#include "sl_gatt_service_gas.h"
#include "sl_gatt_service_gas_config.h"

// -----------------------------------------------------------------------------
// Private variables
Expand All @@ -52,12 +53,18 @@ static void gas_tvoc_read_cb(sl_bt_evt_gatt_server_user_read_request_t *data);

static void gas_update(void)
{
sl_status_t sc;
uint16_t eco2;
uint16_t tvoc;

sc = sl_gatt_service_gas_get(&eco2, &tvoc);
// keep previous data if measurement fails
if (SL_STATUS_OK == sl_gatt_service_gas_get(&eco2, &tvoc)) {
if (SL_STATUS_OK == sc) {
gas_eco2 = eco2;
gas_tvoc = tvoc;
} else if (SL_STATUS_NOT_INITIALIZED == sc) {
gas_eco2 = SL_GATT_SERVICE_GAS_ECO2_INVALID;
gas_tvoc = SL_GATT_SERVICE_GAS_TVOC_INVALID;
}
}

Expand Down
Loading

0 comments on commit 2e82050

Please sign in to comment.