diff --git a/.github/workflows/app-btl-build.yaml b/.github/workflows/app-btl-build.yaml index 55a8434..8895931 100644 --- a/.github/workflows/app-btl-build.yaml +++ b/.github/workflows/app-btl-build.yaml @@ -58,7 +58,7 @@ jobs: metadata_extra: "{}" ota_string: ${{ inputs.app_ota_string }} sdk_extensions: | - "https://github.com/Adminiuga/Raz1_custom_components_extension#0.0.1" + "https://github.com/Adminiuga/Raz1_custom_components_extension" bootloader-build: @@ -82,7 +82,7 @@ jobs: ) }} - export_project_name: "app_btl" + export_project_name: "TBS2Torch_btl" device: ${{ inputs.device }} components: > ${{ inputs.board != '' && format('{0},', inputs.board) || '' }} @@ -127,13 +127,13 @@ jobs: btl_project_name: ${{ needs.bootloader-build.outputs.project_name }} steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 name: Download App firmware with: name: ${{ env.app_artifact_name }} path: ${{ env.app_artifact_name }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 name: Download bootloader build with: name: ${{ env.btl_artifact_name }} @@ -182,10 +182,11 @@ jobs: --tag-id 0x0000 \ --tag-file "${{ env.app_project_name }}-btl.gbl" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 name: Upload bootloader & bootloader OTA image artifact with: name: ${{ env.btl_project_name }} + overwrite: true path: | ${{ env.btl_project_name }}/version.json ${{ env.btl_project_name }}/*.gbl diff --git a/.github/workflows/buld.yaml b/.github/workflows/buld.yaml index 865451b..c76b609 100644 --- a/.github/workflows/buld.yaml +++ b/.github/workflows/buld.yaml @@ -31,7 +31,7 @@ env: sdk_version: ${{ vars.sdk_version != '' && vars.sdk_version - || '4.4.0' + || '4.4.5' }} gcc_version: ${{ vars.gcc_version != '' && vars.gcc_version || '12.3.rel1' }} zap_version: ${{ vars.zap_version != '' && vars.zap_version || 'v2024.12.13' }} @@ -51,20 +51,20 @@ jobs: run: | echo "repository_owner=$(echo $GITHUB_REPOSITORY_OWNER | tr [:upper:] [:lower:])" >> $GITHUB_OUTPUT - - uses: actions/checkout@v3.3.0 + - uses: actions/checkout@v4 - name: Log in to the GitHub container registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.1 + uses: docker/setup-buildx-action@v3 - name: Build and Push - uses: docker/build-push-action@v3.3.0 + uses: docker/build-push-action@v6 with: context: . file: Dockerfile @@ -91,4 +91,4 @@ jobs: board: ${{ matrix.board }} build_btl: ${{ github.event.inputs.build_btl != '' && inputs.build_btl || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/rc') || false }} image_name: ${{ needs.build-container.outputs.image_name }} - btl_version: ${{ vars.btl_version != '' && vars.btl_version || '4' }} + btl_version: ${{ vars.btl_version != '' && vars.btl_version || '6' }} diff --git a/.github/workflows/silabs-project-builder.yaml b/.github/workflows/silabs-project-builder.yaml index 33d7ce6..74d21cf 100644 --- a/.github/workflows/silabs-project-builder.yaml +++ b/.github/workflows/silabs-project-builder.yaml @@ -122,7 +122,7 @@ jobs: ota_version: ${{ steps.ota_version.outputs.ota_version }} steps: - - uses: actions/checkout@v3.3.0 + - uses: actions/checkout@v4 - name: Adjust permission shell: bash run: chown -R builder . @@ -218,10 +218,10 @@ jobs: if: "${{ inputs.sdkpatchpath != '' }}" run: | cd ${{ env.PROJECT_NAME }}/gecko_sdk_${{ inputs.sdk_version }} - for patch in "../../${{ inputs.sdkpatchpath }}"/*.patch + for patch in $(find "../../${{ inputs.sdkpatchpath }}" -maxdepth 0 -name *.patch) do echo "Applying ${patch}" - patch -p1 < $patch + test -r $patch && patch -p1 < $patch done - name: Update OTA version @@ -319,7 +319,7 @@ jobs: --tag-id 0x0000 \ --tag-file "${{ env.PROJECT_NAME}}.gbl" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: (success() || failure()) && env.IS_BTL != 'yes' name: Upload application firmware with: @@ -330,7 +330,7 @@ jobs: ${{ env.PROJECT_NAME }}/build/release/*.hex ${{ env.PROJECT_NAME }}/build/release/*.ota - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: (success() || failure()) && env.IS_BTL == 'yes' name: Upload bootloader firmware with: @@ -339,7 +339,7 @@ jobs: ${{ env.PROJECT_NAME }}/artifact/version.json ${{ env.PROJECT_NAME }}/artifact/*.s37 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: (success() || failure()) && vars.ARTIFACT_UPLOAD_SOURCES != '' name: Upload generated project sources with: diff --git a/.gitignore b/.gitignore index 7417764..a762de5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,10 +13,18 @@ vscode.conf */.projectlinkstore */*.Makefile */GNU ARM */ +*/build/ +*/*_cmake/ +*/config/*.h +!*/config/app-global.h */.uceditor */autogen/* */.trash/ */*.project.mak +TBS2Torch/gecko_sdk_4.* +!TBS2Torch/gecko_sdk_4.*/protocol/zigbee/app/framework/plugin/level-control/level-control.c +TBS2Torch/raz1_custom_components_*/* + */.pdm *.pdf diff --git a/Dockerfile b/Dockerfile index 778b76a..d748708 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,83 +1,83 @@ -FROM debian:bookworm - -ARG DEBIAN_FRONTEND=noninteractive -ARG GCC_ARM_VERSION="12.3.rel1" -ARG ZAP_TOOL_RELEASE="v2024.12.13" -ARG GECKO_SDK_VERSION="v4.4.5" - -ARG USERNAME=builder -ARG USER_UID=1000 -ARG USER_GID=$USER_UID - - -RUN \ - apt-get update \ - && apt-get install -y --no-install-recommends \ - bzip2 \ - curl \ - git \ - git-lfs \ - jq \ - libgl1 \ - make \ - default-jre-headless \ - patch \ - python3 \ - unzip \ - xz-utils \ - less \ - && apt-get clean - -WORKDIR /tmp -# Install Simplicity Commander (unfortunately no stable URL available, this -# is known to be working with Commander_linux_x86_64_1v15p0b1306.tar.bz). -RUN \ - curl -O https://www.silabs.com/documents/login/software/SimplicityCommander-Linux.zip \ - && unzip -q SimplicityCommander-Linux.zip \ - && tar -C /opt -xjf SimplicityCommander-Linux/Commander_linux_x86_64_*.tar.bz \ - && rm -r SimplicityCommander-Linux \ - && rm SimplicityCommander-Linux.zip - -# Install Silicon Labs Configurator (slc) -RUN \ - curl -O https://www.silabs.com/documents/login/software/slc_cli_linux.zip \ - && unzip -d /opt -q slc_cli_linux.zip \ - && chmod go-w /opt/slc_cli \ - && rm slc_cli_linux.zip - -# Install ARM GCC embedded toolchain -RUN \ - curl -L -O https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_ARM_VERSION}/binrel/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz \ - && xzcat arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz | tar -C /opt -xf -\ - && rm arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz - -ENV PATH="$PATH:/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi/bin:/opt/slc_cli:/opt/commander" -ENV ARM_GCC_DIR="/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi" - -# Install ZAP adapter -RUN \ - curl -OL https://github.com/project-chip/zap/releases/download/${ZAP_TOOL_RELEASE}/zap-linux-x64.zip \ - && umask 022 \ - && unzip -d /opt/zap -q zap-linux-x64.zip \ - && rm zap-linux-x64.zip - -ENV STUDIO_ADAPTER_PACK_PATH="/opt/zap:/opt/commander" -ENV POST_BUILD_EXE="/opt/commander/commander" - -RUN \ - git clone --depth 1 -b ${GECKO_SDK_VERSION} https://github.com/SiliconLabs/gecko_sdk.git /gecko_sdk \ - && rm -rf /gecko_sdk/.git \ - && chmod 755 /gecko_sdk/protocol/zigbee/tool/image-builder/image-builder-linux - -# Create the user -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME - -USER $USERNAME -WORKDIR /build - -RUN \ - slc configuration --sdk="/gecko_sdk/" \ - && slc signature trust --sdk "/gecko_sdk/" \ - && slc configuration \ - --gcc-toolchain="/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi/" +FROM debian:bookworm + +ARG DEBIAN_FRONTEND=noninteractive +ARG GCC_ARM_VERSION="12.3.rel1" +ARG ZAP_TOOL_RELEASE="v2024.12.13" +ARG GECKO_SDK_VERSION="v4.4.5" + +ARG USERNAME=builder +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + + +RUN \ + apt-get update \ + && apt-get install -y --no-install-recommends \ + bzip2 \ + curl \ + git \ + git-lfs \ + jq \ + libgl1 \ + make \ + default-jre-headless \ + patch \ + python3 \ + unzip \ + xz-utils \ + less \ + && apt-get clean + +WORKDIR /tmp +# Install Simplicity Commander (unfortunately no stable URL available, this +# is known to be working with Commander_linux_x86_64_1v15p0b1306.tar.bz). +RUN \ + curl -O https://www.silabs.com/documents/login/software/SimplicityCommander-Linux.zip \ + && unzip -q SimplicityCommander-Linux.zip \ + && tar -C /opt -xjf SimplicityCommander-Linux/Commander_linux_x86_64_*.tar.bz \ + && rm -r SimplicityCommander-Linux \ + && rm SimplicityCommander-Linux.zip + +# Install Silicon Labs Configurator (slc) +RUN \ + curl -O https://www.silabs.com/documents/login/software/slc_cli_linux.zip \ + && unzip -d /opt -q slc_cli_linux.zip \ + && chmod go-w /opt/slc_cli \ + && rm slc_cli_linux.zip + +# Install ARM GCC embedded toolchain +RUN \ + curl -L -O https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_ARM_VERSION}/binrel/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz \ + && xzcat arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz | tar -C /opt -xf -\ + && rm arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz + +ENV PATH="$PATH:/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi/bin:/opt/slc_cli:/opt/commander" +ENV ARM_GCC_DIR="/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi" + +# Install ZAP adapter +RUN \ + curl -OL https://github.com/project-chip/zap/releases/download/${ZAP_TOOL_RELEASE}/zap-linux-x64.zip \ + && umask 022 \ + && unzip -d /opt/zap -q zap-linux-x64.zip \ + && rm zap-linux-x64.zip + +ENV STUDIO_ADAPTER_PACK_PATH="/opt/zap:/opt/commander" +ENV POST_BUILD_EXE="/opt/commander/commander" + +RUN \ + git clone --depth 1 -b ${GECKO_SDK_VERSION} https://github.com/SiliconLabs/gecko_sdk.git /gecko_sdk \ + && rm -rf /gecko_sdk/.git \ + && chmod 755 /gecko_sdk/protocol/zigbee/tool/image-builder/image-builder-linux + +# Create the user +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME + +USER $USERNAME +WORKDIR /build + +RUN \ + slc configuration --sdk="/gecko_sdk/" \ + && slc signature trust --sdk "/gecko_sdk/" \ + && slc configuration \ + --gcc-toolchain="/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi/" diff --git a/TBS2Torch/TBS2Torch.pintool b/TBS2Torch/TBS2Torch.pintool index 889ef9c..0caa77a 100644 --- a/TBS2Torch/TBS2Torch.pintool +++ b/TBS2Torch/TBS2Torch.pintool @@ -1,78 +1,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TBS2Torch/TBS2Torch.slcp b/TBS2Torch/TBS2Torch.slcp index 23601a2..d95cf21 100644 --- a/TBS2Torch/TBS2Torch.slcp +++ b/TBS2Torch/TBS2Torch.slcp @@ -37,73 +37,95 @@ source: - {path: handlers/rht.c} - {path: handlers/shaker.h} - {path: handlers/shaker.c} -- {path: gecko_sdk_4.4.0/protocol/zigbee/app/framework/plugin/level-control/level-control.c} +- {path: gecko_sdk_4.4.5/protocol/zigbee/app/framework/plugin/level-control/level-control.c} tag: [prebuilt_demo] -sdk: {id: gecko_sdk, version: 4.4.0} +sdk: {id: gecko_sdk, version: 4.4.5} toolchain_settings: [] component: -- {id: zigbee_ota_storage_simple_eeprom} -- {id: zigbee_ota_client} -- {id: slot_manager} -- instance: [btn0, btn1] - id: simple_button -- {id: power_manager_deepsleep} +- {from: raz1_custom_components, id: power_configuration_server} +- {from: raz1_custom_components, id: rz_button_press} +- {from: raz1_custom_components, id: rz_led_blink} +- {id: EFR32MG12P332F1024GL125} +- {id: app_button_press} +- {id: brd4166a} +- {id: brd4166a_support} - instance: [example] id: cli -- {id: brd4166a} -- {id: zigbee_ota_client_policy} -- {id: zigbee_pro_leaf_stack} -- {id: zigbee_end_device_support} -- {id: zigbee_application_bootloader} -- {id: zigbee_color_control_server} -- {id: EFR32MG12P332F1024GL125} +- {id: imu_driver} - {id: iostream_recommended_stream} -- {id: zigbee_scenes} -- {id: zigbee_gp} +- {id: power_manager_deepsleep} +- {id: sensor_hall} +- {id: sensor_rht} +- {id: si70xx_driver} +- {id: si7210_driver} +- instance: [btn0, btn1] + id: simple_button - instance: [led0] id: simple_led -- {id: zigbee_zcl_framework_core} -- {id: zigbee_stack_diagnostics} -- {id: zigbee_network_steering} -- {id: zigbee_find_and_bind_target} -- {id: zigbee_zll_scenes_server} -- {id: brd4166a_support} -- {id: zigbee_level_control} -- {id: zigbee_counters} -- {id: zigbee_identify} -- {id: zigbee_green_power_common} - instance: [rgb_led0] id: simple_rgb_pwm_led +- {id: slot_manager} +- {id: zigbee_application_bootloader} - {id: zigbee_basic} -- {id: zigbee_ota_storage_simple} -- {id: app_button_press} -- {id: zigbee_zll_on_off_server} -- {id: zigbee_ota_bootload} +- {id: zigbee_color_control_server} +- {id: zigbee_counters} +- {id: zigbee_debug_print} +- {id: zigbee_end_device_support} +- {id: zigbee_find_and_bind_target} +- {id: zigbee_gp} - {id: zigbee_green_power_client} -- {id: zigbee_scan_dispatch} +- {id: zigbee_green_power_common} - {id: zigbee_groups_server} -- {id: zigbee_zll} +- {id: zigbee_identify} +- {id: zigbee_level_control} +- {id: zigbee_network_steering} - {id: zigbee_on_off} +- {id: zigbee_ota_bootload} +- {id: zigbee_ota_client} +- {id: zigbee_ota_client_policy} +- {id: zigbee_ota_storage_simple} +- {id: zigbee_ota_storage_simple_eeprom} +- {id: zigbee_pro_leaf_stack} - {id: zigbee_r22_support} -- {id: zigbee_debug_print} - {id: zigbee_reporting} -- {id: si7210_driver} -- {id: sensor_hall} -- {id: si70xx_driver} -- {id: sensor_rht} -- {id: imu_driver} -- {from: raz1_custom_components, id: power_configuration_server} -- {from: raz1_custom_components, id: rz_led_blink} -- {from: raz1_custom_components, id: rz_button_press} +- {id: zigbee_scan_dispatch} +- {id: zigbee_scenes} +- {id: zigbee_stack_diagnostics} +- {id: zigbee_zcl_framework_core} +- {id: zigbee_zll} +- {id: zigbee_zll_on_off_server} +- {id: zigbee_zll_scenes_server} config_file: - {path: config/zcl/zcl_config.zap, directory: zcl} configuration: - {name: SL_BOARD_ENABLE_VCOM, value: '1'} - {name: SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE, value: usartHwFlowControlNone} +- {name: SL_IOSTREAM_USART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION, value: 0} - {name: SL_CLI_MAX_INPUT_ARGUMENTS, value: '16'} - {name: SLI_ZIGBEE_PRIMARY_NETWORK_DEVICE_TYPE, value: SLI_ZIGBEE_NETWORK_DEVICE_TYPE_END_DEVICE} - {name: SLI_ZIGBEE_PRIMARY_NETWORK_SECURITY_TYPE, value: SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0} - {name: SL_CLI_PROMPT_STRING, value: '"TBS2Torch>"'} +- {name: EMBER_BINDING_TABLE_SIZE, value: 32} +- name: EMBER_AF_REJOIN_ATTEMPTS_MAX + value: 32 + condition: [zigbee_end_device_support] +- name: SL_ZIGBEE_APP_FRAMEWORK_STAY_AWAKE_WHEN_NOT_JOINED + value: 0 +- name: EMBER_END_DEVICE_POLL_TIMEOUT + value: MINUTES_64 + condition: [zigbee_pro_leaf_stack] +- name: EMBER_AF_PLUGIN_OTA_CLIENT_IGNORE_NON_TRUST_CENTER + value: 1 + condition: [zigbee_ota_client] +- name: EMBER_AF_PLUGIN_OTA_CLIENT_QUERY_DELAY_MINUTES + value: 60 + condition: [zigbee_ota_client] +- name: EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID + value: 2285 + condition: [zigbee_ota_client] +- name: EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION + value: 230805000 + condition: [zigbee_ota_client] - condition: [device_series_1] name: NVM3_DEFAULT_NVM_SIZE value: '36864' @@ -113,9 +135,46 @@ configuration: - {name: SL_PSA_ITS_SUPPORT_V1_DRIVER, value: '0'} - {name: SL_PSA_ITS_SUPPORT_V2_DRIVER, value: '0'} - {name: SL_PSA_ITS_SUPPORT_V3_DRIVER, value: '1'} +- name: MEDIUM_BUTTON_PRESS_DURATION + value: 1000 + condition: [app_button_press] +- name: SL_BOARD_ENABLE_SENSOR_HALL + value: 1 + condition: [brd4166a] +- name: SL_BOARD_ENABLE_SENSOR_IMU + value: 1 + condition: [brd4166a] +- name: SL_BOARD_ENABLE_SENSOR_RHT + value: 1 + condition: [brd4166a] +- name: EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE + value: 16 + condition: [zigbee_reporting] +- name: EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_GECKO_BOOTLOADER_STORAGE_SUPPORT + value: USE_FIRST_SLOT + condition: [slot_manager] +- name: EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_END + value: 262144 + condition: [slot_manager] +- name: SL_POWER_CONFIGURATION_BATTERY_TYPE + value: SL_POWER_CONFIGURATION_BATTERY_TYPE_18650 + condition: [power_configuration_server] +- name: RZ_BUTTON_PRESS_TIMEOUT_MS + value: 700 + condition: [rz_button_press] +- name: SL_BATTERY_MONITOR_R_DIVIDER_ENABLED + value: 1 + condition: [power_configuration_server] +- name: SL_BATTERY_MONITOR_R_DIVIDER_R1 + value: 1800 + condition: [power_configuration_server] +- name: SL_BATTERY_MONITOR_R_DIVIDER_R2 + value: 2700 + condition: [power_configuration_server] ui_hints: highlight: - {path: '', focus: true} - {path: readme.html} sdk_extension: -- {id: raz1_custom_components, version: 0.0.1} +- {id: raz1_custom_components, version: 0.0.2} + diff --git a/TBS2Torch/app.c b/TBS2Torch/app.c index a900e60..dfbb5c0 100644 --- a/TBS2Torch/app.c +++ b/TBS2Torch/app.c @@ -1,436 +1,377 @@ -/***************************************************************************//** - * @file app.c - * @brief Callbacks implementation and application specific code. - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -#include "stdio.h" -#include "string.h" - -#include "app/framework/include/af.h" -#include "app/framework/include/af-types.h" -#include "zap-command-structs.h" -#include "app_button_press.h" -#include "sl_component_catalog.h" - -#ifdef SL_CATALOG_ZIGBEE_NETWORK_TEST_PRESENT -#include "network_test_config.h" -#endif //SL_CATALOG_ZIGBEE_NETWORK_TEST_PRESENT - -#ifdef SL_CATALOG_ZIGBEE_ZLL_LEVEL_CONTROL_SERVER_PRESENT -#include "zll-level-control-server.h" -#define MIN_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MAXIMUM_LEVEL -#else // !SL_CATALOG_ZIGBEE_ZLL_LEVEL_CONTROL_SERVER_PRESENT -#include "level-control-config.h" -#define MIN_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL -#endif // SL_CATALOG_ZIGBEE_ZLL_LEVEL_CONTROL_SERVER_PRESENT - -#if (LARGE_NETWORK_TESTING == 0) -#ifndef EZSP_HOST -#include "config/zigbee_sleep_config.h" -#endif // EZSP_HOST - -#include "config/ota-client-policy-config.h" -#include "hw/drivers.h" -#include "app-global.h" -#include "handlers/network.h" -#include "handlers/hall.h" -#include "handlers/rht.h" -#include "handlers/shaker.h" - - -/******************** - * local handlers - *******************/ -static void btn0_short_press_handler(); -static void btn0_short_multiple_press_handler(uint8_t count); -static void btn0_medium_press_handler(); -static void btn0_long_press_handler(); -static void btn1_short_press_handler(); -static void btn1_short_multiple_press_handler(uint8_t count); -static void btn1_medium_press_handler(); -static void btn1_long_press_handler(); - -//---------------------- -// Implemented Callbacks - -/** @brief Init - * Application init function - */ -void emberAfMainInitCallback(void) -{ - networkHandlersInit(); - handlerRhtInit(); - sl_status_t status = handlerHallInit(); - sl_zigbee_app_debug_println("Hall Sensor init status: 0x%02x", status); - handlerShakerInit(); - emberSetPowerDescriptor(ZDO_POWER_DESCRIPTOR); -} - -/** @brief Post Attribute Change - * - * This function is called by the application framework after it changes an - * attribute value. The value passed into this callback is the value to which - * the attribute was set by the framework. - */ -void emberAfPostAttributeChangeCallback(uint8_t endpoint, - EmberAfClusterId clusterId, - EmberAfAttributeId attributeId, - uint8_t mask, - uint16_t manufacturerCode, - uint8_t type, - uint8_t size, - uint8_t* value) -{ - if (clusterId == ZCL_ON_OFF_CLUSTER_ID - && attributeId == ZCL_ON_OFF_ATTRIBUTE_ID - && mask == CLUSTER_MASK_SERVER) { - bool onOff; - if (emberAfReadServerAttribute(endpoint, - ZCL_ON_OFF_CLUSTER_ID, - ZCL_ON_OFF_ATTRIBUTE_ID, - (uint8_t *)&onOff, - sizeof(onOff)) - == EMBER_ZCL_STATUS_SUCCESS) { - if (onOff) { - hal_rgb_led_turnon(); - } else { - hal_rgb_led_turnoff(); - } - } - } else if (clusterId == ZCL_LEVEL_CONTROL_CLUSTER_ID - && attributeId == ZCL_CURRENT_LEVEL_ATTRIBUTE_ID - && mask == CLUSTER_MASK_SERVER) { - uint8_t level; - if (emberAfReadServerAttribute(endpoint, - clusterId, - attributeId, - (uint8_t *) &level, - sizeof(level)) - == EMBER_ZCL_STATUS_SUCCESS) { - sl_zigbee_app_debug_println("Level from the attr read: %d, level from post attr change: %d", level, (uint8_t) *value); - hal_rgb_led_set_brightness(CLAMP(level, MIN_LEVEL, MAX_LEVEL)); - } - } -} - -/** @brief On/off Cluster Server Post Init - * - * Following resolution of the On/Off state at startup for this endpoint, perform any - * additional initialization needed; e.g., synchronize hardware state. - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint) -{ - // At startup, trigger a read of the attribute and possibly a toggle of the - // LED to make sure they are always in sync. - emberAfPostAttributeChangeCallback(endpoint, - ZCL_ON_OFF_CLUSTER_ID, - ZCL_ON_OFF_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, - 0, - 0, - 0, - NULL); - handlerRhtUpdate(); -} - -/** @brief - * - * Application framework equivalent of ::emberRadioNeedsCalibratingHandler - */ -void emberAfRadioNeedsCalibratingCallback(void) -{ - #ifndef EZSP_HOST - sl_mac_calibrate_current_channel(); - #endif -} - - -/** @brief Shaking Callback for Stop - * - * @note Called when shaking stops. If shaking was shorter than 1s, - * consider it as a toggle command - * - * @param durationMs duration of shaking in MS - */ -void handlerShakerShakingStop(uint32_t durationMs) { - if ( (700 < durationMs) && (durationMs < 1600) ) { - sl_zigbee_app_debug_println("Toggling light on short shake of %dms", - durationMs); - emberAfOnOffClusterSetValueCallback(emberAfPrimaryEndpoint(), - ZCL_TOGGLE_COMMAND_ID, - false); - } -} - - -/** @brief Button short duration press callback - * - * Called after repeated or single presses for a button - * - * @param button Button number - * @param pressedTimes Button was pressed so many times in quick succession - */ -void rz_button_short_press_cb(uint8_t button) -{ - sl_zigbee_app_debug_println("Short button press hander for button %d", - button); - switch (button) { - case 0: - btn0_short_press_handler(); - break; - - case 1: - btn1_short_press_handler(); - break; - } -} - - -/************************ - * btn0 short press hander: - * - on/off on short press - * - * @param counter - */ -static void btn0_short_press_handler() -{ - emberAfOnOffClusterSetValueCallback(emberAfPrimaryEndpoint(), ZCL_TOGGLE_COMMAND_ID, false); -} - -static void btn1_short_press_handler() -{ - networkHandlersFindAndBind(); - #ifdef SL_CATALOG_ZIGBEE_FORCE_SLEEP_AND_WAKEUP_PRESENT - sl_zigbee_app_framework_force_wakeup(); - #endif //SL_CATALOG_ZIGBEE_FORCE_SLEEP_AND_WAKEUP_PRESENT -} - -/** @brief Button medium duration press callback - * - * Called for medium duration presses - * - * @param button Button number - */ -void rz_button_medium_press_cb(uint8_t button) -{ - sl_zigbee_app_debug_println("Medium duration button press hander for button %d", - button); - - switch (button) { - case 0: - btn0_medium_press_handler(); - break; - - case 1: - break; - } -}; - - -/** @brief medium press handler for btn0 - * - * On medium press do a fadein/fadeout depending on the current on off state - * - */ -static void btn0_medium_press_handler(void) -{ - // medium press will toggle with fadein/fadeout - EmberAfStatus status; - bool isStateOn; - status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), - ZCL_ON_OFF_CLUSTER_ID, - ZCL_ON_OFF_ATTRIBUTE_ID, - (uint8_t *) &isStateOn, - sizeof(isStateOn)); - if (status != EMBER_ZCL_STATUS_SUCCESS) { - sl_zigbee_app_debug_println("Couldn't read current 'on/off' state to do fadein/fadeout"); - return; - } - - // Get transition time on/off attribute - uint16_t transitionTime; - status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, - (uint8_t *) &transitionTime, - sizeof(transitionTime)); - if (status != EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) { - // Get On transition time or off Transition time, - // if on_off_transition_time is not supported - uint16_t attributeToGet; - - if (isStateOn) { - attributeToGet = ZCL_ON_TRANSITION_TIME_ATTRIBUTE_ID; - } else { - attributeToGet = ZCL_OFF_TRANSITION_TIME_ATTRIBUTE_ID; - } - status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), - ZCL_LEVEL_CONTROL_CLUSTER_ID, - attributeToGet, - (uint8_t *) &transitionTime, - sizeof(transitionTime)); - if (status != EMBER_ZCL_STATUS_SUCCESS - || transitionTime == 0x0000) { - transitionTime = (isStateOn) ? FADEIN_TRANSITION_TIME : FADEOUT_TRANSITION_TIME; - } - } - - uint8_t targetLevel; - if (isStateOn) { - // we'll be transitioning to off state smoothly, as defined in app config - targetLevel = MIN_LEVEL; - } else { - // we'll be transitioning to on level smoothly, as defined in app config2 - status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_ON_LEVEL_ATTRIBUTE_ID, - (uint8_t *) &targetLevel, - sizeof(targetLevel)); - if (status != EMBER_ZCL_STATUS_SUCCESS - || targetLevel == 0xFF) { - status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, - (uint8_t *) &targetLevel, - sizeof(targetLevel)); - } - if (status != EMBER_ZCL_STATUS_SUCCESS || targetLevel == 0x00) { - targetLevel = MAX_LEVEL; - } - } - - // control fade in/fade out by a fake command data - uint8_t cmd_data[3]; - EmberAfClusterCommand cmd; - cmd.buffer = (uint8_t *) &cmd_data; - cmd.bufLen = sizeof(3); - cmd.clusterSpecific = true; - cmd.commandId = ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID; - cmd.payloadStartIndex = 0; - - cmd_data[0] = targetLevel; - emberAfCopyInt16u(cmd_data + 1, 0, transitionTime); - - emberAfLevelControlClusterMoveToLevelWithOnOffCallback(&cmd); -} - -/** @brief Button long duration press callback - * - * Called for medium duration presses - * - * @param button Button number - */ -void rz_button_long_press_cb(uint8_t button) -{ - sl_zigbee_app_debug_println("Long duration button press hander for button %d", - button); - - switch (button) { - case 0: - btn0_long_press_handler(); - break; - - case 1: - btn1_long_press_handler(); - break; - } -}; - - -/** @brief BTN0 Long press handler - * - * On Long press, set the color to white - * - */ -static void btn0_long_press_handler(void) -{ - EmberAfStatus status; - uint8_t currentLevel; - status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, - (uint8_t *) ¤tLevel, - sizeof(currentLevel)); - if (status != EMBER_ZCL_STATUS_SUCCESS) { - sl_zigbee_app_debug_println("Couldn't read current 'current level' state to do fadein/fadeout"); - return; - } - // ToDo: update current_x, current_y - currentLevel = (currentLevel == 0x00) ? 1 : currentLevel; - hal_rgb_led_set_rgbcolor(currentLevel, currentLevel, currentLevel); -} - - -/** @brief BTN1 Long press handler - * - * On Long press, leave network - * - */ -static void btn1_long_press_handler(void) -{ - networkHandlersLeaveNetwork(); -} - - -//Internal testing stuff -#if defined(EMBER_TEST) -void emberAfHalButtonIsrCallback(uint8_t button, uint8_t state) -{ - if (state == BUTTON_RELEASED) { - sl_zigbee_event_set_active(&finding_and_binding_event); - } -} -#endif // EMBER_TEST - -#ifdef SL_CATALOG_ZIGBEE_FORCE_SLEEP_AND_WAKEUP_PRESENT -void sli_zigbee_app_framework_force_sleep_callback(void) -{ - // Do other things like turn off LEDs etc - sl_led_turn_off(&sl_led_led0); -} -#endif // SL_CATALOG_ZIGBEE_FORCE_SLEEP_AND_WAKEUP_PRESENT -#endif //#if (LARGE_NETWORK_TESTING == 0) - -void sl_zigbee_common_rtos_wakeup_stack_task() -{ -}; - - -void emberAfPluginLevelControlClusterServerPostInitCallback(uint8_t endpoint) -{ - uint8_t level; - if (emberAfReadServerAttribute(endpoint, - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, - (uint8_t *) &level, - sizeof(level)) - == EMBER_ZCL_STATUS_SUCCESS) { - sl_zigbee_app_debug_println("Current level is %d", level); - } - - // hardware state sync - emberAfPostAttributeChangeCallback(endpoint, - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, - 0, - 0, - 0, - NULL); -}; +/***************************************************************************//** + * @file app.c + * @brief Callbacks implementation and application specific code. + ******************************************************************************* + * # License + * Copyright 2021 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * 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. + * + ******************************************************************************/ + +#include "stdio.h" +#include "string.h" + +#include "app/framework/include/af.h" +#include "app/framework/include/af-types.h" +#include "zap-command-structs.h" +#include "app_button_press.h" +#include "sl_component_catalog.h" + +#ifdef SL_CATALOG_ZIGBEE_NETWORK_TEST_PRESENT +#include "network_test_config.h" +#endif //SL_CATALOG_ZIGBEE_NETWORK_TEST_PRESENT + +#ifdef SL_CATALOG_ZIGBEE_ZLL_LEVEL_CONTROL_SERVER_PRESENT +#include "zll-level-control-server.h" +#define MIN_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MINIMUM_LEVEL +#define MAX_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MAXIMUM_LEVEL +#else // !SL_CATALOG_ZIGBEE_ZLL_LEVEL_CONTROL_SERVER_PRESENT +#include "level-control-config.h" +#define MIN_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL +#define MAX_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL +#endif // SL_CATALOG_ZIGBEE_ZLL_LEVEL_CONTROL_SERVER_PRESENT + +#ifndef EZSP_HOST +#include "config/zigbee_sleep_config.h" +#endif // EZSP_HOST + +#include "rz_led_blink.h" +#include "rz_button.h" +#include "config/ota-client-policy-config.h" +#include "hw/drivers.h" +#include "app-global.h" +#include "handlers/network.h" +#include "handlers/hall.h" +#include "handlers/rht.h" +#include "handlers/shaker.h" + + +/******************** + * local handlers + *******************/ +static void btn0_short_press_handler(); +static void btn0_short_multiple_press_handler(uint8_t count); +static void btn0_medium_press_handler(); +static void btn0_long_press_handler(); +static void btn1_short_press_handler(); +static void btn1_short_multiple_press_handler(uint8_t count); +static void btn1_medium_press_handler(); +static void btn1_long_press_handler(); + +//---------------------- +// Implemented Callbacks + +/** @brief Init + * Application init function + */ +void emberAfMainInitCallback(void) +{ + rz_led_blink_init(); + rz_button_init(); + networkHandlersInit(); + handlerRhtInit(); + sl_status_t status = handlerHallInit(); + sl_zigbee_app_debug_println("Hall Sensor init status: 0x%02x", status); + handlerShakerInit(); + emberSetPowerDescriptor(ZDO_POWER_DESCRIPTOR); +} + +/** @brief Post Attribute Change + * + * This function is called by the application framework after it changes an + * attribute value. The value passed into this callback is the value to which + * the attribute was set by the framework. + */ +void emberAfPostAttributeChangeCallback(uint8_t endpoint, + EmberAfClusterId clusterId, + EmberAfAttributeId attributeId, + uint8_t mask, + uint16_t manufacturerCode, + uint8_t type, + uint8_t size, + uint8_t* value) +{ + //sl_zigbee_app_debug_print("%d Post attr change: ep: %d, cluster: 0x%04x, attr: 0x%04x, size: %d ", + // TIMESTAMP_MS, endpoint, clusterId, attributeId, size); + //if ( size == 2 ) { + // sl_zigbee_app_debug_println("value: 0x%02x%02x", value[1], value[0]); + //} else { + // sl_zigbee_app_debug_println("value: 0x%02x", value[0]); + //} + + if (clusterId == ZCL_LEVEL_CONTROL_CLUSTER_ID + && mask == CLUSTER_MASK_SERVER) { + if (attributeId == ZCL_CURRENT_LEVEL_ATTRIBUTE_ID) { + hal_rgb_led_set_brightness(CLAMP(value[0], MIN_LEVEL, MAX_LEVEL)); + } else if ( attributeId == ZCL_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE_ID ) { + // get the supposed on/off state + uint8_t onOff; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, + ZCL_ON_OFF_CLUSTER_ID, + ZCL_ON_OFF_ATTRIBUTE_ID, + (uint8_t *) &onOff, + sizeof(onOff)); + if ( status != EMBER_ZCL_STATUS_SUCCESS ) { + sl_zigbee_app_debug_println("Couldn't read current 'on/off' state: %s, forcing light off"); + hal_rgb_led_turnoff(); + return; + } + // update on/off state, since we obviously either transitioning or finished + // transitioning + assert( 2 == size ); + if ( onOff || ( (value[0] == 0) && (value[1] == 0) ) ) { + hal_rgb_led_turnonoff(onOff); + } + } + } +} + +/** @brief On/off Cluster Server Post Init + * + * Following resolution of the On/Off state at startup for this endpoint, perform any + * additional initialization needed; e.g., synchronize hardware state. + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint) +{ + handlerRhtUpdate(); +} + +/** @brief + * + * Application framework equivalent of ::emberRadioNeedsCalibratingHandler + */ +void emberAfRadioNeedsCalibratingCallback(void) +{ + #ifndef EZSP_HOST + sl_mac_calibrate_current_channel(); + #endif +} + + +/** @brief Shaking Callback for Stop + * + * @note Called when shaking stops. If shaking was shorter than 1s, + * consider it as a toggle command + * + * @param durationMs duration of shaking in MS + */ +void handlerShakerShakingStop(uint32_t durationMs) { + if ( (700 < durationMs) && (durationMs < 1600) ) { + sl_zigbee_app_debug_println("Toggling light on short shake of %dms", + durationMs); + btn0_short_press_handler(); + } +} + + +/** @brief Button short duration press callback + * + * Called after repeated or single presses for a button + * + * @param button Button number + * @param pressedTimes Button was pressed so many times in quick succession + */ +void rz_button_short_press_cb(uint8_t button) +{ + sl_zigbee_app_debug_println("Short button press hander for button %d", + button); + switch (button) { + case 0: + btn0_short_press_handler(); + break; + + case 1: + btn1_short_press_handler(); + break; + } +} + + +/************************ + * btn0 short press hander: + * - on/off on short press + * + * @param counter + */ +static void btn0_short_press_handler() +{ + emberAfSetCommandEndpoints(emberAfPrimaryEndpoint(), emberAfPrimaryEndpoint()); + emberAfFillCommandOnOffClusterToggle(); + EmberStatus status = emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, emberAfGetNodeId()); + sl_zigbee_app_debug_println("Toggle command sent, status: 0x%02x", status); +} + +static void btn1_short_press_handler() +{ + networkHandlersFindAndBind(); + #ifdef SL_CATALOG_ZIGBEE_FORCE_SLEEP_AND_WAKEUP_PRESENT + sl_zigbee_app_framework_force_wakeup(); + #endif //SL_CATALOG_ZIGBEE_FORCE_SLEEP_AND_WAKEUP_PRESENT +} + +/** @brief Button medium duration press callback + * + * Called for medium duration presses + * + * @param button Button number + */ +void rz_button_medium_press_cb(uint8_t button) +{ + sl_zigbee_app_debug_println("Medium duration button press hander for button %d", + button); + + switch (button) { + case 0: + btn0_medium_press_handler(); + break; + + case 1: + break; + } +}; + + +/** @brief medium press handler for btn0 + * + * On medium press do a fadein/fadeout depending on the current on off state + * + */ +static void btn0_medium_press_handler(void) +{ + // medium press will toggle with fadein/fadeout + EmberAfStatus status; + bool isStateOn; + status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), + ZCL_ON_OFF_CLUSTER_ID, + ZCL_ON_OFF_ATTRIBUTE_ID, + (uint8_t *) &isStateOn, + sizeof(isStateOn)); + if (status != EMBER_ZCL_STATUS_SUCCESS) { + sl_zigbee_app_debug_println("Couldn't read current 'on/off' state to do fadein/fadeout"); + return; + } + + // Get transition time on/off attribute + uint16_t transitionTime = 50; + uint8_t targetLevel = MIN_LEVEL; + if ( !isStateOn) { + // we'll be transitioning to on level smoothly, as defined in app config2 + status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), + ZCL_LEVEL_CONTROL_CLUSTER_ID, + ZCL_ON_LEVEL_ATTRIBUTE_ID, + (uint8_t *) &targetLevel, + sizeof(targetLevel)); + if (status != EMBER_ZCL_STATUS_SUCCESS + || targetLevel == 0xFF) { + status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), + ZCL_LEVEL_CONTROL_CLUSTER_ID, + ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, + (uint8_t *) &targetLevel, + sizeof(targetLevel)); + } + if (status != EMBER_ZCL_STATUS_SUCCESS || targetLevel == 0x00) { + targetLevel = MAX_LEVEL; + } + // we're off, so put the minimum level to start the fadein + uint8_t resetLevel = MIN_LEVEL; + emberAfWriteServerAttribute(emberAfPrimaryEndpoint(), + ZCL_LEVEL_CONTROL_CLUSTER_ID, + ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, + (uint8_t *) &resetLevel, + ZCL_INT8U_ATTRIBUTE_TYPE); + } + + // control fade in/fade out by a fake command data + emberAfSetCommandEndpoints(emberAfPrimaryEndpoint(), emberAfPrimaryEndpoint()); + emberAfFillCommandLevelControlClusterMoveToLevelWithOnOff( + targetLevel, transitionTime); + status = emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, emberAfGetNodeId()); + sl_zigbee_app_debug_println("Move to level %d cmd sent, status: 0x%02x", targetLevel, status); +} + +/** @brief Button long duration press callback + * + * Called for medium duration presses + * + * @param button Button number + */ +void rz_button_long_press_cb(uint8_t button) +{ + sl_zigbee_app_debug_println("Long duration button press hander for button %d", + button); + + switch (button) { + case 0: + btn0_long_press_handler(); + break; + + case 1: + btn1_long_press_handler(); + break; + } +}; + + +/** @brief BTN0 Long press handler + * + * On Long press, set the color to white + * + */ +static void btn0_long_press_handler(void) +{ + EmberAfStatus status; + uint8_t currentLevel; + status = emberAfReadServerAttribute(emberAfPrimaryEndpoint(), + ZCL_LEVEL_CONTROL_CLUSTER_ID, + ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, + (uint8_t *) ¤tLevel, + sizeof(currentLevel)); + if (status != EMBER_ZCL_STATUS_SUCCESS) { + sl_zigbee_app_debug_println("Couldn't read current 'current level' state to do fadein/fadeout"); + return; + } + // ToDo: update current_x, current_y + currentLevel = (currentLevel == 0x00) ? 1 : currentLevel; + hal_rgb_led_set_rgbcolor(currentLevel, currentLevel, currentLevel); +} + + +/** @brief BTN1 Long press handler + * + * On Long press, leave network + * + */ +static void btn1_long_press_handler(void) +{ + networkHandlersLeaveNetwork(); +} + +void sl_zigbee_common_rtos_wakeup_stack_task() +{ +}; + + +void emberAfPluginLevelControlClusterServerPostInitCallback(uint8_t endpoint) +{ + uint16_t remainingTime = 0; + sl_zigbee_app_debug_println("%d Level Control cluster initialized.", TIMESTAMP_MS); + + // hardware state sync + emberAfPostAttributeChangeCallback(endpoint, + ZCL_LEVEL_CONTROL_CLUSTER_ID, + ZCL_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE_ID, + CLUSTER_MASK_SERVER, + 0, + ZCL_INT16U_ATTRIBUTE_TYPE, + sizeof(remainingTime), + (uint8_t *) &remainingTime); +}; diff --git a/TBS2Torch/config/app-global.h b/TBS2Torch/config/app-global.h index a9a1730..264edee 100644 --- a/TBS2Torch/config/app-global.h +++ b/TBS2Torch/config/app-global.h @@ -1,24 +1,27 @@ -/* - * app-global.h - * - * Created on: May 21, 2023 - * Author: achetroi - */ - -#ifndef CONFIG_APP_GLOBAL_H_ -#define CONFIG_APP_GLOBAL_H_ - -#define MAX(a, b) (a > b) ? a : b -#define MIN(a, b) (a < b) ? a : b -#define CLAMP(v, min, max) MIN(MAX(v, min), max) - -// Fade out transition time in 10th of sec -#define FADEOUT_TRANSITION_TIME 5*10 -// Fade in transition time in 10th of sec -#define FADEIN_TRANSITION_TIME 5*10 - -#ifndef ZDO_POWER_DESCRIPTOR -#define ZDO_POWER_DESCRIPTOR 0x0220 -#endif // ZDO_POWER_DESCRIPTOR - -#endif /* CONFIG_APP_GLOBAL_H_ */ +/* + * app-global.h + * + * Created on: May 21, 2023 + * Author: achetroi + */ + +#ifndef CONFIG_APP_GLOBAL_H_ +#define CONFIG_APP_GLOBAL_H_ + +#include "sl_sleeptimer.h" +#define TIMESTAMP_MS (sl_sleeptimer_tick_to_ms(sl_sleeptimer_get_tick_count())) + +#define MAX(a, b) (a > b) ? a : b +#define _MIN(a, b) (a < b) ? a : b +#define CLAMP(v, min, max) _MIN(MAX(v, min), max) + +// Fade out transition time in 10th of sec +#define FADEOUT_TRANSITION_TIME 5*10 +// Fade in transition time in 10th of sec +#define FADEIN_TRANSITION_TIME 5*10 + +#ifndef ZDO_POWER_DESCRIPTOR +#define ZDO_POWER_DESCRIPTOR 0x0220 +#endif // ZDO_POWER_DESCRIPTOR + +#endif /* CONFIG_APP_GLOBAL_H_ */ diff --git a/TBS2Torch/config/app_assert_config.h b/TBS2Torch/config/app_assert_config.h deleted file mode 100644 index 81d60f1..0000000 --- a/TBS2Torch/config/app_assert_config.h +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Application assert configuration - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 APP_ASSERT_CONFIG_H -#define APP_ASSERT_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Assert component -// Enables Assert. -#define APP_ASSERT_ENABLE 1 - -// Logging -// Enables logging for assert. -#define APP_ASSERT_LOG_ENABLE 1 - -// Enable trace -// Enables trace for assert. -#define APP_ASSERT_TRACE_ENABLE 1 - -// - -// - -// <<< end of configuration section >>> - -#endif // APP_ASSERT_CONFIG_H diff --git a/TBS2Torch/config/app_button_press_config.h b/TBS2Torch/config/app_button_press_config.h deleted file mode 100644 index fc1fc1a..0000000 --- a/TBS2Torch/config/app_button_press_config.h +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************//** - * @file - * @brief - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 APP_BUTTON_PRESS_CONFIG_H_ -#define APP_BUTTON_PRESS_CONFIG_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Duration of Short button presses -// Default: 250 -// Any button press shorter than this value will be considered SHORT_BUTTON_PRESS. -#define SHORT_BUTTON_PRESS_DURATION (250) - -// Duration of MEDIUM button presses -// Default: 1000 -// Any button press shorter than this value and longer SHORT_BUTTON_PRESS than will -// be considered MEDIUM_BUTTON_PRESS. -#define MEDIUM_BUTTON_PRESS_DURATION 1500 - -// Duration of LONG button presses -// Default: 5000 -// Any button press shorter than this value and longer MEDIUM_BUTTON_PRESS than will -// be consideredLONG_BUTTON_PRESS. Any button press longer than this value will be -// considered VERY_LONG_BUTTON_PRESS -#define LONG_BUTTON_PRESS_DURATION (5000) - -// <<< end of configuration section >>> - -#endif // APP_BUTTON_PRESS_CONFIG_H_ diff --git a/TBS2Torch/config/app_properties_config.h b/TBS2Torch/config/app_properties_config.h deleted file mode 100644 index 6a6b976..0000000 --- a/TBS2Torch/config/app_properties_config.h +++ /dev/null @@ -1,65 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Application Properties Header File - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 APP_PROPERTIES_CONFIG_H -#define APP_PROPERTIES_CONFIG_H - -#include "sl_application_type.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// App Properties settings - -// Type of signature this application is signed with -// Default: APPLICATION_SIGNATURE_NONE(0) -#define SL_APPLICATION_SIGNATURE 0 - -// Location of the signature -// Default: 0xFFFFFFFF -#define SL_APPLICATION_SIGNATURE_LOCATION 0xFFFFFFFF - -// Bitfield representing type of application -#define SL_APPLICATION_TYPE APPLICATION_TYPE - -// Version number for this application -// <0-4294967295:1> -// Default: 1 [0-4294967295] -#define SL_APPLICATION_VERSION 1 - -// Capabilities of this application -// Default: 0 -#define SL_APPLICATION_CAPABILITIES 0 - -//Product ID of the device for which the application is built -#define SL_APPLICATION_PRODUCT_ID { 0 } - -// - -#endif // APP_PROPERTIES_CONFIG_H diff --git a/TBS2Torch/config/btl_interface_cfg.h b/TBS2Torch/config/btl_interface_cfg.h deleted file mode 100644 index 8e246f8..0000000 --- a/TBS2Torch/config/btl_interface_cfg.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header of Bootloader Interface - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ -#ifndef BTL_INTERFACE_CFG_H -#define BTL_INTERFACE_CFG_H - -#if !defined(BOOTLOADER_APPLOADER) - -#if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_1) -#include "btl_interface_cfg_s2c1.h" -#endif - -#if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_2) -#include "btl_interface_cfg_s2c2.h" -#endif - -#if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_3) -#include "btl_interface_cfg_s2c3.h" -#endif - -#if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_4) -#include "btl_interface_cfg_s2c4.h" -#endif - -#if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_5) -#define BOOTLOADER_DISABLE_OLD_BOOTLOADER_MITIGATION 1 -#endif - -#if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_8) -#define BOOTLOADER_DISABLE_OLD_BOOTLOADER_MITIGATION 1 -#endif - -#endif // !BOOTLOADER_APPLOADER - -#endif // BTL_INTERFACE_CFG_H diff --git a/TBS2Torch/config/color-control-server-config.h b/TBS2Torch/config/color-control-server-config.h deleted file mode 100644 index a8b7f15..0000000 --- a/TBS2Torch/config/color-control-server-config.h +++ /dev/null @@ -1,68 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Color Control Cluster Server component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Color Control Cluster Server configuration - -// CIE 1931 -// Default: TRUE -// Support CIE 1931 Commands. Note: selecting this option requires the current X and current Y attributes be selected. Also, a default report table entries will be created for these attributes. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_XY 1 - -// Color Temperature -// Default: TRUE -// Support Color Temperature Commands. Note: selecting this option requires the color temperature attribute be selected. Also, a default report table entries will be created for this attribute. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP 1 - -// Hue Saturation -// Default: TRUE -// Support Hue Saturation Commands. Note: selecting this option requires the current hue and current saturation attributes be selected. Also, a default report table entry will be created for these attributes. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV 1 - -// Min Reporting Interval <1-65535> -// Default: 1 -// Default minimum Reporting Interval in Seconds for the color control server. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_MIN_REPORT_INTERVAL 1 - -// Max Reporting Interval <1-65535> -// Default: 65535 -// Default maximum Reporting Interval in Seconds for the color control server. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_MAX_REPORT_INTERVAL 65535 - -// Color XY Reportable Change <1-65535> -// Default: 1 -// Default minimum reportable change for the colorX and colorY attributes. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_COLOR_XY_CHANGE 1 - -// Color Temperature Reportable Change <1-65535> -// Default: 1 -// Default minimum reportable change for the color temperature attribute. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_COLOR_TEMP_CHANGE 1 - -// Hue Reportable Change <1-255> -// Default: 1 -// Default minimum reportable change for the hue attribute. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HUE_CHANGE 1 - -// Saturation Reportable Change <1-255> -// Default: 1 -// Default minimum reportable change for the saturation attribute. -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_SATURATION_CHANGE 1 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/counters-config.h b/TBS2Torch/config/counters-config.h deleted file mode 100644 index 3bcc3df..0000000 --- a/TBS2Torch/config/counters-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Counters component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Counters configuration - -// Retrieve counters over the air -// Default: FALSE -// This will provide the ability to retreive counters over the air -#define EMBER_AF_PLUGIN_COUNTERS_OTA 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/dmadrv_config.h b/TBS2Torch/config/dmadrv_config.h deleted file mode 100644 index 9aa48db..0000000 --- a/TBS2Torch/config/dmadrv_config.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef DMADRV_CONFIG_H -#define DMADRV_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// DMA interrupt priority <0-7> -// Priority of the DMA interrupt. Smaller number equals higher priority. -// Default: 4 -#define EMDRV_DMADRV_DMA_IRQ_PRIORITY 4 - -// Number of available channels <1-8> -// Number of DMA channels supported by the driver. A lower channel count -// will reduce RAM memory footprint. The default is to support all channels -// on the device. -// Default: 8 -#define EMDRV_DMADRV_DMA_CH_COUNT 8 - -// Number of fixed priority channels -// This will configure channels [0, CH_PRIORITY - 1] as fixed priority, -// and channels [CH_PRIORITY, CH_COUNT] as round-robin. -// Default: 0 -#define EMDRV_DMADRV_DMA_CH_PRIORITY 0 - -// <<< end of configuration section >>> - -#endif // DMADRV_CONFIG_H diff --git a/TBS2Torch/config/eeprom-config.h b/TBS2Torch/config/eeprom-config.h deleted file mode 100644 index b33924a..0000000 --- a/TBS2Torch/config/eeprom-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Eeprom driver component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Eeprom configuration - -// Max cache entries <1-64> -// Default: 8 -// The number of partial words that are stored by this plugin for writing later. If a subsequent write to the following address of the partial word is made, or a call to emberAfPluginEepromFlushSavedPartialWrites() is made, then the partial words are written out. -#define EMBER_AF_PLUGIN_EEPROM_PARTIAL_WORD_STORAGE_COUNT 8 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/emlib_core_debug_config.h b/TBS2Torch/config/emlib_core_debug_config.h deleted file mode 100644 index e4a0168..0000000 --- a/TBS2Torch/config/emlib_core_debug_config.h +++ /dev/null @@ -1,45 +0,0 @@ -/***************************************************************************//** - * @file - * @brief emlib_core Configuration - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 EM_CORE_DEBUG_CONFIG_H -#define EM_CORE_DEBUG_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Core Configuration - -// Enables measuring of interrupt disable time for debugging purposes. -// Default: 0 -#define SL_EMLIB_CORE_ENABLE_INTERRUPT_DISABLED_TIMING 0 - -// - -// <<< end of configuration section >>> -#endif // EM_CORE_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/end-device-support-config.h b/TBS2Torch/config/end-device-support-config.h deleted file mode 100644 index 989f253..0000000 --- a/TBS2Torch/config/end-device-support-config.h +++ /dev/null @@ -1,65 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee End Device Support component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee End Device Support configuration - -// Short Poll Interval (seconds) <1-65535> -// Default: 1 -// The amount of time (in seconds) the device will wait between MAC data polls when it is expecting data. -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_SHORT_POLL_INTERVAL_SECONDS 1 - -// Long Poll Interval (seconds) <1-65535> -// Default: 300 -// The amount of time (in seconds) the device will wait between MAC data polls to ensure connectivity with its parent. -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_LONG_POLL_INTERVAL_SECONDS 300 - -// Wake Timeout (seconds) <1-65535> -// Default: 3 -// The amount of time (in seconds) the device will wait for a task in the wake bitmask to finish. While waiting, the device will short poll. -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_WAKE_TIMEOUT_SECONDS 5 - -// Wake Timeout Bitmask (hex) <0-4294967295> -// Default: 0x00000018 -// The bitmask that determines which tasks will timeout automatically and which tasks require manual removal from the task list. The default value corresponds to EMBER_AF_WAITING_FOR_ZDO_RESPONSE (0x00000008) and EMBER_AF_WAITING_FOR_ZCL_RESPONSE (0x00000010). See EmberAfApplicationTask for more information. -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_WAKE_TIMEOUT_BITMASK 0x00000018 - -// Max Number of Missed Polls <1-255> -// Default: 3 -// The maximum number of missed MAC data polls that will trigger a move (rejoin). -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_MAX_MISSED_POLLS 3 - -// Max Number of Sequential Rejoin (move) attempts <0-255> -// Default: 4 -// This is the maximum number of sequential attempts that will be made to rejoin the ZigBee network and find a new parent the device will make before giving up. If this is set to 255, then the device will never stop attempting to rejoin when it has lost its parent. A successful rejoin resets the number of attempts to 0. -// By default, the sequence of rejoin should be try on current channel of current page -> preferred channels of current page -> all channels of current page -> all pages (on SubGhz). -// On 2.4 Ghz, the end device will not try to rejoin on all pages. -#define EMBER_AF_REJOIN_ATTEMPTS_MAX 32 - -// Enable Poll Completed Callback -// Default: FALSE -// This option enables a callback function when a poll is completed. Enabling this option on hosts will result in increased traffic between the host and the NCP. -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_ENABLE_POLL_COMPLETED_CALLBACK 0 - -// Attempt Rejoins using a well-known Trust Center Link Key (NOT RECOMMENDED, NOT SECURE) -// Default: FALSE -// This option will allow Trust Center Rejoin (unsecure rejoin) attempts when the device is using a well-known key, such as "ZigBeeAlliance09". This exposes a potential security hole on the Trust Center side but is an option for backward compatibility with networks that need it. Note that the Trust Center may have its own policy for handling insecure rejoins and may choose to not send the network key to the rejoining device if it is using a well known link key. -#define EMBER_AF_PLUGIN_END_DEVICE_SUPPORT_ALLOW_REJOINS_WITH_WELL_KNOWN_LINK_KEY 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/find-and-bind-target-config.h b/TBS2Torch/config/find-and-bind-target-config.h deleted file mode 100644 index 1abe389..0000000 --- a/TBS2Torch/config/find-and-bind-target-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Find and Bind Target component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Find and Bind Target configuration - -// Target Commissioning Time <180-255> -// Default: 180 -// The amount of time that the target will respond to identify querys. -#define EMBER_AF_PLUGIN_FIND_AND_BIND_TARGET_COMMISSIONING_TIME 180 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/green-power-client-config.h b/TBS2Torch/config/green-power-client-config.h deleted file mode 100644 index 5b64c5e..0000000 --- a/TBS2Torch/config/green-power-client-config.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Green Power Client component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Green Power Client configuration - -// Proxy Commissioning Window (secs) <1-65535> -// Default: 160 -// Maximum amount of time (secs) the proxy is allowed to be in commissioning mode. -#define EMBER_AF_PLUGIN_GREEN_POWER_CLIENT_GPP_COMMISSIONING_WINDOW 160 - -// Proxy Duplicate Timeout (secs) <1-65535> -// Default: 160 -// Maximum amount of time (secs) the proxy keeps information on the received GPDF in order to filter out duplicates. -#define EMBER_AF_PLUGIN_GREEN_POWER_CLIENT_GPP_DUPLICATE_TIMEOUT_SEC 160 - -// Maximum number of addresses stored for duplicate filtering <1-255> -// Default: 3 -// Maximum number of GP addresses the plugin will store for duplicate filtering -#define EMBER_AF_PLUGIN_GREEN_POWER_CLIENT_MAX_ADDR_ENTRIES 3 - -// Maximum number of saved random sequence numbers per address <1-255> -// Default: 4 -// Maximum number of saved random sequence numbers per address used for duplicate filtering -#define EMBER_AF_PLUGIN_GREEN_POWER_CLIENT_MAX_SEQ_NUM_ENTRIES_PER_ADDR 4 - -// Enable Advanced GPP feature of bidirectional operation -// Default: FALSE -// This enables advanced proxy feature of bidirectional operational message. This option will allow the proxy to make its gp stub tx queue availability in the Gp Notification. This is not implemented in a Proxy Basic. -#define EMBER_AF_PLUGIN_GREEN_POWER_CLIENT_ENABLE_BIDIRECTIONAL_OPERATION 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/legacy_hal_config.h b/TBS2Torch/config/legacy_hal_config.h deleted file mode 100644 index e3386e9..0000000 --- a/TBS2Torch/config/legacy_hal_config.h +++ /dev/null @@ -1,47 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Legacy HAL configuration file. - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef LEGACY_HAL_CONFIG_H -#define LEGACY_HAL_CONFIG_H - -// Translate button interrupt callback -// When the Simple Button component is included, it provides a callback for -// buttons configured in interrupt mode. When this option is 1, Legacy HAL -// will try to consume that callback and translate it to "halButtonIsr", -// the legacy callback. If anything else in the application consumes the -// Simple button callback, it will override Legacy HAL's version. -// Default: 1 -#define LEGACY_HAL_TRANSLATE_BUTTON_INTERRUPT (1) - -#endif /* LEGACY_HAL_CONFIG_H */ - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/level-control-config.h b/TBS2Torch/config/level-control-config.h deleted file mode 100644 index 26f7787..0000000 --- a/TBS2Torch/config/level-control-config.h +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Level Control Server Cluster component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Level Control Server Cluster configuration - -// Maximum level <0-255> -// Default: 255 -// Used to specify device-specific maximum level. Not valid for ZLL devices. -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 - -// Minimum level <0-255> -// Default: 0 -// Used to specify device-specific minimum level. Not valid for ZLL devices. -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 - -// Maximum transition rate (ticks / second) <0-255> -// Default: 0 -// Used to specify device-specific maximum transition rate (ticks / second). A value of 0 relegates this task to the HAL. -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/network-steering-config.h b/TBS2Torch/config/network-steering-config.h deleted file mode 100644 index 8f4d199..0000000 --- a/TBS2Torch/config/network-steering-config.h +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Network Steering component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Network Steering configuration - -// Channel Mask (hex) -// Default: 0x0318C800 -// The channels that the plugin will scan when forming and joining. -#define EMBER_AF_PLUGIN_NETWORK_STEERING_CHANNEL_MASK 0x0318C800 - -// Radio output power <-8..20> -// Default: 3 -// The radio output power (in dBm) at which the node will operate. -#define EMBER_AF_PLUGIN_NETWORK_STEERING_RADIO_TX_POWER 3 - -// Get radio output power from callback -// Default: FALSE -// Use a tx power callback to determine radio tx power. -#define EMBER_AF_PLUGIN_NETWORK_STEERING_RADIO_TX_CALLBACK 0 - -// Scan duration exponent <0-14> -// Default: 4 -// The exponent of the number of scan periods, where a scan period is 960 symbols, and a symbol is 16 miscroseconds. The scan will occur for ((2^duration) + 1) scan periods. -#define EMBER_AF_PLUGIN_NETWORK_STEERING_SCAN_DURATION 4 - -// Network steering commissioning time (seconds) <180-255> -// Default: 180 -// The amount of time (in seconds) that a node will open its network when performing network steering for node on a network, or at the end of the network steering process if a node is a router -#define EMBER_AF_PLUGIN_NETWORK_STEERING_COMMISSIONING_TIME_S 180 - -// Optimize scans -// Default: TRUE -// When this option is enabled, this plugin begins by scanning all channels, both primary and secondary channels, and caches all the beacons received. Networks are joined using the cached beacons for each network steering state (use install code based key, use well-known key, use distributed key). Enabling this option may reduce the number of scans significantly, since the legacy steering code would scan each channel every time it ran a steering state. -#define EMBER_AF_PLUGIN_NETWORK_STEERING_OPTIMIZE_SCANS 1 - -// Try all keys at once -// Default: FALSE -// When enabled, network steering will attempt to join each network using the install code derived key, centralized key, and distributed key at the same time, rather than trying each key individually. Users that wish to prioritize joining using install code keys should not check this option. -#define EMBER_AF_PLUGIN_NETWORK_STEERING_TRY_ALL_KEYS 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/nvm3_default_config.h b/TBS2Torch/config/nvm3_default_config.h deleted file mode 100644 index ba2982c..0000000 --- a/TBS2Torch/config/nvm3_default_config.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef NVM3_DEFAULT_CONFIG_H -#define NVM3_DEFAULT_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// NVM3 Default Instance Configuration - -#ifndef NVM3_DEFAULT_CACHE_SIZE -// NVM3 Default Instance Cache Size -// Number of NVM3 objects to cache. To reduce access times this number -// should be equal to or higher than the number of NVM3 objects in the -// default NVM3 instance. -// Default: 200 -#define NVM3_DEFAULT_CACHE_SIZE 200 -#endif - -#ifndef NVM3_DEFAULT_MAX_OBJECT_SIZE -// NVM3 Default Instance Max Object Size -// Max NVM3 object size that can be stored. -// Default: 254 -#define NVM3_DEFAULT_MAX_OBJECT_SIZE 254 -#endif - -#ifndef NVM3_DEFAULT_REPACK_HEADROOM -// NVM3 Default Instance User Repack Headroom -// Headroom determining how many bytes below the forced repack limit the user -// repack limit should be placed. The default is 0, which means the user and -// forced repack limits are equal. -// Default: 0 -#define NVM3_DEFAULT_REPACK_HEADROOM 0 -#endif - -#ifndef NVM3_DEFAULT_NVM_SIZE -// NVM3 Default Instance Size -// Size of the NVM3 storage region in flash. This size should be aligned with -// the flash page size of the device. -// Default: 36864 -#define NVM3_DEFAULT_NVM_SIZE 36864 -#endif - -// - -// <<< end of configuration section >>> - -#endif // NVM3_DEFAULT_CONFIG_H diff --git a/TBS2Torch/config/ota-bootload-config.h b/TBS2Torch/config/ota-bootload-config.h deleted file mode 100644 index 05b61c8..0000000 --- a/TBS2Torch/config/ota-bootload-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee OTA Cluster Platform Bootloader component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee OTA Cluster Platform Bootloader configuration - -// UART Host Reboot after NCP bootload -// Default: TRUE -// This option will trigger the UART host to reboot. On Unix hosts this will trigger the process to terminate. Disabling this option will allow the UART host to continue running and just reset the NCP. SPI Hosts are always rebooted. -#define EMBER_AF_PLUGIN_OTA_BOOTLOAD_UART_HOST_REBOOT 1 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/ota-client-config.h b/TBS2Torch/config/ota-client-config.h deleted file mode 100644 index d0b16ee..0000000 --- a/TBS2Torch/config/ota-client-config.h +++ /dev/null @@ -1,123 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee OTA Bootload Cluster Client component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee OTA Bootload Cluster Client configuration - -// Auto Start on Stack Up (random delay) -// Default: TRUE -// Automatically start the OTA client on EMBER_NETWORK_UP. This will include a random delay up to 5 minutes to prevent an issue where multiple devices in the network all query the server simultaneously after a power-outage. -#define EMBER_AF_PLUGIN_OTA_CLIENT_AUTO_START 1 - -// Query OTA Server Delay (minutes) <1-65535> -// Default: 5 -// How often the client queries the OTA server for a new upgrade image. -#define EMBER_AF_PLUGIN_OTA_CLIENT_QUERY_DELAY_MINUTES 60 - -// Query Error Rediscovery Threshold <1-255> -// Default: 10 -// How many sequential query errors will cause a device to look for a new OTA server. -#define EMBER_AF_PLUGIN_OTA_CLIENT_QUERY_ERROR_THRESHOLD 10 - -// Download Delay (ms) <0-65535> -// Default: 0 -// How often a new block of data (or page) is requested during a download by the client. A value of 0 means the client will request the blocks (or pages) as fast as the server responds. -#define EMBER_AF_PLUGIN_OTA_CLIENT_DOWNLOAD_DELAY_MS 0 - -// Download Error Threshold <1-255> -// Default: 10 -// How many sequential errors will cause a download to be aborted. -#define EMBER_AF_PLUGIN_OTA_CLIENT_DOWNLOAD_ERROR_THRESHOLD 10 - -// Upgrade Wait Threshold <1-255> -// Default: 10 -// How many sequential, missed responses to an upgrade end request will cause a download to be applied anyway. -#define EMBER_AF_PLUGIN_OTA_CLIENT_UPGRADE_WAIT_THRESHOLD 10 - -// Server Discovery Delay (minutes) <1-65535> -// Default: 10 -// How often a client will look for an OTA server in the network when it did not successfully discover one. Once a client discovers the server, it will remember that server until it reboots, or until the Query Error Rediscovery Threshold is hit. -#define EMBER_AF_PLUGIN_OTA_CLIENT_SERVER_DISCOVERY_DELAY_MINUTES 10 - -// Run Upgrade Request Delay (minutes) <> -// Default: 10 -// How often the client will ask the server to apply a previously downloaded upgrade when the server has previously told the client to wait. -#define EMBER_AF_PLUGIN_OTA_CLIENT_RUN_UPGRADE_REQUEST_DELAY_MINUTES 10 - -// Use Page Request -// Default: FALSE -// This causes the device to use an OTA Page Request command to ask for a large block of data all at once, rather than use individual image block requests for each block. -#define EMBER_AF_PLUGIN_OTA_CLIENT_USE_PAGE_REQUEST 0 - -// Page Request Size -// Page Request Size -// <1024=> 1024 -// <2048=> 2048 -// <4096=> 4096 -// Default: 1024 -// The size of the page to request from the server. -#define EMBER_AF_PLUGIN_OTA_CLIENT_PAGE_REQUEST_SIZE 1024 - -// Page Request Timeout (seconds) <1-10> -// Default: 5 -// The length of time to wait for all blocks from a page request to come in. After this time has expired, missed packets will be requested individually with image block requests. -#define EMBER_AF_PLUGIN_OTA_CLIENT_PAGE_REQUEST_TIMEOUT_SECONDS 5 - -// Use signature verification -// Default: FALSE -// This allows the ota client to use signature verification process -#define EMBER_AF_PLUGIN_OTA_CLIENT_SIGNATURE_VERIFICATION_SUPPORT 0 - -// Verification Delay (ms) <0-255> -// Default: 10 -// This controls how often an ongoing verification process executes. When Signature verification is enabled this will control how often digest calculation is executed. Digest calculation can take quite a long time for an OTA image. Other processing for the system may be deemeded more important and therefore we add delays between calculations. This also controls how often custom verification written by the application developer is executed. A value of 0 means the calculations run to completion. -#define EMBER_AF_PLUGIN_OTA_CLIENT_VERIFY_DELAY_MS 10 - -// Minimum Block Period Units -// Minimum Block Period Units -// Seconds -// Milliseconds -// Disable Feature -// Default: MILLISECONDS -// The units applied to the Minimum Block Period field in an ImageBlockRequest and ImageBlockResponse. Optionally, the feature can be disabled. -#define EMBER_AF_PLUGIN_OTA_CLIENT_MIN_BLOCK_PERIOD_UNITS MILLISECONDS - -// Ignore loopback server endpoints -// Default: TRUE -// During OTA server discovery, ignore service discovery responses that come as loopback messages (from the local node) so the first remote server to respond is the one the client will use. This allows a combination OTA client/server device to find other servers. -#define EMBER_AF_PLUGIN_OTA_CLIENT_IGNORE_LOOPBACK_SERVER 1 - -// Ignore non Trust Center for OTA server -// Default: FALSE -// Ignore non trust center -#define EMBER_AF_PLUGIN_OTA_CLIENT_IGNORE_NON_TRUST_CENTER 1 - -// OTA_CLIENT_SIGNER_EUI0 <0..255> -// { 0x00, 0x0D, 0x6F, 0x00, 0x00, 0x19, 0x8B, 0x36 } -#define EMBER_AF_PLUGIN_OTA_CLIENT_SIGNER_EUI0 { 0x00, 0x0D, 0x6F, 0x00, 0x00, 0x19, 0x8B, 0x36 } - -// OTA_CLIENT_SIGNER_EUI1 <0..255> -// {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} -#define EMBER_AF_PLUGIN_OTA_CLIENT_SIGNER_EUI1 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - -// OTA_CLIENT_SIGNER_EUI2 <0..255> -// {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} -#define EMBER_AF_PLUGIN_OTA_CLIENT_SIGNER_EUI2 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/ota-client-policy-config.h b/TBS2Torch/config/ota-client-policy-config.h deleted file mode 100644 index 988053d..0000000 --- a/TBS2Torch/config/ota-client-policy-config.h +++ /dev/null @@ -1,53 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee OTA Bootload Cluster Client Policy component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee OTA Bootload Cluster Client Policy configuration - -// Image Type ID <0-65535> -// Default: 0 -// This is the device's OTA image identifier used for querying the OTA server about the next image to use for an upgrade. -#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID 2285 - -// Firmware Version <1-4294967295> -// Default: 1 -// This is the device's current firmware version, used when querying the OTA server about the next image to use for an upgrade. -#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 230805000 - -// Hardware Version <0-65535> -// Default: 0 -// Devices may have a hardware version that limits what images they can use. OTA Images may be configured with minimum and maximum hardware versions that they are supported on. If the device is not restricted by hardware version then this value should be 0xFFFF. -#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION 0 - -// Perform EBL Verification (SOC Only) -// Default: TRUE -// This uses the application bootloader routines to verify the EBL image after signature verification passes. -#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_EBL_VERIFICATION 1 - -// Include Hardware Version -// Default: FALSE -// This indicates that the current hardware version of the product should be included in the messages sent to the ZigBee OTA Cluster server. -#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_INCLUDE_HARDWARE_VERSION 0 - -// Delete Failed Downloads -// Default: TRUE -// This causes the device to delete any image (partial or complete) that has been downloaded but did not pass verification or when the server tells us to abort the download or upgrade. -#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_DELETE_FAILED_DOWNLOADS 1 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/ota-storage-common-config.h b/TBS2Torch/config/ota-storage-common-config.h deleted file mode 100644 index 0012aaf..0000000 --- a/TBS2Torch/config/ota-storage-common-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee OTA Bootload Cluster Storage Common Code component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee OTA Bootload Cluster Storage Common Code configuration - -// Max Tags In OTA File <1-16> -// Default: 6 -// Maximum amount of tags embedded within an OTA file. Most images will include an Upgrade Image tag, a certificate tag and a signature tag. The default max should be more than enough. -#define EMBER_AF_PLUGIN_OTA_STORAGE_COMMON_MAX_TAGS_IN_OTA_FILE 6 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/ota-storage-simple-eeprom-config.h b/TBS2Torch/config/ota-storage-simple-eeprom-config.h deleted file mode 100644 index 0907989..0000000 --- a/TBS2Torch/config/ota-storage-simple-eeprom-config.h +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee OTA Simple Storage EEPROM Driver component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee OTA Simple Storage EEPROM Driver configuration - -// SOC Bootloading Support -// Default: TRUE -// This option enables bootloading support for SOC devices. When enabled, it will re-map the OTA image file so that the EBL data is at the top of the EEPROM and therefore can be accessed by all existing Ember bootloaders. It requires that the EBL portion of the image is the first TAG in the file. The OTA storage starting offset should be 0 when this is enabled. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_SOC_BOOTLOADING_SUPPORT 1 - -// Gecko Bootloader Storage Support -// Gecko Bootloader Storage Support -// Do not use slots -// Use first slot -// Use last slot -// Use specific slot -// Default: DO_NOT_USE_SLOTS -// This option dictates the method for saving OTA images to slots. This is only applicable if a Gecko storage bootloader is running on the chip. The Slot Manager plugin must be selected in order for slots to be used. If a Gecko storage bootloader is not present on the chip, the offsets entered below will be used. If "Do not use slots" is selected, then the offsets entered below will be used to determine where to save the image. This is not recommended, as using set offsets to addresses with a Gecko storage bootloader requires knowledge of storage slot addresses and boundaries. A mismatch in addresses will cause OTA to not work. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_GECKO_BOOTLOADER_STORAGE_SUPPORT USE_FIRST_SLOT - -// Storage Slot To Save Images To <0-255> -// Default: 0 -// If the user selects "Use specific slot" for Gecko Bootloader Storage Support, then this value dicatates the slot to use. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_SLOT_TO_USE 0 - -// OTA Storage Start Offset <0-4294967295> -// Default: 0 -// This is the starting offset for where the OTA image will be stored in the EEPROM. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_START 0 - -// OTA Storage End Offset <0-4294967295> -// Default: 262144 -// This is the last offset for where the OTA image may be stored in the EEPROM. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_STORAGE_END 393216 - -// SOC Read-Modify-Write Support -// Default: FALSE -// This indicates to the OTA code whether the underlying EEPROM driver has support for 'read-modify-write'. Read-modify-write assumes a page erase is not required prior to writing, and any location or length of data can be re-written. If not present, then the OTA code will note each full page of data downloaded and must erase entire pages before downloading a chunk of data. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_READ_MODIFY_WRITE_SUPPORT 0 - -// Frequency for Saving Download Offset to EEPROM (bytes) <0-32768> -// Default: 1024 -// How often the current download offset is stored to EEPROM, in bytes. If set to 0 it will always be written to EEPROM. This is only used for "read-modify-write" drivers. -#define EMBER_AF_PLUGIN_OTA_STORAGE_SIMPLE_EEPROM_DOWNLOAD_OFFSET_SAVE_RATE 1024 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/pin_config.h b/TBS2Torch/config/pin_config.h deleted file mode 100644 index 9154bd9..0000000 --- a/TBS2Torch/config/pin_config.h +++ /dev/null @@ -1,307 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[ADC0] -// [ADC0]$ - -// $[CMU] -// [CMU]$ - -// $[DBG] -// DBG SWV on PF2 -#ifndef DBG_SWV_PORT -#define DBG_SWV_PORT gpioPortF -#endif -#ifndef DBG_SWV_PIN -#define DBG_SWV_PIN 2 -#endif -#ifndef DBG_SWV_LOC -#define DBG_SWV_LOC 0 -#endif - -// [DBG]$ - -// $[ETM] -// [ETM]$ - -// $[PTI] -// PTI DFRAME on PB13 -#ifndef PTI_DFRAME_PORT -#define PTI_DFRAME_PORT gpioPortB -#endif -#ifndef PTI_DFRAME_PIN -#define PTI_DFRAME_PIN 13 -#endif -#ifndef PTI_DFRAME_LOC -#define PTI_DFRAME_LOC 6 -#endif - -// PTI DOUT on PB12 -#ifndef PTI_DOUT_PORT -#define PTI_DOUT_PORT gpioPortB -#endif -#ifndef PTI_DOUT_PIN -#define PTI_DOUT_PIN 12 -#endif -#ifndef PTI_DOUT_LOC -#define PTI_DOUT_LOC 6 -#endif - -// [PTI]$ - -// $[GPIO] -// [GPIO]$ - -// $[I2C0] -// [I2C0]$ - -// $[I2C1] -// I2C1 SCL on PC5 -#ifndef I2C1_SCL_PORT -#define I2C1_SCL_PORT gpioPortC -#endif -#ifndef I2C1_SCL_PIN -#define I2C1_SCL_PIN 5 -#endif -#ifndef I2C1_SCL_LOC -#define I2C1_SCL_LOC 17 -#endif - -// I2C1 SDA on PC4 -#ifndef I2C1_SDA_PORT -#define I2C1_SDA_PORT gpioPortC -#endif -#ifndef I2C1_SDA_PIN -#define I2C1_SDA_PIN 4 -#endif -#ifndef I2C1_SDA_LOC -#define I2C1_SDA_LOC 17 -#endif - -// [I2C1]$ - -// $[IDAC0] -// [IDAC0]$ - -// $[LESENSE] -// [LESENSE]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[LEUART0] -// [LEUART0]$ - -// $[LFXO] -// [LFXO]$ - -// $[MODEM] -// [MODEM]$ - -// $[PCNT0] -// [PCNT0]$ - -// $[PCNT1] -// [PCNT1]$ - -// $[PCNT2] -// [PCNT2]$ - -// $[PRS.CH0] -// PRS CH0 on PC6 -#ifndef PRS_CH0_PORT -#define PRS_CH0_PORT gpioPortC -#endif -#ifndef PRS_CH0_PIN -#define PRS_CH0_PIN 6 -#endif -#ifndef PRS_CH0_LOC -#define PRS_CH0_LOC 8 -#endif - -// [PRS.CH0]$ - -// $[PRS.CH1] -// [PRS.CH1]$ - -// $[PRS.CH2] -// [PRS.CH2]$ - -// $[PRS.CH3] -// [PRS.CH3]$ - -// $[PRS.CH4] -// [PRS.CH4]$ - -// $[PRS.CH5] -// [PRS.CH5]$ - -// $[PRS.CH6] -// [PRS.CH6]$ - -// $[PRS.CH7] -// [PRS.CH7]$ - -// $[PRS.CH8] -// [PRS.CH8]$ - -// $[PRS.CH9] -// [PRS.CH9]$ - -// $[PRS.CH10] -// [PRS.CH10]$ - -// $[PRS.CH11] -// [PRS.CH11]$ - -// $[TIMER0] -// TIMER0 CC0 on PD11 -#ifndef TIMER0_CC0_PORT -#define TIMER0_CC0_PORT gpioPortD -#endif -#ifndef TIMER0_CC0_PIN -#define TIMER0_CC0_PIN 11 -#endif -#ifndef TIMER0_CC0_LOC -#define TIMER0_CC0_LOC 19 -#endif - -// TIMER0 CC1 on PD12 -#ifndef TIMER0_CC1_PORT -#define TIMER0_CC1_PORT gpioPortD -#endif -#ifndef TIMER0_CC1_PIN -#define TIMER0_CC1_PIN 12 -#endif -#ifndef TIMER0_CC1_LOC -#define TIMER0_CC1_LOC 19 -#endif - -// TIMER0 CC2 on PD13 -#ifndef TIMER0_CC2_PORT -#define TIMER0_CC2_PORT gpioPortD -#endif -#ifndef TIMER0_CC2_PIN -#define TIMER0_CC2_PIN 13 -#endif -#ifndef TIMER0_CC2_LOC -#define TIMER0_CC2_LOC 19 -#endif - -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[USART0] -// USART0 CTS on PA2 -#ifndef USART0_CTS_PORT -#define USART0_CTS_PORT gpioPortA -#endif -#ifndef USART0_CTS_PIN -#define USART0_CTS_PIN 2 -#endif -#ifndef USART0_CTS_LOC -#define USART0_CTS_LOC 30 -#endif - -// USART0 RTS on PA3 -#ifndef USART0_RTS_PORT -#define USART0_RTS_PORT gpioPortA -#endif -#ifndef USART0_RTS_PIN -#define USART0_RTS_PIN 3 -#endif -#ifndef USART0_RTS_LOC -#define USART0_RTS_LOC 30 -#endif - -// USART0 RX on PA1 -#ifndef USART0_RX_PORT -#define USART0_RX_PORT gpioPortA -#endif -#ifndef USART0_RX_PIN -#define USART0_RX_PIN 1 -#endif -#ifndef USART0_RX_LOC -#define USART0_RX_LOC 0 -#endif - -// USART0 TX on PA0 -#ifndef USART0_TX_PORT -#define USART0_TX_PORT gpioPortA -#endif -#ifndef USART0_TX_PIN -#define USART0_TX_PIN 0 -#endif -#ifndef USART0_TX_LOC -#define USART0_TX_LOC 0 -#endif - -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[USART3] -// USART3 CLK on PC2 -#ifndef USART3_CLK_PORT -#define USART3_CLK_PORT gpioPortC -#endif -#ifndef USART3_CLK_PIN -#define USART3_CLK_PIN 2 -#endif -#ifndef USART3_CLK_LOC -#define USART3_CLK_LOC 18 -#endif - -// USART3 RX on PC1 -#ifndef USART3_RX_PORT -#define USART3_RX_PORT gpioPortC -#endif -#ifndef USART3_RX_PIN -#define USART3_RX_PIN 1 -#endif -#ifndef USART3_RX_LOC -#define USART3_RX_LOC 18 -#endif - -// USART3 TX on PC0 -#ifndef USART3_TX_PORT -#define USART3_TX_PORT gpioPortC -#endif -#ifndef USART3_TX_PIN -#define USART3_TX_PIN 0 -#endif -#ifndef USART3_TX_LOC -#define USART3_TX_LOC 18 -#endif - -// [USART3]$ - -// $[VDAC0] -// [VDAC0]$ - -// $[WTIMER0] -// [WTIMER0]$ - -// $[WTIMER1] -// [WTIMER1]$ - -// $[CUSTOM_PIN_NAME] -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - -// $[CSEN] -// [CSEN]$ - diff --git a/TBS2Torch/config/power_configuration_server_config.h b/TBS2Torch/config/power_configuration_server_config.h deleted file mode 100644 index b0e2370..0000000 --- a/TBS2Torch/config/power_configuration_server_config.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * @file - * @brief Power Configuration Server Cluster - ******************************************************************************* - * # License - * Copyright 2023 Alexei Chetroi - ******************************************************************************* - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -#ifndef SL_POWER_CONFIGURATION_SERVER_CONFIG_H -#define SL_POWER_CONFIGURATION_SERVER_CONFIG_H - -#define SL_POWER_CONFIGURATION_BATTERY_TYPE_CUSTOM 0 -#define SL_POWER_CONFIGURATION_BATTERY_TYPE_CR2032 1 -#define SL_POWER_CONFIGURATION_BATTERY_TYPE_18650 2 - -// <<< Use Configuration Wizard in Context Menu >>> - -// Power Configuration Server Cluster configuration - -// Battery Type -// Default: CR2032 -// Indicates the battery type in use. -// CUSTOM -// CR2032 -// 18650 -#define SL_POWER_CONFIGURATION_BATTERY_TYPE SL_POWER_CONFIGURATION_BATTERY_TYPE_18650 - -// - -// <<< end of configuration section >>> -#endif // SL_POWER_CONFIGURATION_SERVER_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/psa_crypto_config.h b/TBS2Torch/config/psa_crypto_config.h deleted file mode 100644 index ec3450f..0000000 --- a/TBS2Torch/config/psa_crypto_config.h +++ /dev/null @@ -1,134 +0,0 @@ -#ifndef PSA_CRYPTO_CONFIG_H -#define PSA_CRYPTO_CONFIG_H - -// ----------------------------------------------------------------------------- -// User exposed config options - -// <<< Use Configuration Wizard in Context Menu >>> - -// Key management configuration - -// PSA User Maximum Open Keys Count <0-128> -// Maximum amount of keys that the user application will have open -// simultaneously. In context of PSA Crypto, an open key means any key -// either stored in RAM (lifetime set to PSA_KEY_LIFETIME_VOLATILE), or -// used as part of a cryptographic operation. -// When using a key for a multi-part (setup/update/finish) operation, a key -// is considered to be open from the moment the operation is successfully -// setup, until it finishes or aborts. -// When an application tries to open more keys than this value accounts for, -// the PSA API may return PSA_ERROR_INSUFFICIENT_MEMORY. Keep in mind that -// other software included in the application (e.g. wireless protocol stacks) -// also can have a need to have open keys in PSA Crypto. This could lead to -// a race condition when the application key slot count is set too low for -// the actual usage of the application, as a software stack may not fail -// gracefully in case an application opens more than its declared amount of -// keys, thereby precluding the stack from functioning. -// Default: 4 -#define SL_PSA_KEY_USER_SLOT_COUNT (4) - -// PSA Maximum User Persistent Keys Count <0-1024> -// Maximum amount of keys (or other files) that can be stored persistently -// by the application through the PSA interface, when persistent storage -// support for PSA Crypto is included in the project. -// Due to caching logic, this setting does have an impact on static RAM usage. -// Note that this number is added to the potential requirements from other -// software components in the project, such that the total amount of keys -// which can be stored through the ITS backend can be higher than what is -// configured here. -// -// WARNING: When changing this setting on an application that is already -// deployed, and thus will get the change through an application upgrade, -// care should be taken to ensure that the setting is only ever increased, -// and never decreased. Decreasing this setting might cause previously -// stored keys/files to become inaccessible. -// -// It is not possible to change this setting when using V3 ITS Driver. -// The file-storage indexing is dependent on the maximum number of files, -// and if SL_PSA_ITS_USER_MAX_FILES is changed, ITS should be cleared and -// all files need to be stored again. -// Default: 128 -#define SL_PSA_ITS_USER_MAX_FILES (128) - -// Enable V1 Format Support For ITS Files <0-1> -// Devices that used PSA ITS together with gecko_sdk_3.1.x or earlier -// might have keys (or other files) stored in V1 format. -// If no v1 files are used, its support can be disabled for space -// optimization. -// Default: 0 -#define SL_PSA_ITS_SUPPORT_V1_DRIVER 0 - -// Enable V2 ITS Driver Support <0-1> -// Devices that have used GSDK 4.1.x and earlier, and used ITS have the keys -// (or other files) stored using different address range. Enabling this -// config option adds upgrade code which converts V2 (and V1 if -// supported) format ITS keys/files to the latest V3 format. Update is -// fully automatic, needs to be run once and require extra flash space of -// approximately the size of the largest key. -// V1 ITS driver support can be disabled if the device has never used ITS -// driver before in GSDK 4.1.x and earlier, or the keys has been already -// migrated. -// Default: 0 -#define SL_PSA_ITS_SUPPORT_V2_DRIVER 0 - -// Enable support for V3 ITS Driver <0-1> -// Devices that have used GSDK 4.1.x and earlier, and used ITS have the keys -// (or other files) stored using different address range. In rare case -// that those devices have full nvm3 and not enough space for the -// upgrade, (that requires an extra space to store largest key in memory -// twice), this config option can disable v3 driver and use v2 one. -// To upgrade the device, make space for the upgrade, and enable v3 driver again. -// -// WARNING: When using V3 driver, it is not possible to increase or decrease -// the value of SL_PSA_ITS_USER_MAX_FILES. If the change of -// SL_PSA_ITS_USER_MAX_FILES is required, ITS should be cleared and -// all files need to be stored again. -// Default: 1 -#define SL_PSA_ITS_SUPPORT_V3_DRIVER 1 - -// Built-in AES Key Mode of Operation -// CTR Mode -// CFB Mode -// OFB Mode -// ECB Mode -// CBC Mode (no padding) -// CBC Mode (PKCS#7 padding) -// PSA Crypto only allows one specific usage algorithm per built-in key ID. -// Default: PSA_ALG_CTR -#define SL_SE_BUILTIN_KEY_AES128_ALG_CONFIG (PSA_ALG_CTR) - -#ifndef SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG -// Built-in PUF Key Algorithm -// PBKDF2 (CMAC-AES-128-PRF) -// CMAC -// PSA Crypto only allows one specific usage algorithm per built-in key ID. -// It is recommended to only use the PUF key for deriving further key -// material. -// Default: PSA_ALG_PBKDF2_AES_CMAC_PRF_128 -#define SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG (PSA_ALG_PBKDF2_AES_CMAC_PRF_128) -#endif // SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG - -// - -// <<< end of configuration section >>> - -// ----------------------------------------------------------------------------- -// Sub-files - -#if defined(SLI_PSA_CONFIG_AUTOGEN_OVERRIDE_FILE) - #include SLI_PSA_CONFIG_AUTOGEN_OVERRIDE_FILE -#else - #include "sli_psa_config_autogen.h" -#endif - -#if defined(TFM_CONFIG_SL_SECURE_LIBRARY) - #include "sli_psa_tfm_translation.h" -#endif - -#if SL_MBEDTLS_DRIVERS_ENABLED - #include "sli_psa_acceleration.h" -#endif - -#include "sli_psa_builtin_config_autogen.h" - -#endif // PSA_CRYPTO_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/reporting-config.h b/TBS2Torch/config/reporting-config.h deleted file mode 100644 index 6a95b1b..0000000 --- a/TBS2Torch/config/reporting-config.h +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Reporting component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Reporting configuration - -// Enable expanded reporting table size -// Default: FALSE -// Select for configurations greater than 127 entries. For SoC applications this requires EFR32 architecture and the NVM3 plugin -#define EMBER_AF_PLUGIN_REPORTING_ENABLE_EXPANDED_TABLE 0 - -// Reporting table size <1-127> -// Default: 5 -// Maximum number of entries in the reporting table. -#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE 16 - -// Expanded reporting table size <1-1024> -// Default: 20 -// Maximum number of entries in the expanded reporting table. -#define EMBER_AF_PLUGIN_REPORTING_EXPANDED_TABLE_SIZE 20 - -// Allow reports to send via group bindings (zigbee 3.0 mandatory behavior) -// Default: TRUE -// This feature is enabled by default to satisfy zigbee 3.0 compliance. Network commissioners should handle reports over group bindings with caution as the frequency and number of reports over multicasts can stagnate the network. Multicasts are treated as broadcasts, which consume network bandwidth. -#define EMBER_AF_PLUGIN_REPORTING_ENABLE_GROUP_BOUND_REPORTS 1 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/rz_button_config.h b/TBS2Torch/config/rz_button_config.h deleted file mode 100644 index 1a55851..0000000 --- a/TBS2Torch/config/rz_button_config.h +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************//** - * @file - * @brief rz_button_config Config - ******************************************************************************* - * # License - * Copyright 2023 Alexei Chetroi - ******************************************************************************* - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -#ifndef RZ_BUTTON_CONFIG_H -#define RZ_BUTTON_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu - -// Counted Button Press configuration - -// Counted short press timeout -// <100..2000:50> -// Default: 750 -// The maximum blink pattern length -#define RZ_BUTTON_PRESS_TIMEOUT_MS 700 - -// end Counted Button Press config -// <<< end of configuration section >>> - -#endif // RZ_BUTTON_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/rz_led_blink_config.h b/TBS2Torch/config/rz_led_blink_config.h deleted file mode 100644 index 4671de9..0000000 --- a/TBS2Torch/config/rz_led_blink_config.h +++ /dev/null @@ -1,49 +0,0 @@ -/***************************************************************************//** - * @file - * @brief rz_led_blink_config Config - ******************************************************************************* - * # License - * Copyright 2023 Alexei Chetroi - ******************************************************************************* - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -#ifndef RZ_LED_BLINK_CONFIG_H -#define RZ_LED_BLINK_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu - -// Led Blinker configuration - -// Maximim blink pattern length -// <1..40:1> -// Default: 20 -// The maximum blink pattern length -#define RZ_LED_BLINK_MAX_PATTERN_LEN 20 - -// Maximum number of led instances -// <1..5:1> -// Default: 2 -// The number of simple led instances to support -#define RZ_LED_BLINK_MAX_LED_INSTANCES 2 - -// end Led Blinker config -// <<< end of configuration section >>> - -#endif // RZ_LED_BLINK_CONFIG_H diff --git a/TBS2Torch/config/scan-dispatch-config.h b/TBS2Torch/config/scan-dispatch-config.h deleted file mode 100644 index 52c40d5..0000000 --- a/TBS2Torch/config/scan-dispatch-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Scan Dispatch component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Scan Dispatch configuration - -// Scan queue size <1-254> -// Default: 10 -// The size of the queue of consumers. -#define EMBER_AF_PLUGIN_SCAN_DISPATCH_SCAN_QUEUE_SIZE 10 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/scenes-config.h b/TBS2Torch/config/scenes-config.h deleted file mode 100644 index d335bd3..0000000 --- a/TBS2Torch/config/scenes-config.h +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Scenes Server Cluster component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Scenes Server Cluster configuration - -// Scenes table size <1-255> -// Default: 3 -// Maximum count of scenes across all endpoints -#define EMBER_AF_PLUGIN_SCENES_TABLE_SIZE 3 - -// Support scene names -// Default: FALSE -// If this option is selected, the plugin will include support for scene names. Scene names will require additional space in the scene table (16 characters plus a length byte per entry). The Name Support attribute will be set based on this option. -#define EMBER_AF_PLUGIN_SCENES_NAME_SUPPORT 0 - -// On SOC platform, store the table in persistent memory -// Default: TRUE -// On an SOC platform, this option enables the persistent storage of the scenes table into the FLASH memory using the tokens. -#define EMBER_AF_PLUGIN_SCENES_USE_TOKENS 1 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_battery_monitor_config.h b/TBS2Torch/config/sl_battery_monitor_config.h index 4d06595..defc530 100644 --- a/TBS2Torch/config/sl_battery_monitor_config.h +++ b/TBS2Torch/config/sl_battery_monitor_config.h @@ -1,261 +1,252 @@ -/***************************************************************************//** - * @file - * @brief sl_battery_monitor Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -#ifndef SL_BATTERY_MONITOR_CONFIG_H -#define SL_BATTERY_MONITOR_CONFIG_H - -#include "em_adc.h" - -// <<< Use Configuration Wizard in Context Menu - -// Battery Monitor settings - -// Monitor Timeout (Minutes) -// <1..1000:1> -// Default: 30 -// The length of time between battery reads. -#define SL_BATTERY_MONITOR_TIMEOUT_MINUTES 60 - -// Sample Collection FIFO Size -// <1..20:1> -// Default: 16 -// The number of entries in the fifo used to collect ADC reads of the battery -#define SL_BATTERY_MONITOR_SAMPLE_FIFO_SIZE 16 - -// ADC Pos Select Input -// Default: AVDD -// AVDD -// APORT0XCH0 -// APORT0XCH1 -// APORT0XCH2 -// APORT0XCH3 -// APORT0XCH4 -// APORT0XCH5 -// APORT0XCH6 -// APORT0XCH7 -// APORT0XCH8 -// APORT0XCH9 -// APORT0XCH10 -// APORT0XCH11 -// APORT0XCH12 -// APORT0XCH13 -// APORT0XCH14 -// APORT0XCH15 -// APORT0YCH0 -// APORT0YCH1 -// APORT0YCH2 -// APORT0YCH3 -// APORT0YCH4 -// APORT0YCH5 -// APORT0YCH6 -// APORT0YCH7 -// APORT0YCH8 -// APORT0YCH9 -// APORT0YCH10 -// APORT0YCH11 -// APORT0YCH12 -// APORT0YCH13 -// APORT0YCH14 -// APORT0YCH15 -// APORT1XCH0 -// APORT1YCH1 -// APORT1XCH2 -// APORT1YCH3 -// APORT1XCH4 -// APORT1YCH5 -// APORT1XCH6 -// APORT1YCH7 -// APORT1XCH8 -// APORT1YCH9 -// APORT1XCH10 -// APORT1YCH11 -// APORT1XCH12 -// APORT1YCH13 -// APORT1XCH14 -// APORT1YCH15 -// APORT1XCH16 -// APORT1YCH17 -// APORT1XCH18 -// APORT1YCH19 -// APORT1XCH20 -// APORT1YCH21 -// APORT1XCH22 -// APORT1YCH23 -// APORT1XCH24 -// APORT1YCH25 -// APORT1XCH26 -// APORT1YCH27 -// APORT1XCH28 -// APORT1YCH29 -// APORT1XCH30 -// APORT1YCH31 -// APORT2YCH0 -// APORT2XCH1 -// APORT2YCH2 -// APORT2XCH3 -// APORT2YCH4 -// APORT2XCH5 -// APORT2YCH6 -// APORT2XCH7 -// APORT2YCH8 -// APORT2XCH9 -// APORT2YCH10 -// APORT2XCH11 -// APORT2YCH12 -// APORT2XCH13 -// APORT2YCH14 -// APORT2XCH15 -// APORT2YCH16 -// APORT2XCH17 -// APORT2YCH18 -// APORT2XCH19 -// APORT2YCH20 -// APORT2XCH21 -// APORT2YCH22 -// APORT2XCH23 -// APORT2YCH24 -// APORT2XCH25 -// APORT2YCH26 -// APORT2XCH27 -// APORT2YCH28 -// APORT2XCH29 -// APORT2YCH30 -// APORT2XCH31 -// APORT3XCH0 -// APORT3YCH1 -// APORT3XCH2 -// APORT3YCH3 -// APORT3XCH4 -// APORT3YCH5 -// APORT3XCH6 -// APORT3YCH7 -// APORT3XCH8 -// APORT3YCH9 -// APORT3XCH10 -// APORT3YCH11 -// APORT3XCH12 -// APORT3YCH13 -// APORT3XCH14 -// APORT3YCH15 -// APORT3XCH16 -// APORT3YCH17 -// APORT3XCH18 -// APORT3YCH19 -// APORT3XCH20 -// APORT3YCH21 -// APORT3XCH22 -// APORT3YCH23 -// APORT3XCH24 -// APORT3YCH25 -// APORT3XCH26 -// APORT3YCH27 -// APORT3XCH28 -// APORT3YCH29 -// APORT3XCH30 -// APORT3YCH31 -// APORT4YCH0 -// APORT4XCH1 -// APORT4YCH2 -// APORT4XCH3 -// APORT4YCH4 -// APORT4XCH5 -// APORT4YCH6 -// APORT4XCH7 -// APORT4YCH8 -// APORT4XCH9 -// APORT4YCH10 -// APORT4XCH11 -// APORT4YCH12 -// APORT4XCH13 -// APORT4YCH14 -// APORT4XCH15 -// APORT4YCH16 -// APORT4XCH17 -// APORT4YCH18 -// APORT4XCH19 -// APORT4YCH20 -// APORT4XCH21 -// APORT4YCH22 -// APORT4XCH23 -// APORT4YCH24 -// APORT4XCH25 -// APORT4YCH26 -// APORT4XCH27 -// APORT4YCH28 -// APORT4XCH29 -// APORT4YCH30 -// APORT4XCH31 -// AVDD -// BUVDD -// DVDD -// PAVDD -// DECOUPLE -// IOVDD -// IOVDD1 -// VSP -// OPA2 -// TEMP -// DAC0OUT0 -// R5VOUT -// SP1 -// SP2 -// DAC0OUT1 -// SUBLSB -// OPA3 -// DEFAULT -// VSS -#define SL_BATTERY_MONITOR_ADC_POS_SEL adcPosSelAPORT3XCH14 - -// Battery Voltage is using R1/R2 resistive divider -#define SL_BATTERY_MONITOR_R_DIVIDER_ENABLED 1 - -// R1 Resistive divider Input Voltage leg -#define SL_BATTERY_MONITOR_R_DIVIDER_R1 1800 - -// R2 Resistive divider Ground leg -#define SL_BATTERY_MONITOR_R_DIVIDER_R2 2700 -// - -// end Battery Monitor config -// <<< end of configuration section >>> - -#define SL_BATTERY_MONITOR_R_DIVIDER_R1_R2 (SL_BATTERY_MONITOR_R_DIVIDER_R1 \ - + SL_BATTERY_MONITOR_R_DIVIDER_R2) -#define SL_BATTERY_MONITOR_R_DIVIDER_COEF SL_BATTERY_MONITOR_R_DIVIDER_R1_R2 \ - / SL_BATTERY_MONITOR_R_DIVIDER_R2 - -// <<< sl:start pin_tool >>> -// SL_BATTERY_MONITOR_TX_ACTIVE -// $[PRS_SL_BATTERY_MONITOR_TX_ACTIVE] -#ifndef SL_BATTERY_MONITOR_TX_ACTIVE_CHANNEL -#define SL_BATTERY_MONITOR_TX_ACTIVE_CHANNEL 0 -#endif - -// PRS CH0 on PC6 -#ifndef SL_BATTERY_MONITOR_TX_ACTIVE_PORT -#define SL_BATTERY_MONITOR_TX_ACTIVE_PORT gpioPortC -#endif -#ifndef SL_BATTERY_MONITOR_TX_ACTIVE_PIN -#define SL_BATTERY_MONITOR_TX_ACTIVE_PIN 6 -#endif -#ifndef SL_BATTERY_MONITOR_TX_ACTIVE_LOC -#define SL_BATTERY_MONITOR_TX_ACTIVE_LOC 8 -#endif -// [PRS_SL_BATTERY_MONITOR_TX_ACTIVE]$ -// <<< sl:end pin_tool >>> - -#endif // SL_BATTERY_MONITOR_CONFIG_H +/***************************************************************************//** + * @file + * @brief sl_battery_monitor Config + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * 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. + * + ******************************************************************************/ + +#ifndef SL_BATTERY_MONITOR_CONFIG_H +#define SL_BATTERY_MONITOR_CONFIG_H + +#include "em_adc.h" + +// <<< Use Configuration Wizard in Context Menu + +// Battery Monitor settings + +// Monitor Timeout (Minutes) +// <1..1000:1> +// Default: 30 +// The length of time between battery reads. +#define SL_BATTERY_MONITOR_TIMEOUT_MINUTES 30 + +// Sample Collection FIFO Size +// <1..20:1> +// Default: 16 +// The number of entries in the fifo used to collect ADC reads of the battery +#define SL_BATTERY_MONITOR_SAMPLE_FIFO_SIZE 16 + +// ADC Pos Select Input +// Default: AVDD +// AVDD +// APORT0XCH0 +// APORT0XCH1 +// APORT0XCH2 +// APORT0XCH3 +// APORT0XCH4 +// APORT0XCH5 +// APORT0XCH6 +// APORT0XCH7 +// APORT0XCH8 +// APORT0XCH9 +// APORT0XCH10 +// APORT0XCH11 +// APORT0XCH12 +// APORT0XCH13 +// APORT0XCH14 +// APORT0XCH15 +// APORT0YCH0 +// APORT0YCH1 +// APORT0YCH2 +// APORT0YCH3 +// APORT0YCH4 +// APORT0YCH5 +// APORT0YCH6 +// APORT0YCH7 +// APORT0YCH8 +// APORT0YCH9 +// APORT0YCH10 +// APORT0YCH11 +// APORT0YCH12 +// APORT0YCH13 +// APORT0YCH14 +// APORT0YCH15 +// APORT1XCH0 +// APORT1YCH1 +// APORT1XCH2 +// APORT1YCH3 +// APORT1XCH4 +// APORT1YCH5 +// APORT1XCH6 +// APORT1YCH7 +// APORT1XCH8 +// APORT1YCH9 +// APORT1XCH10 +// APORT1YCH11 +// APORT1XCH12 +// APORT1YCH13 +// APORT1XCH14 +// APORT1YCH15 +// APORT1XCH16 +// APORT1YCH17 +// APORT1XCH18 +// APORT1YCH19 +// APORT1XCH20 +// APORT1YCH21 +// APORT1XCH22 +// APORT1YCH23 +// APORT1XCH24 +// APORT1YCH25 +// APORT1XCH26 +// APORT1YCH27 +// APORT1XCH28 +// APORT1YCH29 +// APORT1XCH30 +// APORT1YCH31 +// APORT2YCH0 +// APORT2XCH1 +// APORT2YCH2 +// APORT2XCH3 +// APORT2YCH4 +// APORT2XCH5 +// APORT2YCH6 +// APORT2XCH7 +// APORT2YCH8 +// APORT2XCH9 +// APORT2YCH10 +// APORT2XCH11 +// APORT2YCH12 +// APORT2XCH13 +// APORT2YCH14 +// APORT2XCH15 +// APORT2YCH16 +// APORT2XCH17 +// APORT2YCH18 +// APORT2XCH19 +// APORT2YCH20 +// APORT2XCH21 +// APORT2YCH22 +// APORT2XCH23 +// APORT2YCH24 +// APORT2XCH25 +// APORT2YCH26 +// APORT2XCH27 +// APORT2YCH28 +// APORT2XCH29 +// APORT2YCH30 +// APORT2XCH31 +// APORT3XCH0 +// APORT3YCH1 +// APORT3XCH2 +// APORT3YCH3 +// APORT3XCH4 +// APORT3YCH5 +// APORT3XCH6 +// APORT3YCH7 +// APORT3XCH8 +// APORT3YCH9 +// APORT3XCH10 +// APORT3YCH11 +// APORT3XCH12 +// APORT3YCH13 +// APORT3XCH14 +// APORT3YCH15 +// APORT3XCH16 +// APORT3YCH17 +// APORT3XCH18 +// APORT3YCH19 +// APORT3XCH20 +// APORT3YCH21 +// APORT3XCH22 +// APORT3YCH23 +// APORT3XCH24 +// APORT3YCH25 +// APORT3XCH26 +// APORT3YCH27 +// APORT3XCH28 +// APORT3YCH29 +// APORT3XCH30 +// APORT3YCH31 +// APORT4YCH0 +// APORT4XCH1 +// APORT4YCH2 +// APORT4XCH3 +// APORT4YCH4 +// APORT4XCH5 +// APORT4YCH6 +// APORT4XCH7 +// APORT4YCH8 +// APORT4XCH9 +// APORT4YCH10 +// APORT4XCH11 +// APORT4YCH12 +// APORT4XCH13 +// APORT4YCH14 +// APORT4XCH15 +// APORT4YCH16 +// APORT4XCH17 +// APORT4YCH18 +// APORT4XCH19 +// APORT4YCH20 +// APORT4XCH21 +// APORT4YCH22 +// APORT4XCH23 +// APORT4YCH24 +// APORT4XCH25 +// APORT4YCH26 +// APORT4XCH27 +// APORT4YCH28 +// APORT4XCH29 +// APORT4YCH30 +// APORT4XCH31 +// AVDD +// BUVDD +// DVDD +// PAVDD +// DECOUPLE +// IOVDD +// IOVDD1 +// VSP +// OPA2 +// TEMP +// DAC0OUT0 +// R5VOUT +// SP1 +// SP2 +// DAC0OUT1 +// SUBLSB +// OPA3 +// DEFAULT +// VSS +#define SL_BATTERY_MONITOR_ADC_POS_SEL adcPosSelAVDD + +// Battery Voltage is using R1/R2 resistive divider +#define SL_BATTERY_MONITOR_R_DIVIDER_ENABLED 1 + +// R1 Resistive divider Input Voltage leg +#define SL_BATTERY_MONITOR_R_DIVIDER_R1 1800 + +// R2 Resistive divider Ground leg +#define SL_BATTERY_MONITOR_R_DIVIDER_R2 2700 +// + +// end Battery Monitor config +// <<< end of configuration section >>> + +#define SL_BATTERY_MONITOR_R_DIVIDER_R1_R2 (SL_BATTERY_MONITOR_R_DIVIDER_R1 \ + + SL_BATTERY_MONITOR_R_DIVIDER_R2) +#define SL_BATTERY_MONITOR_R_DIVIDER_COEF SL_BATTERY_MONITOR_R_DIVIDER_R1_R2 \ + / SL_BATTERY_MONITOR_R_DIVIDER_R2 + + +// <<< sl:start pin_tool >>> +// SL_BATTERY_MONITOR_TX_ACTIVE +// $[PRS_SL_BATTERY_MONITOR_TX_ACTIVE] +#define SL_BATTERY_MONITOR_TX_ACTIVE_CHANNEL 0 +#define SL_BATTERY_MONITOR_TX_ACTIVE_PORT gpioPortA +#define SL_BATTERY_MONITOR_TX_ACTIVE_PIN 0 +#define SL_BATTERY_MONITOR_TX_ACTIVE_LOC 0 +// [PRS_SL_BATTERY_MONITOR_TX_ACTIVE]$ +// <<< sl:end pin_tool >>> + +#endif // SL_BATTERY_MONITOR_CONFIG_H diff --git a/TBS2Torch/config/sl_board_control_config.h b/TBS2Torch/config/sl_board_control_config.h deleted file mode 100644 index 742ba2f..0000000 --- a/TBS2Torch/config/sl_board_control_config.h +++ /dev/null @@ -1,144 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Board Control - ******************************************************************************* - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_BOARD_CONTROL_CONFIG_H -#define SL_BOARD_CONTROL_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Enable Relative Humidity and Temperature sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_RHT 1 - -// Enable Hall Effect sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_HALL 1 - -// Enable Barometric Pressure sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_PRESSURE 0 - -// Enable Light sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_LIGHT 0 - -// Enable Air Quality sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_GAS 0 - -// Enable Inertial Measurement Unit -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_IMU 1 - -// Enable Microphone -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_MICROPHONE 0 - -// Disable SPI Flash -// Default: 1 -#define SL_BOARD_DISABLE_MEMORY_SPI 1 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_SENSOR_RHT -// $[GPIO_SL_BOARD_ENABLE_SENSOR_RHT] -#ifndef SL_BOARD_ENABLE_SENSOR_RHT_PORT -#define SL_BOARD_ENABLE_SENSOR_RHT_PORT gpioPortF -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_RHT_PIN -#define SL_BOARD_ENABLE_SENSOR_RHT_PIN 9 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_RHT]$ - -// SL_BOARD_ENABLE_SENSOR_HALL -// $[GPIO_SL_BOARD_ENABLE_SENSOR_HALL] -#ifndef SL_BOARD_ENABLE_SENSOR_HALL_PORT -#define SL_BOARD_ENABLE_SENSOR_HALL_PORT gpioPortB -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_HALL_PIN -#define SL_BOARD_ENABLE_SENSOR_HALL_PIN 10 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_HALL]$ - -// SL_BOARD_ENABLE_SENSOR_PRESSURE -// $[GPIO_SL_BOARD_ENABLE_SENSOR_PRESSURE] -#ifndef SL_BOARD_ENABLE_SENSOR_PRESSURE_PORT -#define SL_BOARD_ENABLE_SENSOR_PRESSURE_PORT gpioPortF -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_PRESSURE_PIN -#define SL_BOARD_ENABLE_SENSOR_PRESSURE_PIN 9 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_PRESSURE]$ - -// SL_BOARD_ENABLE_SENSOR_LIGHT -// $[GPIO_SL_BOARD_ENABLE_SENSOR_LIGHT] -#ifndef SL_BOARD_ENABLE_SENSOR_LIGHT_PORT -#define SL_BOARD_ENABLE_SENSOR_LIGHT_PORT gpioPortF -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_LIGHT_PIN -#define SL_BOARD_ENABLE_SENSOR_LIGHT_PIN 9 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_LIGHT]$ - -// SL_BOARD_ENABLE_SENSOR_GAS -// $[GPIO_SL_BOARD_ENABLE_SENSOR_GAS] -#ifndef SL_BOARD_ENABLE_SENSOR_GAS_PORT -#define SL_BOARD_ENABLE_SENSOR_GAS_PORT gpioPortF -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_GAS_PIN -#define SL_BOARD_ENABLE_SENSOR_GAS_PIN 14 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_GAS]$ - -// SL_BOARD_ENABLE_SENSOR_IMU -// $[GPIO_SL_BOARD_ENABLE_SENSOR_IMU] -#ifndef SL_BOARD_ENABLE_SENSOR_IMU_PORT -#define SL_BOARD_ENABLE_SENSOR_IMU_PORT gpioPortF -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_IMU_PIN -#define SL_BOARD_ENABLE_SENSOR_IMU_PIN 8 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_IMU]$ - -// SL_BOARD_ENABLE_SENSOR_MICROPHONE -// $[GPIO_SL_BOARD_ENABLE_SENSOR_MICROPHONE] -#ifndef SL_BOARD_ENABLE_SENSOR_MICROPHONE_PORT -#define SL_BOARD_ENABLE_SENSOR_MICROPHONE_PORT gpioPortF -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_MICROPHONE_PIN -#define SL_BOARD_ENABLE_SENSOR_MICROPHONE_PIN 10 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_MICROPHONE]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/TBS2Torch/config/sl_cli_config.h b/TBS2Torch/config/sl_cli_config.h deleted file mode 100644 index ca59412..0000000 --- a/TBS2Torch/config/sl_cli_config.h +++ /dev/null @@ -1,117 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration file for CLI. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_CLI_CONFIG_H -#define SL_CLI_CONFIG_H - -/******************************************************************************* - ****************************** DEFINES ************************************ - ******************************************************************************/ - -// CLI Framework Configuration - -// String of the ascii unit separator. -// Default: "\x1f" -// Define the string that separates two commands. -#define SL_CLI_UNIT_SEPARATOR "\x1f" - -// Char of the ascii unit separator. -// Default: 0x1fU -// Define the command prompt indicating that a new command may be written. -#define SL_CLI_UNIT_SEPARATOR_CHAR 0x1fU - -// Max number of input arguments <0-32> -// Default: 8 -// Define the number of input arguments the application needs. -#define SL_CLI_MAX_INPUT_ARGUMENTS 16 - -// Size of input buffer <8-256> -// Default: 128 -// Define the maximum number of input characters needed by a command, -// including the arguments. -#define SL_CLI_INPUT_BUFFER_SIZE 128 - -// Size of output buffer <8-256> -// Default: 128 -// Define the maximum number of characters in an output string. -#define SL_CLI_OUTPUT_BUFFER_SIZE 128 - -// New command prompt -// Default: "> " -// Define the command prompt indicating that a new command may be written. -#define SL_CLI_PROMPT_STRING "TBS2Torch>" - -// Enable help descriptions -// Default: 1 -// If enabled, 'help' command will print out help messages for commands -#define SL_CLI_HELP_DESCRIPTION_ENABLED 1 - -// Indentation size when printing help -// Default: "2" -// Define the indentation size for help message printouts. -#define SL_CLI_HELP_CMD_PRE 2 - -// Size of command name -// Default: "30" -// Define the size of command names when printing help messages. -#define SL_CLI_HELP_CMD_SIZE 30 - -// Enable local echo -// Default: 1 -// If enabled, what is written in the terminal will be echoed back, so the -// user will see what is written. -#define SL_CLI_LOCAL_ECHO 1 - -// Enable advanced input handling -// Default: 1 -// If enabled, the CLI is extended with arrow handling, autocompletion -// of commands, and delete/backspace in the middle of words. -#define SL_CLI_ADVANCED_INPUT_HANDLING 1 - -// Max number of bytes of history <0-4096> -// Default: 512 -// Define the number of bytes of history that are saved. -#define SL_CLI_NUM_HISTORY_BYTES 512 -// - -#if SL_CLI_NUM_HISTORY_BYTES < SL_CLI_INPUT_BUFFER_SIZE && SL_CLI_NUM_HISTORY_BYTES != 0 - #error "Number of history bytes needs to be zero or bigger than input buffer" -#endif - -// Ignore command case -// Default: 1 -// If enabled, the CLI will ignore the case for commands. -#define SL_CLI_IGNORE_COMMAND_CASE 1 - -#endif // SL_CLI_CONFIG_H - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_cli_config_example.h b/TBS2Torch/config/sl_cli_config_example.h deleted file mode 100644 index 01d892d..0000000 --- a/TBS2Torch/config/sl_cli_config_example.h +++ /dev/null @@ -1,129 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration file for CLI. - * @version x.y.z - ******************************************************************************* - * # License - * Copyright 2018 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_CLI_CONFIG_EXAMPLE_H -#define SL_CLI_CONFIG_EXAMPLE_H - -/******************************************************************************* - ****************************** DEFINES ************************************ - ******************************************************************************/ - -// CLI instance task priority -// low + 1 -// low + 2 -// low + 3 -// low + 4 -// low + 5 -// low + 6 -// low + 7 -// below normal -// below normal + 1 -// below normal + 2 -// below normal + 3 -// below normal + 4 -// below normal + 5 -// below normal + 6 -// below normal + 7 -// normal -// normal + 1 -// normal + 2 -// normal + 3 -// normal + 4 -// normal + 5 -// normal + 6 -// normal + 7 -// above normal -// above normal + 1 -// above normal + 2 -// above normal + 3 -// above normal + 4 -// above normal + 5 -// above normal + 6 -// above normal + 7 -// high -// high + 1 -// high + 2 -// high + 3 -// high + 4 -// high + 5 -// high + 6 -// high + 7 -// realtime -// realtime + 1 -// realtime + 2 -// realtime + 3 -// realtime + 4 -// realtime + 5 -// realtime + 6 -// realtime + 7 -// Default: osPriorityNormal1 -// Priority of the CLI instance task using the CMSIS order and using the enum name - #define SL_CLI_EXAMPLE_TASK_PRIORITY osPriorityNormal1 - -// Task stack size -// Default: 400 -// Stack size for the CLI task in words. - #define SL_CLI_EXAMPLE_TASK_STACK_SIZE 400 - -// CLI task start delay -// Default: 0 -// Specifies the delay in milliseconds before the cli task start to poll for input. - #define SL_CLI_EXAMPLE_TASK_START_DELAY_MS 0 - -// CLI task loop delay -// Default: 50 -// Specifies the delay in milliseconds after the cli task has polled the input. - #define SL_CLI_EXAMPLE_TASK_LOOP_DELAY_MS 50 - -// The iostream handle used by the cli instance -// Default: sl_iostream_get_default() - #define SL_CLI_EXAMPLE_IOSTREAM_HANDLE sl_iostream_get_default() - -// The default command group. -// Default: sl_cli_default_command_group. -// Specifies a pointer to the command group that shall be used as the -// default command group for the cli instance. -// The template file that is creating cli instances will also create one -// command group for each cli instance. During initialization, the -// sl_cli_default_command_group will be updated for each instance to point -// to the instance version of the command group. This makes it possible to -// use the same variable for all instances, but each getting its own -// command group. -// The application can provide a group created elsewhere in the -// application or use an empty definition for no default group. -// Please note: A command group can only be used once. - #define SL_CLI_EXAMPLE_COMMAND_GROUP sl_cli_default_command_group - -#endif // SL_CLI_CONFIG_EXAMPLE_H - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_custom_manufacturing_token_header.h b/TBS2Torch/config/sl_custom_manufacturing_token_header.h deleted file mode 100644 index 08b6658..0000000 --- a/TBS2Torch/config/sl_custom_manufacturing_token_header.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Custom manufacturing token header - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -/***************************************************************************//** - * Custom Manufacturing Token Usage Examples - * - * The macro DEFINE_MFG_TOKEN() should be used when instantiating a - * manufacturing token. Refer to the list of *_LOCATION defines to - * see what memory is allocated and what memory is unused/available. - * - * The _LOCATION is or'ed with either USERDATA_TOKENS or LOCKBITSDATA_TOKENS - * to control which segment of memory the token is placed in. - * - * REMEMBER: By definition, manufacturing tokens exist at fixed addresses. - * Tokens should not overlap. - * - * Here is a basic example of a manufacturing token header file: - * - * Note that the address used here is just an example. It places the 8 bytes - * in the middle of the USERDATA space on an EFR32MG12P433F1024GM68. - * To review addresses of existing tokens when choosing a new address, refer - * to an961-custom-nodes-efr32.pdf and the files - * platform/service/token_manager/inc/sl_token_manufacturing_series_1.h - * platform/service/token_manager/inc/sl_token_manufacturing_series_2.h - * - * @code - * #define CREATOR_MFG_EXAMPLE 0x4242 - * #ifdef DEFINETYPES - * typedef uint8_t tokTypeMfgExample[8]; - * #endif - * #ifdef DEFINETOKENS - * #define MFG_EXAMPLE_LOCATION (USERDATA_TOKENS | 0x2000) - * DEFINE_MFG_TOKEN(MFG_EXAMPLE, - * tokTypeMfgExample, - * MFG_EXAMPLE_LOCATION, - * {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}) - * #endif - * @endcode - * - * Since this file contains both the typedefs and the token defs, there are - * two \#defines used to select which one is needed when this file is included. - * \#define DEFINETYPES is used to select the type definitions and - * \#define DEFINETOKENS is used to select the token definitions. - * - * To use this example: - * Ensure the Token Manager's configuration in Studio - * has enabled Custom Manufacuturing Tokens. - * - * Ensure your application has: - * #include "sl_token_api.h" - * #include "sl_token_manager.h" - * - * This code will read the token data: - * uint8_t data[8]; - * sl_token_get_data(TOKEN_MFG_EXAMPLE, 0, &data, sizeof(data)); - ******************************************************************************/ - -/* - #define CREATOR_MFG_EXAMPLE 0x4242 - #ifdef DEFINETYPES - typedef uint8_t tokTypeMfgExample[8]; - #endif - #ifdef DEFINETOKENS - #define MFG_EXAMPLE_LOCATION (USERDATA_TOKENS | 0x2000) - DEFINE_MFG_TOKEN(MFG_EXAMPLE, - tokTypeMfgExample, - MFG_EXAMPLE_LOCATION, - {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}) - #endif - */ diff --git a/TBS2Torch/config/sl_custom_token_header.h b/TBS2Torch/config/sl_custom_token_header.h deleted file mode 100644 index abfe057..0000000 --- a/TBS2Torch/config/sl_custom_token_header.h +++ /dev/null @@ -1,86 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Custom token header - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -/***************************************************************************//** - * Custom Tokens Usage Examples - * - * #define BASICTOKEN1_DEFAULT 0xA5F0 - * #define BASICTOKEN2_DEFAULT { { 0xAA, 0xBB, 0xCC }, 0xDDDD } - * #define BASICTOKEN3_DEFAULT { { 0 } } - * #define COUNTERTOKEN1_DEFAULT 0 - * #define COUNTERTOKEN2_DEFAULT 0xCCCCCCCC - * #define INDEXEDTOKEN1_DEFAULT 0 - * #define INDEXEDTOKEN2_DEFAULT { 0xDDDD } - * #define INDEXEDTOKEN3_DEFAULT { 0xAA, 0xBBBB, { 0x00, 0x11, 0x22 }, 0xCC } - * - * #ifdef DEFINETYPES - * typedef uint16_t tokTypeBasicToken1; - * typedef struct { - * uint8_t basicToken2Array[3]; - * uint16_t basicToken2VarA; - * } tokTypeBasicToken2; - * - * typedef struct { - * uint8_t basicToken3Array[254]; - * } tokTypeBasicToken3; - * - * typedef uint32_t tokTypeCounterToken1; - * typedef uint32_t tokTypeCounterToken2; - * - * typedef uint8_t tokTypeIndexedToken1Element; - * typedef uint16_t tokTypeIndexedToken2Element; - * - * typedef struct { - * uint8_t indexedToken3VarA; - * uint16_t indexedToken3VarB; - * uint8_t indexedToken3Array[3]; - * int8_t indexedToken3VarC; - * } tokTypeIndexedToken3Element; - * - * #endif - * - * #ifdef DEFINETOKENS - * DEFINE_BASIC_TOKEN(BASICTOKEN1, - * tokTypeBasicToken1, - * BASICTOKEN1_DEFAULT) - * DEFINE_BASIC_TOKEN(BASICTOKEN2, - * tokTypeBasicToken2, - * BASICTOKEN2_DEFAULT) - * DEFINE_BASIC_TOKEN(BASICTOKEN3, - * tokTypeBasicToken3, - * BASICTOKEN3_DEFAULT) - * DEFINE_COUNTER_TOKEN(COUNTERTOKEN1, - * tokTypeCounterToken1, - * COUNTERTOKEN1_DEFAULT) - * DEFINE_COUNTER_TOKEN(COUNTERTOKEN2, - * tokTypeCounterToken2, - * COUNTERTOKEN2_DEFAULT) - * DEFINE_INDEXED_TOKEN(INDEXEDTOKEN1, - * tokTypeIndexedToken1Element, - * INDEXEDTOKEN1_ELEMENTS, - * INDEXEDTOKEN1_DEFAULT) - * DEFINE_INDEXED_TOKEN(INDEXEDTOKEN2, - * tokTypeIndexedToken2Element, - * INDEXEDTOKEN2_ELEMENTS, - * INDEXEDTOKEN2_DEFAULT) - * DEFINE_INDEXED_TOKEN(INDEXEDTOKEN3, - * tokTypeIndexedToken3Element, - * INDEXEDTOKEN3_ELEMENTS, - * INDEXEDTOKEN3_DEFAULT) - * #endif - * - ******************************************************************************/ diff --git a/TBS2Torch/config/sl_debug_swo_config.h b/TBS2Torch/config/sl_debug_swo_config.h deleted file mode 100644 index 75896a7..0000000 --- a/TBS2Torch/config/sl_debug_swo_config.h +++ /dev/null @@ -1,109 +0,0 @@ -/***************************************************************************//** - * @file - * @brief SWO configuration - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_DEBUG_SWO_CONFIG_H -#define SL_DEBUG_SWO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// SWO Configuration - -// SWO Frequency -// Must be 875 kHz for communication with Silicon Labs debuggers -// Default: 875000 -#define SL_DEBUG_SWO_FREQ 875000 - -// Enable interrupt event trace -// Default: 0 -#define SL_DEBUG_SWO_SAMPLE_IRQ 0 - -// Enable Program Counter samples -// Default: 0 -#define SL_DEBUG_SWO_SAMPLE_PC 0 - -// SWO debug sample intervals -// <64=> 64 -// <128=> 128 -// <192=> 192 -// <256=> 256 -// <320=> 320 -// <384=> 384 -// <448=> 448 -// <512=> 512 -// <576=> 576 -// <640=> 640 -// <704=> 704 -// <768=> 768 -// <832=> 832 -// <896=> 896 -// <960=> 960 -// <1024=> 1024 -// <2048=> 2048 -// <3072=> 3072 -// <4096=> 4096 -// <5102=> 5102 -// <6144=> 6144 -// <7168=> 7168 -// <8192=> 8192 -// <9216=> 9216 -// <10240=> 10240 -// <11264=> 11264 -// <12288=> 12288 -// <13312=> 13312 -// <14336=> 14336 -// <15360=> 15360 -// Must be 64, 128, 192, [ n * 64 ], 1024, 2048, 3072, [ n * 1024 ] , 15360 -// Default: 15360 -#define SL_DEBUG_SWO_SAMPLE_INTERVAL 15360 -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_DEBUG -// $[DBG_SL_DEBUG] -#ifndef SL_DEBUG_PERIPHERAL -#define SL_DEBUG_PERIPHERAL DBG -#endif - -// DBG SWV on PF2 -#ifndef SL_DEBUG_SWV_PORT -#define SL_DEBUG_SWV_PORT gpioPortF -#endif -#ifndef SL_DEBUG_SWV_PIN -#define SL_DEBUG_SWV_PIN 2 -#endif -#ifndef SL_DEBUG_SWV_LOC -#define SL_DEBUG_SWV_LOC 0 -#endif -// [DBG_SL_DEBUG]$ -// <<< sl:end pin_tool >>> - -#endif // SL_DEBUG_SWO_CONFIG_H diff --git a/TBS2Torch/config/sl_device_init_dcdc_config.h b/TBS2Torch/config/sl_device_init_dcdc_config.h deleted file mode 100644 index 734aed3..0000000 --- a/TBS2Torch/config/sl_device_init_dcdc_config.h +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_DCDC Config - ******************************************************************************* - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_DEVICE_INIT_DCDC_CONFIG_H -#define SL_DEVICE_INIT_DCDC_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Enable DC/DC Converter -// -// Default: 1 -#define SL_DEVICE_INIT_DCDC_ENABLE 1 - -// Set DC/DC Converter in Bypass Mode -// -// Default: 0 -#define SL_DEVICE_INIT_DCDC_BYPASS 0 - -// Override for DCDC PFMX Mode Peak Current Setting -// -// Default: 0 -#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL_OVERRIDE 0 - -// DCDC PFMX Mode Peak Current Setting <0-15> -// -// Default: DCDC_PFMXCTRL_IPKVAL_DEFAULT -#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL DCDC_PFMXCTRL_IPKVAL_DEFAULT - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_DCDC_CONFIG_H diff --git a/TBS2Torch/config/sl_device_init_emu_config.h b/TBS2Torch/config/sl_device_init_emu_config.h deleted file mode 100644 index 387abf9..0000000 --- a/TBS2Torch/config/sl_device_init_emu_config.h +++ /dev/null @@ -1,68 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_EMU Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_DEVICE_INIT_EMU_CONFIG_H -#define SL_DEVICE_INIT_EMU_CONFIG_H - -#include "em_emu.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// EM4H Voltage scaling level -// Fast-wakeup voltage level -// Low-power optimized voltage level -// Default: emuVScaleEM4H_LowPower -#define SL_DEVICE_INIT_EMU_EM4_VSCALE emuVScaleEM4H_LowPower - -// Retain LFXO in EM4 -#define SL_DEVICE_INIT_EMU_EM4_RETAIN_LFXO 0 - -// Retain LFRCO in EM4 -#define SL_DEVICE_INIT_EMU_EM4_RETAIN_LFRCO 0 - -// Retain ULFRCO in EM4S -#define SL_DEVICE_INIT_EMU_EM4_RETAIN_ULFRCO 0 - -// Hibernate or shutoff EM4 state -// EM4 Shutoff -// EM4 Hibernate -// Default: emuEM4Shutoff -#define SL_DEVICE_INIT_EMU_EM4_STATE emuEM4Shutoff - -// EM4 pin retention mode -// No Retention: Pads enter reset state when entering EM4. -// Retention through EM4: Pads enter reset state when exiting EM4. -// Retention through EM4 and wakeup. -// Default: emuPinRetentionDisable -#define SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE emuPinRetentionDisable - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_EMU_CONFIG_H diff --git a/TBS2Torch/config/sl_device_init_hfxo_config.h b/TBS2Torch/config/sl_device_init_hfxo_config.h deleted file mode 100644 index 9ba9a31..0000000 --- a/TBS2Torch/config/sl_device_init_hfxo_config.h +++ /dev/null @@ -1,72 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_HFXO Config - ******************************************************************************* - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_DEVICE_INIT_HFXO_CONFIG_H -#define SL_DEVICE_INIT_HFXO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Mode -// -// Crystal oscillator -// External digital clock -// Default: cmuOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuOscMode_Crystal - -// Frequency <38000000-40000000> -// Default: 38400000 -#define SL_DEVICE_INIT_HFXO_FREQ 38400000 - -// HFXO precision in PPM <0-65535> -// Default: 50 -#define SL_DEVICE_INIT_HFXO_PRECISION 50 - -// CTUNE <0-511> -// Default: 360 -#define SL_DEVICE_INIT_HFXO_CTUNE 332 - -// Advanced Configurations -// Auto-start HFXO. This feature is incompatible with Power Manager and can only be enabled in applications that do not use Power Manager or a radio protocol stack. - DEPRECATED -// True -// False -// Default: false -#define SL_DEVICE_INIT_HFXO_AUTOSTART false - -// Auto-select HFXO. This feature is incompatible with Power Manager and can only be enabled in applications that do not use Power Manager or a radio protocol stack. - DEPRECATED -// True -// False -// Default: false -#define SL_DEVICE_INIT_HFXO_AUTOSELECT false - -// - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/sl_device_init_lfxo_config.h b/TBS2Torch/config/sl_device_init_lfxo_config.h deleted file mode 100644 index 0495970..0000000 --- a/TBS2Torch/config/sl_device_init_lfxo_config.h +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_LFXO Config - ******************************************************************************* - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_DEVICE_INIT_LFXO_CONFIG_H -#define SL_DEVICE_INIT_LFXO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Mode -// -// Crystal oscillator -// AC-coupled buffer -// External digital clock -// Default: cmuOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 32 - -// LFXO precision in PPM <0-65535> -// Default: 50 -#define SL_DEVICE_INIT_LFXO_PRECISION 100 - -// Startup Timeout Delay -// -// <_CMU_LFXOCTRL_TIMEOUT_2CYCLES=> 2 cycles -// <_CMU_LFXOCTRL_TIMEOUT_256CYCLES=> 256 cycles -// <_CMU_LFXOCTRL_TIMEOUT_1KCYCLES=> 1K cycles -// <_CMU_LFXOCTRL_TIMEOUT_2KCYCLES=> 2K cycles -// <_CMU_LFXOCTRL_TIMEOUT_4KCYCLES=> 4K cycles -// <_CMU_LFXOCTRL_TIMEOUT_8KCYCLES=> 8K cycles -// <_CMU_LFXOCTRL_TIMEOUT_16KCYCLES=> 16K cycles -// <_CMU_LFXOCTRL_TIMEOUT_32KCYCLES=> 32K cycles -// <_CMU_LFXOCTRL_TIMEOUT_DEFAULT=> Default -// Default: _CMU_LFXOCTRL_TIMEOUT_DEFAULT -#define SL_DEVICE_INIT_LFXO_TIMEOUT _CMU_LFXOCTRL_TIMEOUT_DEFAULT -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/sl_i2cspm_sensor_config.h b/TBS2Torch/config/sl_i2cspm_sensor_config.h deleted file mode 100644 index 2f1029a..0000000 --- a/TBS2Torch/config/sl_i2cspm_sensor_config.h +++ /dev/null @@ -1,88 +0,0 @@ -/***************************************************************************//** - * @file - * @brief I2CSPM Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_I2CSPM_SENSOR_CONFIG_H -#define SL_I2CSPM_SENSOR_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu - -// I2CSPM settings - -// Reference clock frequency -// Frequency in Hz of the reference clock. -// Select 0 to use the frequency of the currently selected clock. -// Default: 0 -#define SL_I2CSPM_SENSOR_REFERENCE_CLOCK 0 - -// Speed mode -// <0=> Standard mode (100kbit/s) -// <1=> Fast mode (400kbit/s) -// <2=> Fast mode plus (1Mbit/s) -// Default: 0 -#define SL_I2CSPM_SENSOR_SPEED_MODE 0 -// end I2CSPM config - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_I2CSPM_SENSOR -// $[I2C_SL_I2CSPM_SENSOR] -#ifndef SL_I2CSPM_SENSOR_PERIPHERAL -#define SL_I2CSPM_SENSOR_PERIPHERAL I2C1 -#endif -#ifndef SL_I2CSPM_SENSOR_PERIPHERAL_NO -#define SL_I2CSPM_SENSOR_PERIPHERAL_NO 1 -#endif - -// I2C1 SCL on PC5 -#ifndef SL_I2CSPM_SENSOR_SCL_PORT -#define SL_I2CSPM_SENSOR_SCL_PORT gpioPortC -#endif -#ifndef SL_I2CSPM_SENSOR_SCL_PIN -#define SL_I2CSPM_SENSOR_SCL_PIN 5 -#endif -#ifndef SL_I2CSPM_SENSOR_SCL_LOC -#define SL_I2CSPM_SENSOR_SCL_LOC 17 -#endif - -// I2C1 SDA on PC4 -#ifndef SL_I2CSPM_SENSOR_SDA_PORT -#define SL_I2CSPM_SENSOR_SDA_PORT gpioPortC -#endif -#ifndef SL_I2CSPM_SENSOR_SDA_PIN -#define SL_I2CSPM_SENSOR_SDA_PIN 4 -#endif -#ifndef SL_I2CSPM_SENSOR_SDA_LOC -#define SL_I2CSPM_SENSOR_SDA_LOC 17 -#endif -// [I2C_SL_I2CSPM_SENSOR]$ -// <<< sl:end pin_tool >>> - -#endif // SL_I2CSPM_SENSOR_CONFIG_H diff --git a/TBS2Torch/config/sl_icm20648_config.h b/TBS2Torch/config/sl_icm20648_config.h deleted file mode 100644 index 7ec4f80..0000000 --- a/TBS2Torch/config/sl_icm20648_config.h +++ /dev/null @@ -1,100 +0,0 @@ -/***************************************************************************//** - * @file - * @brief ICM20648 Config - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_ICM20648_CONFIG_H -#define SL_ICM20648_CONFIG_H - -// <<< sl:start pin_tool >>> -// SL_ICM20648_SPI -// $[USART_SL_ICM20648_SPI] -#ifndef SL_ICM20648_SPI_PERIPHERAL -#define SL_ICM20648_SPI_PERIPHERAL USART3 -#endif -#ifndef SL_ICM20648_SPI_PERIPHERAL_NO -#define SL_ICM20648_SPI_PERIPHERAL_NO 3 -#endif - -// USART3 TX on PC0 -#ifndef SL_ICM20648_SPI_TX_PORT -#define SL_ICM20648_SPI_TX_PORT gpioPortC -#endif -#ifndef SL_ICM20648_SPI_TX_PIN -#define SL_ICM20648_SPI_TX_PIN 0 -#endif -#ifndef SL_ICM20648_SPI_TX_LOC -#define SL_ICM20648_SPI_TX_LOC 18 -#endif - -// USART3 RX on PC1 -#ifndef SL_ICM20648_SPI_RX_PORT -#define SL_ICM20648_SPI_RX_PORT gpioPortC -#endif -#ifndef SL_ICM20648_SPI_RX_PIN -#define SL_ICM20648_SPI_RX_PIN 1 -#endif -#ifndef SL_ICM20648_SPI_RX_LOC -#define SL_ICM20648_SPI_RX_LOC 18 -#endif - -// USART3 CLK on PC2 -#ifndef SL_ICM20648_SPI_CLK_PORT -#define SL_ICM20648_SPI_CLK_PORT gpioPortC -#endif -#ifndef SL_ICM20648_SPI_CLK_PIN -#define SL_ICM20648_SPI_CLK_PIN 2 -#endif -#ifndef SL_ICM20648_SPI_CLK_LOC -#define SL_ICM20648_SPI_CLK_LOC 18 -#endif -// [USART_SL_ICM20648_SPI]$ - -// SL_ICM20648_SPI_CS -// $[GPIO_SL_ICM20648_SPI_CS] -#ifndef SL_ICM20648_SPI_CS_PORT -#define SL_ICM20648_SPI_CS_PORT gpioPortC -#endif -#ifndef SL_ICM20648_SPI_CS_PIN -#define SL_ICM20648_SPI_CS_PIN 3 -#endif -// [GPIO_SL_ICM20648_SPI_CS]$ - -// SL_ICM20648_INT -// $[GPIO_SL_ICM20648_INT] -#ifndef SL_ICM20648_INT_PORT -#define SL_ICM20648_INT_PORT gpioPortF -#endif -#ifndef SL_ICM20648_INT_PIN -#define SL_ICM20648_INT_PIN 12 -#endif -// [GPIO_SL_ICM20648_INT]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_ICM20648_CONFIG_H diff --git a/TBS2Torch/config/sl_iostream_usart_vcom_config.h b/TBS2Torch/config/sl_iostream_usart_vcom_config.h deleted file mode 100644 index 6cf1ccf..0000000 --- a/TBS2Torch/config/sl_iostream_usart_vcom_config.h +++ /dev/null @@ -1,140 +0,0 @@ -/***************************************************************************//** - * @file - * @brief IOSTREAM_USART Config. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_IOSTREAM_USART_VCOM_CONFIG_H -#define SL_IOSTREAM_USART_VCOM_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// USART settings - -// Baud rate -// Default: 115200 -#define SL_IOSTREAM_USART_VCOM_BAUDRATE 115200 - -// Parity mode to use -// No Parity -// Even parity -// Odd parity -// Default: usartNoParity -#define SL_IOSTREAM_USART_VCOM_PARITY usartNoParity - -// Number of stop bits to use. -// 0.5 stop bits -// 1 stop bits -// 1.5 stop bits -// 2 stop bits -// Default: usartStopbits1 -#define SL_IOSTREAM_USART_VCOM_STOP_BITS usartStopbits1 - -// Flow control -// None -// CTS -// RTS -// CTS/RTS -// Software Flow control (XON/XOFF) -// Default: usartHwFlowControlNone -#define SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE usartHwFlowControlNone - -// Receive buffer size -// Default: 32 -#define SL_IOSTREAM_USART_VCOM_RX_BUFFER_SIZE 32 - -// Convert \n to \r\n -// It can be changed at runtime using the C API. -// Default: 0 -#define SL_IOSTREAM_USART_VCOM_CONVERT_BY_DEFAULT_LF_TO_CRLF 0 - -// Restrict the energy mode to allow the reception. -// Default: 1 -// Limits the lowest energy mode the system can sleep to in order to keep the reception on. May cause higher power consumption. -#define SL_IOSTREAM_USART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION 1 - -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_IOSTREAM_USART_VCOM -// $[USART_SL_IOSTREAM_USART_VCOM] -#ifndef SL_IOSTREAM_USART_VCOM_PERIPHERAL -#define SL_IOSTREAM_USART_VCOM_PERIPHERAL USART0 -#endif -#ifndef SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO -#define SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO 0 -#endif - -// USART0 TX on PA0 -#ifndef SL_IOSTREAM_USART_VCOM_TX_PORT -#define SL_IOSTREAM_USART_VCOM_TX_PORT gpioPortA -#endif -#ifndef SL_IOSTREAM_USART_VCOM_TX_PIN -#define SL_IOSTREAM_USART_VCOM_TX_PIN 0 -#endif -#ifndef SL_IOSTREAM_USART_VCOM_TX_LOC -#define SL_IOSTREAM_USART_VCOM_TX_LOC 0 -#endif - -// USART0 RX on PA1 -#ifndef SL_IOSTREAM_USART_VCOM_RX_PORT -#define SL_IOSTREAM_USART_VCOM_RX_PORT gpioPortA -#endif -#ifndef SL_IOSTREAM_USART_VCOM_RX_PIN -#define SL_IOSTREAM_USART_VCOM_RX_PIN 1 -#endif -#ifndef SL_IOSTREAM_USART_VCOM_RX_LOC -#define SL_IOSTREAM_USART_VCOM_RX_LOC 0 -#endif - -// USART0 CTS on PA2 -#ifndef SL_IOSTREAM_USART_VCOM_CTS_PORT -#define SL_IOSTREAM_USART_VCOM_CTS_PORT gpioPortA -#endif -#ifndef SL_IOSTREAM_USART_VCOM_CTS_PIN -#define SL_IOSTREAM_USART_VCOM_CTS_PIN 2 -#endif -#ifndef SL_IOSTREAM_USART_VCOM_CTS_LOC -#define SL_IOSTREAM_USART_VCOM_CTS_LOC 30 -#endif - -// USART0 RTS on PA3 -#ifndef SL_IOSTREAM_USART_VCOM_RTS_PORT -#define SL_IOSTREAM_USART_VCOM_RTS_PORT gpioPortA -#endif -#ifndef SL_IOSTREAM_USART_VCOM_RTS_PIN -#define SL_IOSTREAM_USART_VCOM_RTS_PIN 3 -#endif -#ifndef SL_IOSTREAM_USART_VCOM_RTS_LOC -#define SL_IOSTREAM_USART_VCOM_RTS_LOC 30 -#endif -// [USART_SL_IOSTREAM_USART_VCOM]$ -// <<< sl:end pin_tool >>> - -#endif diff --git a/TBS2Torch/config/sl_legacy_hal_wdog_config.h b/TBS2Torch/config/sl_legacy_hal_wdog_config.h deleted file mode 100644 index 86a5c62..0000000 --- a/TBS2Torch/config/sl_legacy_hal_wdog_config.h +++ /dev/null @@ -1,88 +0,0 @@ -/***************************************************************************//** - * @file sl_legacy_hal_wdog_config.h - * @brief Legacy HAL watchdog configuration file. - ******************************************************************************* - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_LEGACY_HAL_WDOG_CONFIG_H -#define SL_LEGACY_HAL_WDOG_CONFIG_H - -// Legacy HAL WDOG Configurations - -// Disable calling halInternalEnableWatchDog in base-replacement.c's halInit(). -// Default: 0 -#define SL_LEGACY_HAL_DISABLE_WATCHDOG 0 -// - -// WDOG to use for SL_LEGACY_HAL_WDOGn. -// Default: 0 -// <0=> WDOG0 -// <1=> WDOD1 -#define SL_LEGACY_HAL_WDOGn 0 - -// Period for SL_LEGACY_HAL_WDOG timeout. -// Default: wdogPeriod_64k -// The default period of wdogPeriod_64k will trigger watchdog reset after 2 seconds (64k / 32k) and warning interrupt is triggered after 1.5 seconds (75% of timeout). -// wdogPeriod_9 / 9 clock periods -// wdogPeriod_17 / 17 clock periods -// wdogPeriod_33 / 33 clock periods -// wdogPeriod_65 / 65 clock periods -// wdogPeriod_129 / 129 clock periods -// wdogPeriod_257 / 257 clock periods -// wdogPeriod_513 / 513 clock periods -// wdogPeriod_1k / 1025 clock periods -// wdogPeriod_2k / 2049 clock periods -// wdogPeriod_4k / 4097 clock periods -// wdogPeriod_8k / 8193 clock periods -// wdogPeriod_16k / 16385 clock periods -// wdogPeriod_32k / 32769 clock periods -// wdogPeriod_64k / 65537 clock periods -// wdogPeriod_128k / 131073 clock periods -// wdogPeriod_256k / 262145 clock periods -#define SL_LEGACY_HAL_WDOG_PERIOD wdogPeriod_64k - -// Warning for SL_LEGACY_HAL_WDOG timeout. -// Default: wdogWarnTime75pct -// The default warning of wdogWarnTime75pct will trigger warning interrupt after 1.5 seconds (75% of timeout) if the period is wdogPeriod_64k. -// wdogWarnDisable / Watchdog warning period is disabled -// wdogWarnTime25pct / Watchdog warning period is 25% of the timeout -// wdogWarnTime50pct / Watchdog warning period is 50% of the timeout -// wdogWarnTime75pct / Watchdog warning period is 75% of the timeout -#define SL_LEGACY_HAL_WDOG_WARNING wdogWarnTime75pct - -// Counter keeps running during debug halt. -// Default: 0 -#define SL_LEGACY_HAL_WDOG_DEBUG_RUN 0 -// - -// - -#endif /* SL_LEGACY_HAL_WDOG_CONFIG_H */ - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_mbedtls_config.h b/TBS2Torch/config/sl_mbedtls_config.h deleted file mode 100644 index 5ebefc9..0000000 --- a/TBS2Torch/config/sl_mbedtls_config.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef SL_MBEDTLS_CONFIG_H -#define SL_MBEDTLS_CONFIG_H - -// ----------------------------------------------------------------------------- -// User exposed config options - -// <<< Use Configuration Wizard in Context Menu >>> - -// TLS/DTLS configuration - -// Complete list of ciphersuites to use, in order of preference. -// Default: MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 -// Complete list of ciphersuites to use, in order of preference. -// The value of this configuration should be updated for the application needs. -#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 - -// Maximum TLS/DTLS fragment length in bytes (input). -// Default: 768 -// The size configured here determines the size of the internal I/O -// buffer used in mbedTLS when receiving data. -#define SL_MBEDTLS_SSL_IN_CONTENT_LEN 768 - -// Maximum TLS/DTLS fragment length in bytes (output). -// Default: 768 -// The size configured here determines the size of the internal I/O -// buffer used in mbedTLS when sending data. -#define SL_MBEDTLS_SSL_OUT_CONTENT_LEN 768 - -// Enable support for RFC 6066 max_fragment_length extension in SSL. -// Default: 1 -// Enable support for RFC 6066 max_fragment_length extension in SSL. -#define SL_MBEDTLS_SSL_MAX_FRAGMENT_LENGTH 1 - -// Enable support for exporting key block and master secret. -// Default: 1 -// Enable support for exporting key block and master secret. -// This is required for certain users of TLS, e.g. EAP-TLS. -#define SL_MBEDTLS_SSL_EXPORT_KEYS 1 - -// Enable the PSK based ciphersuite modes in SSL / TLS. -// Default: 0 -// Enable the PSK based ciphersuite modes in SSL / TLS. -#define SL_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED 0 - -// Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. -// Default: 0 -// Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. -#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED 0 - -// Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. -// Default: 0 -// Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. -#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED 0 - -// Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. -// Default: 0 -// Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. -#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED 0 - -// Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. -// Default: 0 -// Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. -#define SL_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 0 - -// Enable parsing of the compressed curves. -// Default: 0 -// Enable parsing of the compressed curves. -#define SL_MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING 0 - -// - -// RSA configuration - -// Disable use of the Chinese Remainder Theorem for RSA. -// Default: 0 -// Disable use of the Chinese Remainder Theorem for RSA private key -// computations. -#define SL_MBEDTLS_RSA_NO_CRT 0 - -// - -// Miscellaneous configuration - -// Enable Silicon Labs' Mbed TLS- and PSA Crypto drivers. -// Default: 1 -// Enable drivers for hardware acceleration (Mbed TLS and PSA Crypto) and -// secure key handling (PSA Crypto). -#define SL_MBEDTLS_DRIVERS_ENABLED 1 - -// - -// <<< end of configuration section >>> - -// ----------------------------------------------------------------------------- -// Sub-files - -#if defined(SLI_MBEDTLS_CONFIG_AUTOGEN_OVERRIDE_FILE) - #include SLI_MBEDTLS_CONFIG_AUTOGEN_OVERRIDE_FILE -#else - #include "sli_mbedtls_config_autogen.h" -#endif - -#include "sli_mbedtls_omnipresent.h" - -#if SL_MBEDTLS_DRIVERS_ENABLED - #include "sli_mbedtls_acceleration.h" -#endif - -#include "sl_mbedtls_device_config.h" - -// Include transformation logic to apply CMSIS-config configuration options to -// the correct Mbed TLS / PSA Crypto options. -#include "sli_mbedtls_config_transform_autogen.h" - -// Included for backward compatibility reasons. -#include "mbedtls/build_info.h" - -#endif // SL_MBEDTLS_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/sl_mbedtls_device_config.h b/TBS2Torch/config/sl_mbedtls_device_config.h deleted file mode 100644 index 33c34c4..0000000 --- a/TBS2Torch/config/sl_mbedtls_device_config.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef SL_MBEDTLS_DEVICE_CONFIG_H -#define SL_MBEDTLS_DEVICE_CONFIG_H - -// ----------------------------------------------------------------------------- -// User exposed config options - -// <<< Use Configuration Wizard in Context Menu >>> - -// Secure Engine (SE) version configuration - -// Support SE firmware versions older than 1.2.2 <0-1> -// Enable software fallback for ECDH and ECC public key validation on xG21 -// devices running SE firmware versions lower than 1.2.2. -// -// Due to other stability concerns, it is strongly recommended to upgrade -// these devices to the latest firmware revision instead of turning on -// software fallback support. -// -// Not having fallback support will make ECDH operations, as well as PSA -// Crypto public key import, return an error code on affected devices. -// -// Default: 0 -#define SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 0 - -// Assume an SE firmware version newer than 1.2.2 <0-1> -// For enhanced performance: if it is guaranteed that all devices on which -// this library will run are updated to at least SE FW 1.2.2, then turning -// on this option will remove certain fallback checks, thereby reducing the -// amount of processing required for ECDH and public key verification -// operations. -// Default: 0 -#define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 0 - -// Assume an SE firmware version that is unaffected by Ed25519 errata <0-1> -// For minimal code size and performance savings: if it is guaranteed that -// none of the devices running this library has SE FWs in the range -// [1.2.2, 1.2.8], then enabling this option will disable runtime version -// checks. -// Default: 0 -#define SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA 0 - -// - -// <<< end of configuration section >>> - -// ----------------------------------------------------------------------------- -// Additional SE version related logic (DO NOT MODIFY) - -// SL_SE_ASSUME_FW_AT_LEAST_1_2_10 is no longer in use, however, it is kept here -// for backwards compatibility. */ -#if defined(SL_SE_ASSUME_FW_AT_LEAST_1_2_10) - #undef SL_SE_ASSUME_FW_AT_LEAST_1_2_2 - #define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 1 - #undef SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA - #define SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA 1 -#endif - -// SLI_SE_SUPPORT_FW_PRIOR_TO_1_2_2 is no longer in use, however, it is kept -// here for backwards compatibility. */ -#if defined(SLI_SE_SUPPORT_FW_PRIOR_TO_1_2_2) - #undef SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 - #define SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 1 -#endif - -// SLI_SE_ASSUME_FW_AT_LEAST_1_2_2 is no longer in use, however, it is kept -// here for backwards compatibility. */ -#if defined(SLI_SE_ASSUME_FW_AT_LEAST_1_2_2) - #undef SL_SE_ASSUME_FW_AT_LEAST_1_2_2 - #define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 1 -#endif - -#endif // SL_MBEDTLS_DEVICE_CONFIG_H diff --git a/TBS2Torch/config/sl_memory_config.h b/TBS2Torch/config/sl_memory_config.h deleted file mode 100644 index b43ebcb..0000000 --- a/TBS2Torch/config/sl_memory_config.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef SL_MEMORY_CONFIG_H -#define SL_MEMORY_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Memory configuration - -// Stack size for the application. -// Default: 4096 -// The stack size configured here will be used by the stack that the -// application uses when coming out of a reset. -#ifndef SL_STACK_SIZE - #define SL_STACK_SIZE 4096 -#endif - -// Minimum heap size for the application. -// Default: 2048 -// Note that this value will configure the c heap which is normally used by -// malloc() and free() from the c library. The value defines a minimum heap -// size that is guaranteed to be available. The available heap may be larger -// to make use of any memory that would otherwise remain unused. -#ifndef SL_HEAP_SIZE - #define SL_HEAP_SIZE 2048 -#endif - -// -// <<< end of configuration section >>> - -#endif diff --git a/TBS2Torch/config/sl_mx25_flash_shutdown_usart_config.h b/TBS2Torch/config/sl_mx25_flash_shutdown_usart_config.h deleted file mode 100644 index 6879f7b..0000000 --- a/TBS2Torch/config/sl_mx25_flash_shutdown_usart_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************//** - * @file - * @brief SL_MX25_FLASH_SHUTDOWN_USART Config - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -#ifndef SL_MX25_FLASH_SHUTDOWN_CONFIG_H -#define SL_MX25_FLASH_SHUTDOWN_CONFIG_H - -// <<< sl:start pin_tool >>> -// {usart signal=TX,RX,CLK} SL_MX25_FLASH_SHUTDOWN -// [USART_SL_MX25_FLASH_SHUTDOWN] -#define SL_MX25_FLASH_SHUTDOWN_PERIPHERAL USART2 -#define SL_MX25_FLASH_SHUTDOWN_PERIPHERAL_NO 2 - -// USART2 TX on PK0 -#define SL_MX25_FLASH_SHUTDOWN_TX_PORT gpioPortK -#define SL_MX25_FLASH_SHUTDOWN_TX_PIN 0 -#define SL_MX25_FLASH_SHUTDOWN_TX_LOC 29 - -// USART2 RX on PK2 -#define SL_MX25_FLASH_SHUTDOWN_RX_PORT gpioPortK -#define SL_MX25_FLASH_SHUTDOWN_RX_PIN 2 -#define SL_MX25_FLASH_SHUTDOWN_RX_LOC 30 - -// USART2 CLK on PF7 -#define SL_MX25_FLASH_SHUTDOWN_CLK_PORT gpioPortF -#define SL_MX25_FLASH_SHUTDOWN_CLK_PIN 7 -#define SL_MX25_FLASH_SHUTDOWN_CLK_LOC 18 - -// [USART_SL_MX25_FLASH_SHUTDOWN] - -// SL_MX25_FLASH_SHUTDOWN_CS - -// $[GPIO_SL_MX25_FLASH_SHUTDOWN_CS] -#ifndef SL_MX25_FLASH_SHUTDOWN_CS_PORT -#define SL_MX25_FLASH_SHUTDOWN_CS_PORT gpioPortK -#endif -#ifndef SL_MX25_FLASH_SHUTDOWN_CS_PIN -#define SL_MX25_FLASH_SHUTDOWN_CS_PIN 1 -#endif -// [GPIO_SL_MX25_FLASH_SHUTDOWN_CS]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_MX25_FLASH_SHUTDOWN_CONFIG_H diff --git a/TBS2Torch/config/sl_power_manager_config.h b/TBS2Torch/config/sl_power_manager_config.h deleted file mode 100644 index e4b1da0..0000000 --- a/TBS2Torch/config/sl_power_manager_config.h +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Power Manager configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_POWER_MANAGER_CONFIG_H -#define SL_POWER_MANAGER_CONFIG_H - -// Power Manager Configuration - -// Enable custom IRQ handler for external HF oscillator. -// Enable if CMU_IRQHandler/HFXO0_IRQHandler is needed from your application. -// The function sl_power_manager_irq_handler() will have to be called from you custom handler if this is enabled. -// Default: 0 -#define SL_POWER_MANAGER_CUSTOM_HF_OSCILLATOR_IRQ_HANDLER 0 - -// Enable fast wakeup (disable voltage scaling in EM2/3 mode) -// Enable or disable voltage scaling in EM2/3 modes (when available). This decreases wakeup time by about 30 us. -// Deprecated. It is replaced by the function sl_power_manager_em23_voltage_scaling_enable_fast_wakeup() -// Default: 0 -#define SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP 0 - -// Enable debugging feature -// Enable or disable debugging features (trace the different modules that have requirements). -// Default: 0 -#define SL_POWER_MANAGER_DEBUG 0 - -// Maximum numbers of requirements that can be logged -// Default: 10 -#define SL_POWER_MANAGER_DEBUG_POOL_SIZE 10 -// - -// - -#endif /* SL_POWER_MANAGER_CONFIG_H */ - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/TBS2Torch/config/sl_rail_util_pa_config.h b/TBS2Torch/config/sl_rail_util_pa_config.h deleted file mode 100644 index d2115c7..0000000 --- a/TBS2Torch/config/sl_rail_util_pa_config.h +++ /dev/null @@ -1,80 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Power Amplifier configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_RAIL_UTIL_PA_CONFIG_H -#define SL_RAIL_UTIL_PA_CONFIG_H - -#include "rail_types.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// PA Configuration -// Initial PA Power (deci-dBm, 100 = 10.0 dBm) -// Default: 100 -#define SL_RAIL_UTIL_PA_POWER_DECI_DBM 100 -// PA Ramp Time (microseconds) -// <0-65535:1> -// Default: 10 -#define SL_RAIL_UTIL_PA_RAMP_TIME_US 10 -// Milli-volts on PA supply pin (PA_VDD) -// <0-65535:1> -// Default: 3300 -#define SL_RAIL_UTIL_PA_VOLTAGE_MV 1800 -// 2.4 GHz PA Selection -// High Power -// Low Power -// Disable -// Default: RAIL_TX_POWER_MODE_2P4GIG_HP -#define SL_RAIL_UTIL_PA_SELECTION_2P4GHZ RAIL_TX_POWER_MODE_2P4GIG_HP -// Sub-1 GHz PA Selection -// Enable -// Disable -// Default: RAIL_TX_POWER_MODE_SUBGIG -#define SL_RAIL_UTIL_PA_SELECTION_SUBGHZ RAIL_TX_POWER_MODE_NONE -// - -// PA Curve Configuration -// Header file containing custom PA curves -// Default: "pa_curves_efr32.h" -#define SL_RAIL_UTIL_PA_CURVE_HEADER "pa_curves_efr32.h" -// Header file containing PA curve types -// Default: "pa_curve_types_efr32.h" -#define SL_RAIL_UTIL_PA_CURVE_TYPES "pa_curve_types_efr32.h" -// - -// PA Calibration Configuration -// Apply PA Calibration Factory Offset -// Default: 1 -#define SL_RAIL_UTIL_PA_CALIBRATION_ENABLE 1 -// - -// <<< end of configuration section >>> - -#endif // SL_RAIL_UTIL_PA_CONFIG_H diff --git a/TBS2Torch/config/sl_rail_util_power_manager_init_config.h b/TBS2Torch/config/sl_rail_util_power_manager_init_config.h deleted file mode 100644 index cbc69f2..0000000 --- a/TBS2Torch/config/sl_rail_util_power_manager_init_config.h +++ /dev/null @@ -1,44 +0,0 @@ -/***************************************************************************//** - * @file - * @brief RAIL power manager configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H -#define SL_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// RAIL power manager configuration - -// Enable RAIL power manager initialization -// Default: 1 -#define SL_RAIL_UTIL_RAIL_POWER_MANAGER_INIT 1 - -// -// <<< end of configuration section >>> -#endif // SL_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H diff --git a/TBS2Torch/config/sl_rail_util_pti_config.h b/TBS2Torch/config/sl_rail_util_pti_config.h deleted file mode 100644 index 0df2b0d..0000000 --- a/TBS2Torch/config/sl_rail_util_pti_config.h +++ /dev/null @@ -1,88 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Packet Trace Information configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_RAIL_UTIL_PTI_CONFIG_H -#define SL_RAIL_UTIL_PTI_CONFIG_H - -#include "rail_types.h" - -// <<< Use Configuration Wizard in Context Menu >>> -// PTI Configuration - -// PTI mode -// UART -// UART onewire -// SPI -// Disabled -// Default: RAIL_PTI_MODE_UART -#define SL_RAIL_UTIL_PTI_MODE RAIL_PTI_MODE_UART - -// PTI Baud Rate (Hertz) -// <147800-20000000:1> -// Default: 1600000 -#define SL_RAIL_UTIL_PTI_BAUD_RATE_HZ 1600000 - -// -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_RAIL_UTIL_PTI -// $[PTI_SL_RAIL_UTIL_PTI] -#ifndef SL_RAIL_UTIL_PTI_PERIPHERAL -#define SL_RAIL_UTIL_PTI_PERIPHERAL PTI -#endif - -// PTI DOUT on PB12 -#ifndef SL_RAIL_UTIL_PTI_DOUT_PORT -#define SL_RAIL_UTIL_PTI_DOUT_PORT gpioPortB -#endif -#ifndef SL_RAIL_UTIL_PTI_DOUT_PIN -#define SL_RAIL_UTIL_PTI_DOUT_PIN 12 -#endif -#ifndef SL_RAIL_UTIL_PTI_DOUT_LOC -#define SL_RAIL_UTIL_PTI_DOUT_LOC 6 -#endif - -// PTI DFRAME on PB13 -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PORT -#define SL_RAIL_UTIL_PTI_DFRAME_PORT gpioPortB -#endif -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PIN -#define SL_RAIL_UTIL_PTI_DFRAME_PIN 13 -#endif -#ifndef SL_RAIL_UTIL_PTI_DFRAME_LOC -#define SL_RAIL_UTIL_PTI_DFRAME_LOC 6 -#endif - -// [PTI_SL_RAIL_UTIL_PTI]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_RAIL_UTIL_PTI_CONFIG_H diff --git a/TBS2Torch/config/sl_simple_button_btn0_config.h b/TBS2Torch/config/sl_simple_button_btn0_config.h deleted file mode 100644 index 04dfd5b..0000000 --- a/TBS2Torch/config/sl_simple_button_btn0_config.h +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Simple Button Driver User Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_SIMPLE_BUTTON_BTN0_CONFIG_H -#define SL_SIMPLE_BUTTON_BTN0_CONFIG_H - -#include "em_gpio.h" -#include "sl_simple_button.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// -// Interrupt -// Poll and Debounce -// Poll -// Default: SL_SIMPLE_BUTTON_MODE_INTERRUPT -#define SL_SIMPLE_BUTTON_BTN0_MODE SL_SIMPLE_BUTTON_MODE_INTERRUPT -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_SIMPLE_BUTTON_BTN0 -// $[GPIO_SL_SIMPLE_BUTTON_BTN0] -#ifndef SL_SIMPLE_BUTTON_BTN0_PORT -#define SL_SIMPLE_BUTTON_BTN0_PORT gpioPortD -#endif -#ifndef SL_SIMPLE_BUTTON_BTN0_PIN -#define SL_SIMPLE_BUTTON_BTN0_PIN 14 -#endif -// [GPIO_SL_SIMPLE_BUTTON_BTN0]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_SIMPLE_BUTTON_BTN0_CONFIG_H diff --git a/TBS2Torch/config/sl_simple_button_btn1_config.h b/TBS2Torch/config/sl_simple_button_btn1_config.h deleted file mode 100644 index 90dbc43..0000000 --- a/TBS2Torch/config/sl_simple_button_btn1_config.h +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Simple Button Driver User Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_SIMPLE_BUTTON_BTN1_CONFIG_H -#define SL_SIMPLE_BUTTON_BTN1_CONFIG_H - -#include "em_gpio.h" -#include "sl_simple_button.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// -// Interrupt -// Poll and Debounce -// Poll -// Default: SL_SIMPLE_BUTTON_MODE_INTERRUPT -#define SL_SIMPLE_BUTTON_BTN1_MODE SL_SIMPLE_BUTTON_MODE_INTERRUPT -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_SIMPLE_BUTTON_BTN1 -// $[GPIO_SL_SIMPLE_BUTTON_BTN1] -#ifndef SL_SIMPLE_BUTTON_BTN1_PORT -#define SL_SIMPLE_BUTTON_BTN1_PORT gpioPortD -#endif -#ifndef SL_SIMPLE_BUTTON_BTN1_PIN -#define SL_SIMPLE_BUTTON_BTN1_PIN 15 -#endif -// [GPIO_SL_SIMPLE_BUTTON_BTN1]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_SIMPLE_BUTTON_BTN1_CONFIG_H diff --git a/TBS2Torch/config/sl_simple_button_config.h b/TBS2Torch/config/sl_simple_button_config.h deleted file mode 100644 index 5beffe8..0000000 --- a/TBS2Torch/config/sl_simple_button_config.h +++ /dev/null @@ -1,73 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Simple Button Driver Configuration - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_SIMPLE_BUTTON_CONFIG_H -#define SL_SIMPLE_BUTTON_CONFIG_H - -#include "em_gpio.h" -// <<< Use Configuration Wizard in Context Menu >>> - -// Simple Button Driver Configuration - -// Number of bits <1-15> -// Default: 5 -// Defines the number of calls to sl_simple_button_poll_step wherein the button -// state must remain the same before the button state is considered debounced -#define SL_SIMPLE_BUTTON_DEBOUNCE_BITS 5U - -// -// GPIO Input -// GPIO Input Pull -// GPIO Input Pull Filter -// Default: gpioModeInput -#define SL_SIMPLE_BUTTON_GPIO_MODE gpioModeInput - -// -// SL_SIMPLE_BUTTON_GPIO_MODE == gpioModeInput, Filter if DOUT is set -// SL_SIMPLE_BUTTON_GPIO_MODE == gpioModeInputPull, DOUT determines pull direction -// SL_SIMPLE_BUTTON_GPIO_MODE == gpioModeInputPullFilter, DOUT determines pull direction -#define SL_SIMPLE_BUTTON_GPIO_DOUT 0U - -// -// 0 Active Low -// 1 Active High -// Default: 0 -#define SL_SIMPLE_BUTTON_POLARITY 0U - -// Allow the app to manage Buttons and LEDs on the same pin -// 0 Error if Buttons and LEDs are on the same pin -// 1 Do not error if Buttons and LEDs are on the same pin -// Default: 0 -#define SL_SIMPLE_BUTTON_ALLOW_LED_CONFLICT 0U - -// - -// <<< end of configuration section >>> -#endif // SL_SIMPLE_BUTTON_CONFIG_H \ No newline at end of file diff --git a/TBS2Torch/config/sl_simple_led_led0_config.h b/TBS2Torch/config/sl_simple_led_led0_config.h deleted file mode 100644 index 0c515d8..0000000 --- a/TBS2Torch/config/sl_simple_led_led0_config.h +++ /dev/null @@ -1,60 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Simple Led Driver Configuration - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_SIMPLE_LED_LED0_CONFIG_H -#define SL_SIMPLE_LED_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Simple LED configuration -// -// Active low -// Active high -// Default: SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH -#define SL_SIMPLE_LED_LED0_POLARITY SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH -// end led configuration - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_SIMPLE_LED_LED0 -// $[GPIO_SL_SIMPLE_LED_LED0] -#ifndef SL_SIMPLE_LED_LED0_PORT -#define SL_SIMPLE_LED_LED0_PORT gpioPortD -#endif -#ifndef SL_SIMPLE_LED_LED0_PIN -#define SL_SIMPLE_LED_LED0_PIN 8 -#endif -// [GPIO_SL_SIMPLE_LED_LED0]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_SIMPLE_LED_LED0_CONFIG_H diff --git a/TBS2Torch/config/sl_simple_rgb_pwm_led_rgb_led0_config.h b/TBS2Torch/config/sl_simple_rgb_pwm_led_rgb_led0_config.h deleted file mode 100644 index 6e13c8c..0000000 --- a/TBS2Torch/config/sl_simple_rgb_pwm_led_rgb_led0_config.h +++ /dev/null @@ -1,127 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Simple RGB PWM Led Driver Configuration - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_SIMPLE_RGB_PWM_LED_RGB_LED0_CONFIG_H -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Simple RGB PWM LED Configuration -// PWM frequency [Hz] -// Sets the frequency of the PWM signal -// 0 = Don't care -// Default: 10000 -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_FREQUENCY 10000 - -// PWM resolution <2-65536> -// Specifies the PWM (dimming) resolution. I.e. if you want a -// dimming resolution that takes the input values from 0 to 99, -// set this value to 100 -// Default: 256 -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RESOLUTION 256 - -// Red LED Polarity -// Active low -// Active high -// Default: SL_SIMPLE_RGB_PWM_LED_POLARITY_ACTIVE_LOW -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_POLARITY SL_SIMPLE_RGB_PWM_LED_POLARITY_ACTIVE_HIGH - -// Green LED Polarity -// Active low -// Active high -// Default: SL_SIMPLE_RGB_PWM_LED_POLARITY_ACTIVE_LOW -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_POLARITY SL_SIMPLE_RGB_PWM_LED_POLARITY_ACTIVE_HIGH - -// Blue LED Polarity -// Active low -// Active high -// Default: SL_SIMPLE_RGB_PWM_LED_POLARITY_ACTIVE_LOW -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_POLARITY SL_SIMPLE_RGB_PWM_LED_POLARITY_ACTIVE_HIGH -// end led configuration - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_SIMPLE_RGB_PWM_LED_RGB_LED0 -// $[TIMER_SL_SIMPLE_RGB_PWM_LED_RGB_LED0] -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_PERIPHERAL -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_PERIPHERAL TIMER0 -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_PERIPHERAL_NO -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_PERIPHERAL_NO 0 -#endif - -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_CHANNEL -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_CHANNEL 0 -#endif -// TIMER0 CC0 on PD11 -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_PORT -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_PORT gpioPortD -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_PIN -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_PIN 11 -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_LOC -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_RED_LOC 19 -#endif - -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_CHANNEL -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_CHANNEL 1 -#endif -// TIMER0 CC1 on PD12 -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_PORT -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_PORT gpioPortD -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_PIN -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_PIN 12 -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_LOC -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_GREEN_LOC 19 -#endif - -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_CHANNEL -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_CHANNEL 2 -#endif -// TIMER0 CC2 on PD13 -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_PORT -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_PORT gpioPortD -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_PIN -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_PIN 13 -#endif -#ifndef SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_LOC -#define SL_SIMPLE_RGB_PWM_LED_RGB_LED0_BLUE_LOC 19 -#endif -// [TIMER_SL_SIMPLE_RGB_PWM_LED_RGB_LED0]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_SIMPLE_RGB_PWM_LED_RGB_LED0_CONFIG_H diff --git a/TBS2Torch/config/sl_sleeptimer_config.h b/TBS2Torch/config/sl_sleeptimer_config.h deleted file mode 100644 index 8344ef5..0000000 --- a/TBS2Torch/config/sl_sleeptimer_config.h +++ /dev/null @@ -1,82 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Sleep Timer configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_SLEEPTIMER_CONFIG_H -#define SL_SLEEPTIMER_CONFIG_H - -#define SL_SLEEPTIMER_PERIPHERAL_DEFAULT 0 -#define SL_SLEEPTIMER_PERIPHERAL_RTCC 1 -#define SL_SLEEPTIMER_PERIPHERAL_PRORTC 2 -#define SL_SLEEPTIMER_PERIPHERAL_RTC 3 -#define SL_SLEEPTIMER_PERIPHERAL_SYSRTC 4 -#define SL_SLEEPTIMER_PERIPHERAL_BURTC 5 -#define SL_SLEEPTIMER_PERIPHERAL_WTIMER 6 -#define SL_SLEEPTIMER_PERIPHERAL_TIMER 7 - -// Timer Peripheral Used by Sleeptimer -// Default (auto select) -// RTCC -// Radio internal RTC (PRORTC) -// RTC -// SYSRTC -// Back-Up RTC (BURTC) -// WTIMER -// TIMER -// Selection of the Timer Peripheral Used by the Sleeptimer -#define SL_SLEEPTIMER_PERIPHERAL SL_SLEEPTIMER_PERIPHERAL_DEFAULT - -// TIMER/WTIMER Instance Used by Sleeptimer (not applicable for other peripherals) -// Make sure TIMER instance size is 32bits. Check datasheet for 32bits TIMERs. -// Default: 0 -#define SL_SLEEPTIMER_TIMER_INSTANCE 0 - -// Enable wallclock functionality -// Enable or disable wallclock functionalities (get_time, get_date, etc). -// Default: 0 -#define SL_SLEEPTIMER_WALLCLOCK_CONFIG 0 - -// Timer frequency divider (not applicable for WTIMER/TIMER) -// WTIMER/TIMER peripherals are always prescaled to 1024. -// Default: 1 -#define SL_SLEEPTIMER_FREQ_DIVIDER 1 - -// If Radio internal RTC (PRORTC) HAL is used, determines if it owns the IRQ handler. Enable, if no wireless stack is used. -// Default: 0 -#define SL_SLEEPTIMER_PRORTC_HAL_OWNS_IRQ_HANDLER 0 - -// Enable DEBUGRUN functionality on hardware RTC. -// Default: 0 -#define SL_SLEEPTIMER_DEBUGRUN 0 - -#endif /* SLEEPTIMER_CONFIG_H */ - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_token_manager_config.h b/TBS2Torch/config/sl_token_manager_config.h deleted file mode 100644 index d99e78e..0000000 --- a/TBS2Torch/config/sl_token_manager_config.h +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Token Manager Configurations - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_TOKEN_MANAGER_CONFIG_H -#define SL_TOKEN_MANAGER_CONFIG_H - -// TOKEN MANAGER Configurations - -// Enable Custom Tokens -// Default: 0 -#define SL_TOKEN_MANAGER_CUSTOM_TOKENS_PRESENT 0 - -// File containing custom tokens -// Default: "sl_custom_token_header.h" -// Header file containing custom tokens located at project_root/config -#define SL_TOKEN_MANAGER_CUSTOM_TOKEN_HEADER "sl_custom_token_header.h" - -// - -// Enable Custom Manufacturing Tokens -// Default: 0 -#define SL_TOKEN_MANAGER_CUSTOM_MANUFACTURING_TOKENS_PRESENT 0 - -// File containing custom manufacturing tokens -// Default: "sl_custom_manufacturing_token_header.h" -// Header file containing custom tokens located at project_root/config -#define SL_TOKEN_MANAGER_CUSTOM_MANUFACTURING_TOKEN_HEADER "sl_custom_manufacturing_token_header.h" - -// -// - -#if (SL_TOKEN_MANAGER_CUSTOM_MANUFACTURING_TOKENS_PRESENT) -#define APPLICATION_MFG_TOKEN_HEADER SL_TOKEN_MANAGER_CUSTOM_MANUFACTURING_TOKEN_HEADER -#endif // SL_TOKEN_MANAGER_CUSTOM_MANUFACTURING_TOKENS_PRESENT - -#endif // SL_TOKEN_MANAGER_CONFIG_H - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_zigbee_binding_table_config.h b/TBS2Torch/config/sl_zigbee_binding_table_config.h deleted file mode 100644 index ef4b92f..0000000 --- a/TBS2Torch/config/sl_zigbee_binding_table_config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Binding Table component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Binding Table configuration - -// Binding Table Size <1-127> -// Default: 3 -// The number of entries that the binding table can hold. -#define EMBER_BINDING_TABLE_SIZE 32 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_zigbee_debug_print_config.h b/TBS2Torch/config/sl_zigbee_debug_print_config.h deleted file mode 100644 index 9c901f4..0000000 --- a/TBS2Torch/config/sl_zigbee_debug_print_config.h +++ /dev/null @@ -1,74 +0,0 @@ -/***************************************************************************//** - * @brief ZigBee Debug Print component configuration header. - * - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// ZigBee Debug Print configuration - -// Stack group enabled -// Default: 1 -// If this option is enabled, prints belonging to the "stack" group shall be included in the build. -#define SL_ZIGBEE_DEBUG_STACK_GROUP_ENABLED (1) - -// Stack group runtime default -// Default: 1 -// If this option is enabled, prints belonging to the "stack" group shall be runtime enabled by default. -#define SL_ZIGBEE_DEBUG_STACK_GROUP_RUNTIME_DEFAULT (1) - -// Core group enabled -// Default: 1 -// If this option is enabled, prints belonging to the "core" group shall be included in the build. -#define SL_ZIGBEE_DEBUG_CORE_GROUP_ENABLED (1) - -// Core group runtime default -// Default: 1 -// If this option is enabled, prints belonging to the "core" group shall be runtime enabled by default. -#define SL_ZIGBEE_DEBUG_CORE_GROUP_RUNTIME_DEFAULT (1) - -// App group enabled -// Default: 1 -// If this option is enabled, prints belonging to the "app" group shall be included in the build. -#define SL_ZIGBEE_DEBUG_APP_GROUP_ENABLED (1) - -// App group enabled -// Default: 1 -// If this option is enabled, prints belonging to the "app" group shall be runtime enabled by default. -#define SL_ZIGBEE_DEBUG_APP_GROUP_RUNTIME_DEFAULT (1) - -// ZCL group enabled -// Default: 1 -// If this option is enabled, prints belonging to the "zcl" group shall be included in the build. -#define SL_ZIGBEE_DEBUG_ZCL_GROUP_ENABLED (1) - -// ZCL group enabled -// Default: 1 -// If this option is enabled, prints belonging to the "zcl" group shall be runtime enabled by default. -#define SL_ZIGBEE_DEBUG_ZCL_GROUP_RUNTIME_DEFAULT (1) - -// Legacy App Framework Debug group enabled -// Default: 0 -// If both this option and ZIGBEE_DEBUG_ZCL_GROUP_ENABLED are enabled, prints belonging to the "legacy app framework debug" group shall be included in the build. -#define SL_ZIGBEE_DEBUG_PRINTS_ZCL_LEGACY_AF_DEBUG_ENABLED (0) - -// Legacy App Framework Debug runtime default -// Default: 0 -// If both this option and ZIGBEE_DEBUG_ZCL_GROUP_ENABLED are enabled, prints belonging to the "legacy app framework debug" group shall be runtime enabled by default. -#define SL_ZIGBEE_DEBUG_PRINTS_ZCL_LEGACY_AF_DEBUG_RUNTIME_DEFAULT (0) - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_zigbee_green_power_config.h b/TBS2Torch/config/sl_zigbee_green_power_config.h deleted file mode 100644 index e0310d3..0000000 --- a/TBS2Torch/config/sl_zigbee_green_power_config.h +++ /dev/null @@ -1,53 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Green Power component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Green Power Library configuration - -// Green Power Proxy Table Size <1-126> -// Default: 5 -// The maximum number of Green Power proxy table entries supported by the stack. -#define EMBER_GP_PROXY_TABLE_SIZE 5 - -// Green Power Sink Table Size <0-126> -// Default: 0 -// The maximum number of Green Power sink table entries supported by the stack. -#define EMBER_GP_SINK_TABLE_SIZE 0 - -// Green Power incoming FC (as part of proxy table) Token timeout <0-60> -// Default: 0 -// The timeout (seconds) to restore the GPD incoming security frame counter in the Flash (0 being never). -#define EMBER_GP_INCOMING_FC_TOKEN_TIMEOUT 7 - -// Green Power incoming FC (as part of proxy table) table token table size <0-126> -// Default: 0 -// The maximum table size to restore the GPD incoming security frame counter in the Flash (being either 0 or EMBER_GP_PROXY_TABLE_SIZE). -#define EMBER_GP_INCOMING_FC_TOKEN_TABLE_SIZE 0 - -// Green Power incoming FC (as part of sink table) token table token timeout <0-60> -// Default: 0 -// The timeout (seconds) to restore the GPD incoming security frame counter in the Flash (0 being never). -#define EMBER_GP_INCOMING_FC_IN_SINK_TOKEN_TIMEOUT 7 - -// Green Power incoming FC (as part of sink table)Token table size <0-126> -// Default: 0 -// The maximum table size to restore the GPD incoming security frame counter in the Flash (being either 0 or EMBER_GP_SINK_TABLE_SIZE). -#define EMBER_GP_INCOMING_FC_IN_SINK_TOKEN_TABLE_SIZE 0 - -// - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/TBS2Torch/config/sl_zigbee_light_link_config.h b/TBS2Torch/config/sl_zigbee_light_link_config.h deleted file mode 100644 index 7be64b7..0000000 --- a/TBS2Torch/config/sl_zigbee_light_link_config.h +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************//** - * @brief ZigBee Light Link component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee ZigBee Light Link Library configuration - -// Group addresses <0-255> -// Default: 0 -// The number of unique group identifiers that this device requires. -#define EMBER_ZLL_GROUP_ADDRESSES 0 - -// RSSI threshold <-128..127:1> -// Default: -40 -// The RSSI threshold applied to incoming scan requests. The stack will ignore scan requests with corrected RSSI values less than this threshold. -#define EMBER_ZLL_RSSI_THRESHOLD -40 - -// Apply RSSI threshold to all interpan messages -// Default: FALSE -// True if the RSSI threshold is to be applied to all incoming touchlink interpan messages. This is not required by the Zigbee 3.0 specifications, but may be useful for testing in a busy environment. -#define EMBER_ZLL_APPLY_THRESHOLD_TO_ALL_INTERPANS 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/sl_zigbee_pro_leaf_stack_config.h b/TBS2Torch/config/sl_zigbee_pro_leaf_stack_config.h deleted file mode 100644 index add7fa5..0000000 --- a/TBS2Torch/config/sl_zigbee_pro_leaf_stack_config.h +++ /dev/null @@ -1,101 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee PRO Leaf Stack component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee PRO Stack Library configuration - -// Packet Buffer Count <20-255> -// Default: 75 -// The maximum number of packet buffers supported by the system. This is limited by the amount of available RAM. -#define EMBER_PACKET_BUFFER_COUNT 75 - -// End Device keep alive support mode -// End Device keep alive support mode -// MAC Data Poll Keep Alive -// End Device Timeout Keep Alive -// Keep Alive Support All -// Default: EMBER_KEEP_ALIVE_SUPPORT_ALL -// End Device keep alive support mode on the coordinator/router could be set here. -#define EMBER_END_DEVICE_KEEP_ALIVE_SUPPORT_MODE EMBER_KEEP_ALIVE_SUPPORT_ALL - -// End Device Poll Timeout Value -// End Device Poll Timeout Value -// Seconds-10 -// Minutes-2 -// Minutes-4 -// Minutes-8 -// Minutes-16 -// Minutes-32 -// Minutes-64 -// Minutes-128 -// Minutes-256 -// Minutes-512 -// Minutes-1024 -// Minutes-2048 -// Minutes-4096 -// Minutes-8192 -// Minutes-16384 -// Default: MINUTES_256 -// The amount of time that must pass without hearing a MAC data poll from the device before the end device is removed from the child table. For a router device this applies to its children. For an end device, this is the amount of time before it automatically times itself out. -#define EMBER_END_DEVICE_POLL_TIMEOUT MINUTES_64 - -// Link Power Delta Request Interval <1-65535> -// Default: 300 -// The amount of time in seconds that pass between link power delta requests. -#define EMBER_LINK_POWER_DELTA_INTERVAL 300 - -// APS Unicast Message Queue Size <1-255> -// Default: 10 -// The maximum number of APS unicast messages that can be queued up by the stack. A message is considered queued when emberSendUnicast() is called and is de-queued when the emberMessageSentHandler() is called. -#define EMBER_APS_UNICAST_MESSAGE_COUNT 10 - -// APS unicast Message Duplicate Rejection table Size <1-255> -// Default: 5 -// The maximum number of APS unicast messages that can be stored in the stack, to reject duplicate processing/forwarding of APS messages. -// Size of 1 is basically the same thing as no duplicate rejection -#define SL_ZIGBEE_APS_DUPLICATE_REJECTION_MAX_ENTRIES 5 - -// Broadcast Table Size <15-254> -// Default: 15 -// The size of the broadcast table. -#define EMBER_BROADCAST_TABLE_SIZE 15 - -// Transient key timeout (in seconds) <0-65535> -// Default: 300 -// The amount of time a device will store a transient link key that can be used to join a network. -#define EMBER_TRANSIENT_KEY_TIMEOUT_S 300 - -//The maximum number of ZigBee PRO End Devices that can be supported by a single device. -#define EMBER_MAX_END_DEVICE_CHILDREN 0 - -// The size of the neighbor table. -#define EMBER_NEIGHBOR_TABLE_SIZE 1 - -// The size of the route table. -#define EMBER_ROUTE_TABLE_SIZE 0 - -// The minimum size of the route table. -#define EMBER_MIN_ROUTE_TABLE_SIZE 0 - -// Binding Table Size <1-127> -// Default: 3 -// The number of entries that the binding table can hold. -#define EMBER_BINDING_TABLE_SIZE 32 - -// - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/TBS2Torch/config/stack-diagnostics-config.h b/TBS2Torch/config/stack-diagnostics-config.h deleted file mode 100644 index 09eeb9e..0000000 --- a/TBS2Torch/config/stack-diagnostics-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Stack Diagnostics component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Stack Diagnostics configuration - -// (SoC only) Record LQI and RSSI for each neighbor -// Default: FALSE -// (SoC only) Record the last LQI and RSSI values received for each neighbor. Note: when this option is selected, the Packet Handoff plugin must be enabled and the emberAfIncomingPacketFilterCallback callback is consumed. -#define EMBER_AF_PLUGIN_STACK_DIAGNOSTICS_RECORD_LQI_RSSI 0 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/update-tc-link-key-config.h b/TBS2Torch/config/update-tc-link-key-config.h deleted file mode 100644 index 4df80e4..0000000 --- a/TBS2Torch/config/update-tc-link-key-config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Update TC Link Key component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Update TC Link Key configuration - -// Max Attempts <1-255> -// Default: 3 -// The maximum number of attempts the node should make when sending or retrying the Node Descriptor, Request Key, or Verify Key messages. This field corresponds to the bdbTcLinkKeyExchangeAttemptsMax attribute in the Base Device Behavior specification. -#define EMBER_AF_PLUGIN_UPDATE_TC_LINK_KEY_MAX_ATTEMPTS 3 - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/zcl-framework-core-config.h b/TBS2Torch/config/zcl-framework-core-config.h deleted file mode 100644 index a086e5a..0000000 --- a/TBS2Torch/config/zcl-framework-core-config.h +++ /dev/null @@ -1,32 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee ZCL Framework Core component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee ZCL Framework Core configuration - -// Enable Command Line for Legacy CLI -// Default: TRUE -// Enable the command line when using Legacy CLI generation. This does not do anything if Legacy CLI generation is unselected. -#define EMBER_AF_PLUGIN_ZCL_FRAMEWORK_CORE_CLI_ENABLED 1 - -// Enable/disable clusters at runtime -// Default: FALSE -// Enable the feature that allows to enable/disable clusters at runtime. -#define EMBER_AF_PLUGIN_ZCL_CLUSTER_ENABLE_DISABLE_RUN_TIME 0 -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/zcl/zcl_config.zap b/TBS2Torch/config/zcl/zcl_config.zap index 8cae84e..e8a17f5 100644 --- a/TBS2Torch/config/zcl/zcl_config.zap +++ b/TBS2Torch/config/zcl/zcl_config.zap @@ -1,5 +1,6 @@ { - "featureLevel": 96, + "fileFormat": 2, + "featureLevel": 106, "creator": "zap", "keyValuePairs": [ { @@ -18,11 +19,11 @@ "package": [ { "pathRelativity": "relativeToZap", - "path": "..\\..\\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v5\\developer\\adapter_packs\\zap\\resources\\app.asar\\zcl-builtin\\silabs\\zcl.json", + "path": "..\\..\\..\\..\\..\\..\\SimplicityStudio\\SDKs\\gecko_sdk\\app\\zcl\\zcl-zap.json", "type": "zcl-properties", "category": "zigbee", "version": 1, - "description": "ZigbeePro test data" + "description": "Zigbee Silabs ZCL data" }, { "pathRelativity": "relativeToZap", @@ -34,7 +35,30 @@ ], "endpointTypes": [ { + "id": 1, "name": "Centralized", + "deviceTypeRef": { + "code": 258, + "profileId": 260, + "label": "LO-colordimmablelight", + "name": "LO-colordimmablelight", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 258, + "profileId": 260, + "label": "LO-colordimmablelight", + "name": "LO-colordimmablelight", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 258 + ], "deviceTypeName": "LO-colordimmablelight", "deviceTypeCode": 258, "deviceTypeProfileId": 260, @@ -44,44 +68,18 @@ "code": 0, "mfgCode": null, "define": "BASIC_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "ResetToFactoryDefaults", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 } ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 0, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "server", - "enabled": 1, "attributes": [ { "name": "ZCL version", @@ -309,32 +307,6 @@ } ] }, - { - "name": "Power Configuration", - "code": 1, - "mfgCode": null, - "define": "POWER_CONFIG_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Power Configuration", "code": 1, @@ -375,22 +347,6 @@ "maxInterval": 14400, "reportableChange": 2 }, - { - "name": "battery alarm state", - "code": 62, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 0, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "cluster revision", "code": 65533, @@ -414,68 +370,40 @@ "code": 3, "mfgCode": null, "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "Identify", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "IdentifyQueryResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "IdentifyQuery", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "TriggerEffect", "code": 64, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "IdentifyQueryResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -518,116 +446,88 @@ "code": 4, "mfgCode": null, "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "AddGroup", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "ViewGroup", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "GetGroupMembership", - "code": 2, + "name": "ViewGroupResponse", + "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "RemoveGroup", - "code": 3, + "name": "GetGroupMembership", + "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "RemoveAllGroups", - "code": 4, + "name": "GetGroupMembershipResponse", + "code": 2, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "AddGroupIfIdentifying", - "code": 5, + "name": "RemoveGroup", + "code": 3, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "ViewGroupResponse", - "code": 1, + "name": "RemoveGroupResponse", + "code": 3, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "GetGroupMembershipResponse", - "code": 2, + "name": "RemoveAllGroups", + "code": 4, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "RemoveGroupResponse", - "code": 3, + "name": "AddGroupIfIdentifying", + "code": 5, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -670,185 +570,157 @@ "code": 5, "mfgCode": null, "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "AddScene", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "ViewScene", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "RemoveScene", "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "RemoveAllScenes", "code": 3, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "StoreScene", "code": 4, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "RecallScene", "code": 5, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "GetSceneMembership", "code": 6, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "EnhancedAddScene", "code": 64, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "EnhancedViewScene", "code": 65, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "CopyScene", "code": 66, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ { - "name": "cluster revision", - "code": 65533, + "name": "scene count", + "code": 0, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x00", "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 }, { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "scene count", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "current scene", + "name": "current scene", "code": 1, "mfgCode": null, "side": "server", @@ -934,84 +806,58 @@ "code": 6, "mfgCode": null, "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "Off", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "On", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "OffWithEffect", "code": 64, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "OnWithRecallGlobalScene", "code": 65, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "OnWithTimedOff", "code": 66, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 } ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, "attributes": [ { "name": "on/off", @@ -1116,100 +962,74 @@ "code": 8, "mfgCode": null, "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "MoveToLevel", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "Move", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "Step", "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "Stop", "code": 3, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveToLevelWithOnOff", "code": 4, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveWithOnOff", "code": 5, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "StepWithOnOff", "code": 6, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "StopWithOnOff", "code": 7, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 } ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, "attributes": [ { "name": "current level", @@ -1365,29 +1185,61 @@ "side": "client", "enabled": 1, "commands": [ + { + "name": "ImageNotify", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "QueryNextImageRequest", "code": 1, "mfgCode": null, "source": "client", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryNextImageResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 }, { "name": "ImageBlockRequest", "code": 3, "mfgCode": null, "source": "client", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ImageBlockResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 }, { "name": "UpgradeEndRequest", "code": 6, "mfgCode": null, "source": "client", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpgradeEndResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -1457,229 +1309,143 @@ } ] }, - { - "name": "Over the Air Bootloading", - "code": 25, - "mfgCode": null, - "define": "OTA_BOOTLOAD_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ImageNotify", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "QueryNextImageResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ImageBlockResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "UpgradeEndResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Color Control", "code": 768, "mfgCode": null, "define": "COLOR_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, + "side": "server", + "enabled": 1, "commands": [ { "name": "MoveToHue", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveHue", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "StepHue", "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveToSaturation", "code": 3, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveSaturation", "code": 4, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "StepSaturation", "code": 5, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveToHueAndSaturation", "code": 6, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveToColor", "code": 7, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "MoveColor", "code": 8, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "StepColor", "code": 9, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "EnhancedMoveToHue", "code": 64, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "EnhancedMoveHue", "code": 65, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "EnhancedStepHue", "code": 66, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "EnhancedMoveToHueAndSaturation", "code": 67, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "ColorLoopSet", "code": 68, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "StopMoveStep", "code": 71, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 } ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, "attributes": [ { "name": "current hue", @@ -1761,22 +1527,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "color temperature", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00FA", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "color mode", "code": 8, @@ -2318,258 +2068,156 @@ ] }, { - "name": "Occupancy Sensing", - "code": 1030, + "name": "ZLL Commissioning", + "code": 4096, "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", + "define": "ZLL_COMMISSIONING_CLUSTER", "side": "server", - "enabled": 0, - "attributes": [ + "enabled": 1, + "commands": [ { - "name": "occupancy", + "name": "ScanRequest", "code": 0, "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "occupancy sensor type", + "name": "ScanResponse", "code": 1, "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "occupancy sensor type bitmap", + "name": "DeviceInformationRequest", "code": 2, "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "ZLL Commissioning", - "code": 4096, - "mfgCode": null, - "define": "ZLL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ScanRequest", - "code": 0, - "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "DeviceInformationRequest", - "code": 2, + "name": "DeviceInformationResponse", + "code": 3, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { "name": "IdentifyRequest", "code": 6, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "ResetToFactoryNewRequest", "code": 7, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "NetworkStartRequest", "code": 16, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "NetworkJoinRouterRequest", - "code": 18, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "NetworkJoinEndDeviceRequest", - "code": 20, + "name": "NetworkStartResponse", + "code": 17, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "NetworkUpdateRequest", - "code": 22, + "name": "NetworkJoinRouterRequest", + "code": 18, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "GetGroupIdentifiersRequest", - "code": 65, + "name": "NetworkJoinRouterResponse", + "code": 19, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "GetEndpointListRequest", - "code": 66, + "name": "NetworkJoinEndDeviceRequest", + "code": 20, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "ZLL Commissioning", - "code": 4096, - "mfgCode": null, - "define": "ZLL_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ScanResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "DeviceInformationResponse", - "code": 3, + "name": "NetworkJoinEndDeviceResponse", + "code": 21, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "NetworkStartResponse", - "code": 17, + "name": "NetworkUpdateRequest", + "code": 22, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "NetworkJoinRouterResponse", - "code": 19, + "name": "EndpointInformation", + "code": 64, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "NetworkJoinEndDeviceResponse", - "code": 21, + "name": "GetGroupIdentifiersRequest", + "code": 65, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "EndpointInformation", - "code": 64, + "name": "GetGroupIdentifiersResponse", + "code": 65, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "GetGroupIdentifiersResponse", - "code": 65, + "name": "GetEndpointListRequest", + "code": 66, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { "name": "GetEndpointListResponse", "code": 66, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ @@ -2594,37 +2242,34 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 770, + "profileId": 260, + "label": "HA-tempsensor", + "name": "HA-tempsensor", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 770, + "profileId": 260, + "label": "HA-tempsensor", + "name": "HA-tempsensor", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], "deviceTypeName": "HA-tempsensor", "deviceTypeCode": 770, "deviceTypeProfileId": 260, "clusters": [ - { - "name": "Basic", - "code": 0, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Basic", "code": 0, @@ -2872,16 +2517,24 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "IdentifyQueryResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 }, { "name": "IdentifyQuery", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ @@ -2911,13 +2564,29 @@ "side": "server", "enabled": 1, "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "IdentifyQueryResponse", "code": 0, "mfgCode": null, "source": "server", - "incoming": 1, - "outgoing": 1 + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "IdentifyQuery", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -2955,32 +2624,6 @@ } ] }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Temperature Measurement", "code": 1026, @@ -3006,52 +2649,46 @@ "reportableChange": 10 }, { - "name": "min measured value", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "max measured value", - "code": 2, + "name": "cluster revision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int16s", - "included": 0, + "type": "int16u", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "3", "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "tolerance", - "code": 3, + "name": "measured value", + "code": 0, "mfgCode": null, "side": "server", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x8000", "reportable": 1, "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "maxInterval": 900, + "reportableChange": 10 }, { "name": "cluster revision", @@ -3063,497 +2700,108 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "2", "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } ] - }, - { - "name": "Relative Humidity Measurement", - "code": 1029, - "mfgCode": null, - "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Relative Humidity Measurement", - "code": 1029, - "mfgCode": null, - "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "measured value", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 900, - "reportableChange": 10 - }, - { - "name": "min measured value", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "max measured value", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "tolerance", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "GreenPower", - "deviceTypeName": "GP-proxy-basic", - "deviceTypeCode": 97, - "deviceTypeProfileId": 41440, - "clusters": [ - { - "name": "Basic", - "code": 0, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "manufacturer name", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 0, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "Raz-1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "model identifier", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 0, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "Torch", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "on/off", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 0, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "start up on off", - "code": 16387, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 0, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "current level", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "on off transition time", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "on level", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "on transition time", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "off transition time", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "start up current level", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xfe", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Green Power", - "code": 33, - "mfgCode": null, - "define": "GREEN_POWER_CLUSTER", - "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "gpp max proxy table entries", - "code": 16, - "mfgCode": null, - "side": "client", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x14", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "proxy table", - "code": 17, - "mfgCode": null, - "side": "client", - "type": "long_octet_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "gpp functionality", - "code": 22, - "mfgCode": null, - "side": "client", - "type": "bitmap24", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x09AC2F", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "gpp active functionality", - "code": 23, - "mfgCode": null, - "side": "client", - "type": "bitmap24", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFFFFFF", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "gp link key", - "code": 34, - "mfgCode": null, - "side": "client", - "type": "security_key", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x5a6967426565416c6c69616e63653039", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, + } + ] + }, + { + "id": 3, + "name": "GreenPower", + "deviceTypeRef": { + "code": 97, + "profileId": 41440, + "label": "GP-proxy-basic", + "name": "GP-proxy-basic", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 97, + "profileId": 41440, + "label": "GP-proxy-basic", + "name": "GP-proxy-basic", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 97 + ], + "deviceTypeName": "GP-proxy-basic", + "deviceTypeCode": 97, + "deviceTypeProfileId": 41440, + "clusters": [ { "name": "Green Power", "code": 33, "mfgCode": null, "define": "GREEN_POWER_CLUSTER", - "side": "server", - "enabled": 0, + "side": "client", + "enabled": 1, "commands": [ { "name": "GpPairing", "code": 1, "mfgCode": null, "source": "server", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "GpProxyCommissioningMode", "code": 2, "mfgCode": null, "source": "server", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "GpResponse", "code": 6, "mfgCode": null, "source": "server", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 }, { "name": "GpProxyTableRequest", "code": 11, "mfgCode": null, "source": "server", - "incoming": 1, - "outgoing": 0 + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ { - "name": "gps max sink table entries", - "code": 0, + "name": "gpp max proxy table entries", + "code": 16, "mfgCode": null, - "side": "server", + "side": "client", "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x05", + "defaultValue": "0x14", "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "sink table", - "code": 1, + "name": "proxy table", + "code": 17, "mfgCode": null, - "side": "server", + "side": "client", "type": "long_octet_string", "included": 1, "storageOption": "RAM", @@ -3566,74 +2814,26 @@ "reportableChange": 0 }, { - "name": "gps communication mode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "gps commissioning exit mode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x02", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "gps security level", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "gps functionality", - "code": 6, + "name": "gpp functionality", + "code": 22, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap24", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x09AC2F", "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "gps active functionality", - "code": 7, + "name": "gpp active functionality", + "code": 23, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap24", "included": 1, "storageOption": "RAM", @@ -3649,7 +2849,7 @@ "name": "gp link key", "code": 34, "mfgCode": null, - "side": "server", + "side": "client", "type": "security_key", "included": 1, "storageOption": "RAM", @@ -3665,7 +2865,7 @@ "name": "cluster revision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -3678,96 +2878,6 @@ "reportableChange": 0 } ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "current hue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "current saturation", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "current x", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x616B", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "current y", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x607D", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "color capabilities", - "code": 16394, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0009", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] } ] } @@ -3779,8 +2889,7 @@ "profileId": 260, "endpointId": 1, "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 258 + "parentEndpointIdentifier": null }, { "endpointTypeName": "Anonymous Endpoint Type", @@ -3788,8 +2897,7 @@ "profileId": 260, "endpointId": 2, "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 770 + "parentEndpointIdentifier": null }, { "endpointTypeName": "GreenPower", @@ -3797,9 +2905,7 @@ "profileId": 41440, "endpointId": 242, "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 97 + "parentEndpointIdentifier": null } - ], - "log": [] + ] } \ No newline at end of file diff --git a/TBS2Torch/config/zigbee_core_cli_config.h b/TBS2Torch/config/zigbee_core_cli_config.h deleted file mode 100644 index 7ed91fc..0000000 --- a/TBS2Torch/config/zigbee_core_cli_config.h +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Application Framework common component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee core CLI configuration -// Event Debug Info <0-1> -// Default: False -// Enable/Disable debug info for the "events" CLI command. -// Debug info includes event name, nwk index, endpoint and remaining time. -#define SL_ZIGBEE_EVENT_DEBUG_ENABLED (0) - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/zigbee_device_config.h b/TBS2Torch/config/zigbee_device_config.h deleted file mode 100644 index 2a440f9..0000000 --- a/TBS2Torch/config/zigbee_device_config.h +++ /dev/null @@ -1,118 +0,0 @@ -/***************************************************************************//** - * @brief ZigBee device configuration header. - * - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// ZigBee device configuration - -#ifndef SILABS_ZIGBEE_DEVICE_CONFIG_H -#define SILABS_ZIGBEE_DEVICE_CONFIG_H - -// Mirrors the legacy EmberNodeType enum -#define SLI_ZIGBEE_NETWORK_DEVICE_TYPE_COORDINATOR_OR_ROUTER 0x01 -#define SLI_ZIGBEE_NETWORK_DEVICE_TYPE_ROUTER 0x02 -#define SLI_ZIGBEE_NETWORK_DEVICE_TYPE_END_DEVICE 0x03 -#define SLI_ZIGBEE_NETWORK_DEVICE_TYPE_SLEEPY_END_DEVICE 0x04 - -// Mirrors the legacy EmberAfSecurityProfile enum -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_NO_SECURITY 0x00 -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_HA 0x01 -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_HA_1_2 0x02 -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_SE_TEST 0x03 -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_SE_FULL 0x04 -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0 0x05 -#define SLI_ZIGBEE_NETWORK_SECURITY_TYPE_CUSTOM 0xFF - -#define SLI_ZIGBEE_DEFAULT_NETWORK_PRIMARY 0x00 -#define SLI_ZIGBEE_DEFAULT_NETWORK_SECONDARY 0x01 - -#define SLI_ZIGBEE_TX_POWER_MODE_DEFAULT EMBER_TX_POWER_MODE_DEFAULT -#define SLI_ZIGBEE_TX_POWER_MODE_BOOST EMBER_TX_POWER_MODE_BOOST -#define SLI_ZIGBEE_TX_POWER_MODE_ALTERNATE EMBER_TX_POWER_MODE_ALTERNATE -#define SLI_ZIGBEE_TX_POWER_MODE_BOOST_AND_ALTERNATE EMBER_TX_POWER_MODE_BOOST_AND_ALTERNATE -#define SLI_ZIGBEE_TX_POWER_MODE_USE_TOKEN EMBER_TX_POWER_MODE_USE_TOKEN - -// Primary Network Device Type -// The ZigBee Primary Network Device Type -// Coordinator or Router -// Router -// End Device -// Sleepy End Device -// Default: SLI_ZIGBEE_NETWORK_DEVICE_TYPE_ROUTER -#define SLI_ZIGBEE_PRIMARY_NETWORK_DEVICE_TYPE SLI_ZIGBEE_NETWORK_DEVICE_TYPE_END_DEVICE - -// Primary Network Security Type -// The ZigBee Primary Network Security Type -// No Security -// Home Automation Security -// Home Automation Security 1.2 -// Smart Energy Security Full (compliant) -// Smart Energy Security Test (dev only) -// ZigBee 3.0 Security -// Custom Security -// Default: SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0 -#define SLI_ZIGBEE_PRIMARY_NETWORK_SECURITY_TYPE SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0 - -// Enable Secondary Network -// Default: 0 -// Enable/Disable the ZigBee Secondary Network -#define SLI_ZIGBEE_SECONDARY_NETWORK_ENABLED (0) - -// Secondary Network Device Type -// The ZigBee Secondary Network Device Type -// Coordinator or Router -// Router -// End Device -// Sleepy End Device -// Default: SLI_ZIGBEE_NETWORK_DEVICE_TYPE_ROUTER -#define SLI_ZIGBEE_SECONDARY_NETWORK_DEVICE_TYPE SLI_ZIGBEE_NETWORK_DEVICE_TYPE_SLEEPY_END_DEVICE - -// Secondary Network Security Type -// The ZigBee Secondary Network Security Type -// No Security -// Home Automation Security -// Smart Energy Security Full (compliant) -// Smart Energy Security Test (dev only) -// ZigBee 3.0 Security -// Custom Security -// Default: SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0 -#define SLI_ZIGBEE_SECONDARY_NETWORK_SECURITY_TYPE SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0 - -// Default Network -// The ZigBee Default Network -// Primary Network -// Secondary Network -// Default: SLI_ZIGBEE_NETWORK_SECURITY_TYPE_3_0 -#define SLI_ZIGBEE_DEFAULT_NETWORK SLI_ZIGBEE_DEFAULT_NETWORK_PRIMARY - -// TX power mode -// The ZigBee node transmission power mode -// Default -// Boost -// Alternate -// Boost & Alternate -// Use token -// Default: SLI_ZIGBEE_TX_POWER_MODE_USE_TOKEN -#define SLI_ZIGBEE_TX_POWER_MODE SLI_ZIGBEE_TX_POWER_MODE_USE_TOKEN - -// - -#endif // SILABS_ZIGBEE_DEVICE_CONFIG_H - -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/zigbee_sleep_config.h b/TBS2Torch/config/zigbee_sleep_config.h deleted file mode 100644 index 60269fa..0000000 --- a/TBS2Torch/config/zigbee_sleep_config.h +++ /dev/null @@ -1,42 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Application Framework common component configuration header. - *\n******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Sleep configuration - -// Minimum Sleep Duration <5-1000> -// Default: 5 -// The minimum duration in milliseconds that the application will attempt to sleep for. If the sleep duration would be less than this amount, the application will not sleep. -#define SL_ZIGBEE_APP_FRAMEWORK_MINIMUM_SLEEP_DURATION_MS 5 - -// Sleep Backoff time <0-10000> -// Default: 0 -// This setting will keep a device from going back to sleep immediately upon waking up -#define SL_ZIGBEE_APP_FRAMEWORK_BACKOFF_SLEEP_MS 0 - -// Stay awake when NOT joined -// Default: TRUE -// This will force a device to stay awake even when not joined to the network. This is often used for debugging and is not recommended for production devices since it cause the device to consume battery power even when not joined to a ZigBee network. -#define SL_ZIGBEE_APP_FRAMEWORK_STAY_AWAKE_WHEN_NOT_JOINED 0 - -// Use button to force wakeup or allow sleep -// Default: FALSE -// This will setup the hardware buttons to wake-up or allow the device to go to sleep. Button 0 will force the device to wake up and stay awake. Button 1 will turn off this behavior to allow the device to sleep normally. Please note that in order for this option to be fully functional, button 0 and button 1 have to be configured to wake the device from sleep. -#define SL_ZIGBEE_APP_FRAMEWORK_USE_BUTTON_TO_STAY_AWAKE 0 -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/config/zigbee_watchdog_periodic_refresh_config.h b/TBS2Torch/config/zigbee_watchdog_periodic_refresh_config.h deleted file mode 100644 index e317fed..0000000 --- a/TBS2Torch/config/zigbee_watchdog_periodic_refresh_config.h +++ /dev/null @@ -1,34 +0,0 @@ -/***************************************************************************//** - * @brief Sample watchdog refresh event component configuration header. - ******************************************************************************** - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Zigbee Watchdog reset component configuration - -// Enable periodic watchdog refresh -// Default: TRUE -// This allows for enabling or disabling periodic watchdog refresh -#define SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE 1 - -// Watchdog refresh duration <50-5000> -// Default: 1000 -// Defines the periodic interval at which the watchdog timer is reset in the application -#define SL_ZIGBEE_WATCHDOG_REFRESH_DURATION_MS 1000 - -// -// - -// <<< end of configuration section >>> diff --git a/TBS2Torch/gecko_sdk_4.4.0/protocol/zigbee/app/framework/plugin/level-control/level-control.c b/TBS2Torch/gecko_sdk_4.4.5/protocol/zigbee/app/framework/plugin/level-control/level-control.c similarity index 97% rename from TBS2Torch/gecko_sdk_4.4.0/protocol/zigbee/app/framework/plugin/level-control/level-control.c rename to TBS2Torch/gecko_sdk_4.4.5/protocol/zigbee/app/framework/plugin/level-control/level-control.c index c2acb43..e0199e3 100644 --- a/TBS2Torch/gecko_sdk_4.4.0/protocol/zigbee/app/framework/plugin/level-control/level-control.c +++ b/TBS2Torch/gecko_sdk_4.4.5/protocol/zigbee/app/framework/plugin/level-control/level-control.c @@ -229,6 +229,7 @@ void emberAfLevelControlClusterServerTickCallback(uint8_t endpoint) // Are we at the requested level? if (currentLevel == state->moveToLevel) { + writeRemainingTime(endpoint, 0); if (state->commandId == ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID || state->commandId == ZCL_MOVE_WITH_ON_OFF_COMMAND_ID || state->commandId == ZCL_STEP_WITH_ON_OFF_COMMAND_ID) { @@ -262,7 +263,6 @@ void emberAfLevelControlClusterServerTickCallback(uint8_t endpoint) } } } - writeRemainingTime(endpoint, 0); } else { writeRemainingTime(endpoint, state->transitionTimeMs - state->elapsedTimeMs); @@ -550,14 +550,7 @@ static void moveToLevelHandler(uint8_t commandId, uint8_t optionOverride, uint16_t storedLevel) { - bool sendResponse = true; - uint8_t endpoint; - if (emberAfCurrentCommand() == NULL) { - endpoint = emberAfPrimaryEndpoint(); - sendResponse = false; - } else { - endpoint = emberAfCurrentEndpoint(); - } + uint8_t endpoint = emberAfCurrentEndpoint(); EmberAfLevelControlState *state = getState(endpoint); EmberAfStatus status; uint8_t currentLevel; @@ -677,8 +670,7 @@ static void moveToLevelHandler(uint8_t commandId, #endif send_default_response: - if (sendResponse - && emberAfCurrentCommand()->apsFrame->clusterId + if (emberAfCurrentCommand()->apsFrame->clusterId == ZCL_LEVEL_CONTROL_CLUSTER_ID) { emberAfSendImmediateDefaultResponse(status); } @@ -686,14 +678,7 @@ static void moveToLevelHandler(uint8_t commandId, static void moveHandler(uint8_t commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride) { - bool sendResponse = true; - uint8_t endpoint; - if (emberAfCurrentCommand() == NULL) { - endpoint = emberAfPrimaryEndpoint(); - sendResponse = false; - } else { - endpoint = emberAfCurrentEndpoint(); - } + uint8_t endpoint = emberAfCurrentEndpoint(); EmberAfLevelControlState *state = getState(endpoint); EmberAfStatus status; uint8_t currentLevel; @@ -796,7 +781,7 @@ static void moveHandler(uint8_t commandId, uint8_t moveMode, uint8_t rate, uint8 status = EMBER_ZCL_STATUS_SUCCESS; send_default_response: - if (sendResponse) emberAfSendImmediateDefaultResponse(status); + emberAfSendImmediateDefaultResponse(status); } static void stepHandler(uint8_t commandId, @@ -982,15 +967,21 @@ void emberAfOnOffClusterLevelControlEffectCallback(uint8_t endpoint, resolvedLevel = temporaryCurrentLevelCache; #endif - // Read the OnOffTransitionTime attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE +// Read the OnTransitionTime or offTransitionTime attribute. +#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_TRANSITION_TIME_ATTRIBUTE) || defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OFF_TRANSITION_TIME_ATTRIBUTE) + // If either of these attributes are used, we need to read the OnOffTransitionTime. + uint16_t attrId = (newValue + ? ZCL_ON_TRANSITION_TIME_ATTRIBUTE_ID + : ZCL_OFF_TRANSITION_TIME_ATTRIBUTE_ID); status = emberAfReadServerAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, + attrId, (uint8_t *)¤tOnOffTransitionTime, sizeof(currentOnOffTransitionTime)); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + emberAfLevelControlClusterPrintln("ERR: Couldn't read %d attribute of the LevelControl cluster %x", + attrId, + status); return; } #else @@ -999,14 +990,11 @@ void emberAfOnOffClusterLevelControlEffectCallback(uint8_t endpoint, if (newValue) { // If newValue is ZCL_ON_COMMAND_ID... - // "Set CurrentLevel to minimum level allowed for the device", - // unless we just make it instantaneous, depending on OnOff transition time - bool instanteneous = currentOnOffTransitionTime == 0x000 - || currentOnOffTransitionTime == 0xFFFF; + // "Set CurrentLevel to minimum level allowed for the device." status = emberAfWriteServerAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, - (uint8_t *) (instanteneous) ? &resolvedLevel : &minimumLevelAllowedForTheDevice, + (uint8_t *)&minimumLevelAllowedForTheDevice, ZCL_INT8U_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); diff --git a/TBS2Torch/hw/drivers.c b/TBS2Torch/hw/drivers.c index 67c9280..e9cb18c 100644 --- a/TBS2Torch/hw/drivers.c +++ b/TBS2Torch/hw/drivers.c @@ -93,14 +93,23 @@ void hal_rgb_led_disable(int ledNumber) } } +void hal_rgb_led_turnonoff(bool turnon) +{ + if ( turnon ) { + hal_rgb_leds_enable(); + sl_simple_rgb_pwm_led_turn_on(sl_simple_rgb_pwm_led_rgb_led0.led_common.context); + } else { + sl_simple_rgb_pwm_led_turn_off(sl_simple_rgb_pwm_led_rgb_led0.led_common.context); + hal_rgb_leds_disable(); + } +} /* * Turn LEDs on */ void hal_rgb_led_turnon() { - hal_rgb_leds_enable(); - sl_simple_rgb_pwm_led_turn_on(sl_simple_rgb_pwm_led_rgb_led0.led_common.context); + hal_rgb_led_turnonoff( true ); } @@ -109,9 +118,7 @@ void hal_rgb_led_turnon() */ void hal_rgb_led_turnoff() { -// sl_led_turn_off((sl_led_t*)&sl_simple_rgb_pwm_led_rgb_led0); - sl_simple_rgb_pwm_led_turn_off(sl_simple_rgb_pwm_led_rgb_led0.led_common.context); - hal_rgb_leds_disable(); + hal_rgb_led_turnonoff( false ); } @@ -130,22 +137,14 @@ void hal_rgb_led_set_rgbcolor(uint16_t red, uint16_t green, uint16_t blue) void hal_rgb_led_set_brightness(uint8_t level) { uint16_t red, green, blue; - sl_zigbee_app_debug_print("Setting brightness from %d to %d", targetLevel, level); sl_led_get_rgb_color(&sl_simple_rgb_pwm_led_rgb_led0, &red, &green, &blue); red = MAX(red, 1); green = MAX(green, 1); blue = MAX(blue, 1); - sl_zigbee_app_debug_print(" changing RED from %d ", red); red = red * level / targetLevel; - sl_zigbee_app_debug_print("to %d ", red); - sl_zigbee_app_debug_print(" changing GREEN from %d ", green); green = green * level / targetLevel; - sl_zigbee_app_debug_print("to %d ", green); - sl_zigbee_app_debug_print(" changing BLUE from %d ", blue); blue = blue * level / targetLevel; - sl_zigbee_app_debug_print("to %d ", blue); - sl_led_set_rgb_color(&sl_simple_rgb_pwm_led_rgb_led0, red, green, blue); if ( SL_LED_CURRENT_STATE_OFF == sl_led_get_state((const sl_led_t *) &sl_simple_rgb_pwm_led_rgb_led0) ) diff --git a/TBS2Torch/hw/drivers.h b/TBS2Torch/hw/drivers.h index d5c7563..71a2783 100644 --- a/TBS2Torch/hw/drivers.h +++ b/TBS2Torch/hw/drivers.h @@ -19,6 +19,7 @@ void hal_rgb_led_enable(int ledNumber); void hal_rgb_led_disable(int ledNumber); void hal_rgb_led_turnon(); void hal_rgb_led_turnoff(); +void hal_rgb_led_turnonoff(bool turn_on); void hal_rgb_led_set_rgbcolor(uint16_t red, uint16_t green, uint16_t blue); void hal_rgb_led_set_brightness(uint8_t brightness); uint8_t hal_rgb_led_get_brightness(); diff --git a/TBS2Torch/sl_zigbee_watchdog_periodic_refresh.c b/TBS2Torch/sl_zigbee_watchdog_periodic_refresh.c deleted file mode 100644 index e3251c3..0000000 --- a/TBS2Torch/sl_zigbee_watchdog_periodic_refresh.c +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Sample watchdog refresh event implementation and related configuration - ******************************************************************************* - * # License - * Copyright 2022 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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. - * - ******************************************************************************/ -#include PLATFORM_HEADER -#include "hal.h" -#include "ember.h" -#include "zigbee_app_framework_event.h" -#include "zigbee_app_framework_common.h" -#include "zigbee_watchdog_periodic_refresh_config.h" - -#if (SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE == 1) - -static sl_zigbee_event_t watchdog_refresh_event; -static void watchdog_refresh_event_handler(sl_zigbee_event_t *event); - -// Initialization of watchdog refresh event -void sli_zigbee_watchdog_refresh_handler_init(uint8_t init_level) -{ - switch (init_level) { - case SL_ZIGBEE_INIT_LEVEL_EVENT: - { - sl_zigbee_event_init(&watchdog_refresh_event, watchdog_refresh_event_handler); - sl_zigbee_event_set_active(&watchdog_refresh_event); - break; - } - default: - break; - } -} - -// In RTOS-based applications, the Zigbee task refreshes the watchdog. -// However, when the node is not on a network the Zigbee task does not run. -// Therefore, there needs to be a way to ensure that the watchdog does not fire -// and reset the node unnecessarily. Below we provide an example of an application -// event that periodically resets the watchdog. -// Note, such a periodic event gets the node out of EM1/EM2 low power modes, -// which may result in unnecessary energy consumption. -// The application should ultimately own the refreshing of the watchdog and tailor -// it based on the specific use case. -// In the bare-metal case, this is done in the zigbee stack and app framework ticks -static void watchdog_refresh_event_handler(sl_zigbee_event_t *event) -{ - halResetWatchdog(); - sl_zigbee_event_set_delay_ms(&watchdog_refresh_event, SL_ZIGBEE_WATCHDOG_REFRESH_DURATION_MS); -} -#endif //(SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE == 1) diff --git a/patches/GeckoSDK/0001-EFR32MG12-devices-have-38KB-bootloader-size-dont-thr.patch b/patches/GeckoSDK/0001-EFR32MG12-devices-have-38KB-bootloader-size-dont-thr.patch.skip similarity index 100% rename from patches/GeckoSDK/0001-EFR32MG12-devices-have-38KB-bootloader-size-dont-thr.patch rename to patches/GeckoSDK/0001-EFR32MG12-devices-have-38KB-bootloader-size-dont-thr.patch.skip diff --git a/patches/app/0001-Level-control-to-accept-locally-generated-commands.patch b/patches/app/0001-Level-control-to-accept-locally-generated-commands.patch deleted file mode 100644 index 24af8f4..0000000 --- a/patches/app/0001-Level-control-to-accept-locally-generated-commands.patch +++ /dev/null @@ -1,84 +0,0 @@ -From b865fa9690d0ab0889a593f481ec6775c075ae05 Mon Sep 17 00:00:00 2001 -From: Alexei Chetroi -Date: Wed, 27 Dec 2023 12:20:48 -0500 -Subject: [PATCH] Custom commands for level cluster - ---- - .../plugin/level-control/level-control.c | 30 +++++++++++++++---- - 1 file changed, 24 insertions(+), 6 deletions(-) - -diff --git a/protocol/zigbee/app/framework/plugin/level-control/level-control.c b/protocol/zigbee/app/framework/plugin/level-control/level-control.c -index 9cef92991..c2acb43ca 100644 ---- a/protocol/zigbee/app/framework/plugin/level-control/level-control.c -+++ b/protocol/zigbee/app/framework/plugin/level-control/level-control.c -@@ -550,7 +550,14 @@ static void moveToLevelHandler(uint8_t commandId, - uint8_t optionOverride, - uint16_t storedLevel) - { -- uint8_t endpoint = emberAfCurrentEndpoint(); -+ bool sendResponse = true; -+ uint8_t endpoint; -+ if (emberAfCurrentCommand() == NULL) { -+ endpoint = emberAfPrimaryEndpoint(); -+ sendResponse = false; -+ } else { -+ endpoint = emberAfCurrentEndpoint(); -+ } - EmberAfLevelControlState *state = getState(endpoint); - EmberAfStatus status; - uint8_t currentLevel; -@@ -670,7 +677,8 @@ static void moveToLevelHandler(uint8_t commandId, - #endif - - send_default_response: -- if (emberAfCurrentCommand()->apsFrame->clusterId -+ if (sendResponse -+ && emberAfCurrentCommand()->apsFrame->clusterId - == ZCL_LEVEL_CONTROL_CLUSTER_ID) { - emberAfSendImmediateDefaultResponse(status); - } -@@ -678,7 +686,14 @@ static void moveToLevelHandler(uint8_t commandId, - - static void moveHandler(uint8_t commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride) - { -- uint8_t endpoint = emberAfCurrentEndpoint(); -+ bool sendResponse = true; -+ uint8_t endpoint; -+ if (emberAfCurrentCommand() == NULL) { -+ endpoint = emberAfPrimaryEndpoint(); -+ sendResponse = false; -+ } else { -+ endpoint = emberAfCurrentEndpoint(); -+ } - EmberAfLevelControlState *state = getState(endpoint); - EmberAfStatus status; - uint8_t currentLevel; -@@ -781,7 +796,7 @@ static void moveHandler(uint8_t commandId, uint8_t moveMode, uint8_t rate, uint8 - status = EMBER_ZCL_STATUS_SUCCESS; - - send_default_response: -- emberAfSendImmediateDefaultResponse(status); -+ if (sendResponse) emberAfSendImmediateDefaultResponse(status); - } - - static void stepHandler(uint8_t commandId, -@@ -984,11 +999,14 @@ void emberAfOnOffClusterLevelControlEffectCallback(uint8_t endpoint, - - if (newValue) { - // If newValue is ZCL_ON_COMMAND_ID... -- // "Set CurrentLevel to minimum level allowed for the device." -+ // "Set CurrentLevel to minimum level allowed for the device", -+ // unless we just make it instantaneous, depending on OnOff transition time -+ bool instanteneous = currentOnOffTransitionTime == 0x000 -+ || currentOnOffTransitionTime == 0xFFFF; - status = emberAfWriteServerAttribute(endpoint, - ZCL_LEVEL_CONTROL_CLUSTER_ID, - ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, -- (uint8_t *)&minimumLevelAllowedForTheDevice, -+ (uint8_t *) (instanteneous) ? &resolvedLevel : &minimumLevelAllowedForTheDevice, - ZCL_INT8U_ATTRIBUTE_TYPE); - if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); --- -2.40.1.windows.1 - diff --git a/patches/app/0001-Minimum-changes-to-the-level-control-component.patch b/patches/app/0001-Minimum-changes-to-the-level-control-component.patch new file mode 100644 index 0000000..59961bb --- /dev/null +++ b/patches/app/0001-Minimum-changes-to-the-level-control-component.patch @@ -0,0 +1,59 @@ +From f43a9d3c2b1fd46733d167cbdfeb28604eb8d66d Mon Sep 17 00:00:00 2001 +From: Alexei Chetroi +Date: Wed, 8 Jan 2025 17:31:51 -0500 +Subject: [PATCH] Minimum changes to the level-control component + +Handle transition time on and transition time off attributes. +--- + .../plugin/level-control/level-control.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/protocol/zigbee/app/framework/plugin/level-control/level-control.c b/protocol/zigbee/app/framework/plugin/level-control/level-control.c +index 9cef92991..e0199e3ad 100644 +--- a/protocol/zigbee/app/framework/plugin/level-control/level-control.c ++++ b/protocol/zigbee/app/framework/plugin/level-control/level-control.c +@@ -229,6 +229,7 @@ void emberAfLevelControlClusterServerTickCallback(uint8_t endpoint) + + // Are we at the requested level? + if (currentLevel == state->moveToLevel) { ++ writeRemainingTime(endpoint, 0); + if (state->commandId == ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID + || state->commandId == ZCL_MOVE_WITH_ON_OFF_COMMAND_ID + || state->commandId == ZCL_STEP_WITH_ON_OFF_COMMAND_ID) { +@@ -262,7 +263,6 @@ void emberAfLevelControlClusterServerTickCallback(uint8_t endpoint) + } + } + } +- writeRemainingTime(endpoint, 0); + } else { + writeRemainingTime(endpoint, + state->transitionTimeMs - state->elapsedTimeMs); +@@ -967,15 +967,21 @@ void emberAfOnOffClusterLevelControlEffectCallback(uint8_t endpoint, + resolvedLevel = temporaryCurrentLevelCache; + #endif + +- // Read the OnOffTransitionTime attribute. +-#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE ++// Read the OnTransitionTime or offTransitionTime attribute. ++#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_TRANSITION_TIME_ATTRIBUTE) || defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OFF_TRANSITION_TIME_ATTRIBUTE) ++ // If either of these attributes are used, we need to read the OnOffTransitionTime. ++ uint16_t attrId = (newValue ++ ? ZCL_ON_TRANSITION_TIME_ATTRIBUTE_ID ++ : ZCL_OFF_TRANSITION_TIME_ATTRIBUTE_ID); + status = emberAfReadServerAttribute(endpoint, + ZCL_LEVEL_CONTROL_CLUSTER_ID, +- ZCL_ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, ++ attrId, + (uint8_t *)¤tOnOffTransitionTime, + sizeof(currentOnOffTransitionTime)); + if (status != EMBER_ZCL_STATUS_SUCCESS) { +- emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); ++ emberAfLevelControlClusterPrintln("ERR: Couldn't read %d attribute of the LevelControl cluster %x", ++ attrId, ++ status); + return; + } + #else +-- +2.47.1.windows.1 +