diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9938b54a..edfcfd74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -130,7 +130,7 @@ jobs: - name: Install SDK extensions run: | # XXX: slc-cli does not actually work when the extensions aren't in the SDK! - for sdk in /gecko_sdk_*; do + for sdk in /*_sdk_*; do slc signature trust --sdk "$sdk" ln -s $PWD/gecko_sdk_extensions "$sdk"/extension @@ -148,7 +148,7 @@ jobs: # Pass all SDKs as consecutive `--sdk ...` arguments sdk_args="" - for sdk_dir in /gecko_sdk*; do + for sdk_dir in /*_sdk*; do sdk_args="$sdk_args --sdk $sdk_dir" done diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2582ac15..4b9b1710 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,4 @@ repos: - - repo: local - hooks: - - id: normalize-cproject - name: Normalize Eclipse .cproject files - entry: python tools/normalize_cproject.py - language: system - files: \.cproject$ - pass_filenames: true - - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.3 hooks: diff --git a/Dockerfile b/Dockerfile index df65d780..980a85b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,12 @@ RUN \ && tar -C /opt -xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz \ && rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz +# Simplicity SDK 2024.6.2 +RUN \ + curl -o simplicity_sdk_2024.6.2.zip -L https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.6.2/gecko-sdk.zip \ + && unzip -q -d simplicity_sdk_2024.6.2 simplicity_sdk_2024.6.2.zip \ + && rm simplicity_sdk_2024.6.2.zip + # Gecko SDK 4.4.4 RUN \ curl -o gecko_sdk_4.4.4.zip -L https://github.com/SiliconLabs/gecko_sdk/releases/download/v4.4.4/gecko-sdk.zip \ diff --git a/README.md b/README.md index 85680d27..e3aaf22a 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,9 @@ It uses the Silicon Labs Gecko SDK and proprietary Silicon Labs tools such as th Silicon Labs Configurator (slc) and the Simplicity Commander standalone utility. ## Background -The projects contained within this repository are configured for the BRD4001A dev kit -with a BRD4179B (EFR32MG21) module. This allows base projects to be debugged using -the Simplicity Studio IDE. These base projects are then retargeted for other boards -using manifest files. For example, the [`skyconnect_ncp-uart-hw.yaml`](https://github.com/NabuCasa/silabs-firmware-builder/blob/main/manifests/skyconnect_ncp-uart-hw.yaml) -manifest file retargets the base firmware to the SkyConnect/Connect ZBT-1. +The project templates in this repository are configured and built for specific boards +using manifest files. For example, the [`skyconnect_zigbee_ncp.yaml`](https://github.com/NabuCasa/silabs-firmware-builder/blob/main/manifests/skyconnect_zigbee_ncp.yaml) +manifest file configures the Zigbee firmware for the SkyConnect/Connect ZBT-1. ## Setting up Simplicity Studio (for development) If you are going to be developing using Simplicity Studio, note that each project can @@ -35,11 +33,9 @@ Simplicity Studio SDK management workflow and manually manage SDKs: Repeat this process for every necessary SDK version. -Base projects can now be built normally. - > [!TIP] > If you have build issues after switching commits, make sure to delete any -> `gecko_sdk_*` folders from the Simplicity working tree. +> `gecko_sdk_*` and `template` folders from the Simplicity working tree. ## Building with a firmware manifest (for building device firmware) Command line building requires: diff --git a/manifests/nabucasa/skyconnect_bootloader-uart-xmodem.yaml b/manifests/nabucasa/skyconnect_bootloader.yaml similarity index 83% rename from manifests/nabucasa/skyconnect_bootloader-uart-xmodem.yaml rename to manifests/nabucasa/skyconnect_bootloader.yaml index 015dee64..b6547fb9 100644 --- a/manifests/nabucasa/skyconnect_bootloader-uart-xmodem.yaml +++ b/manifests/nabucasa/skyconnect_bootloader.yaml @@ -1,11 +1,13 @@ name: SkyConnect Bootloader device: EFR32MG21A020F512IM32 -base_project: src/bootloader-uart-xmodem +base_project: src/bootloader filename: "{manifest_name}_{gecko_bootloader_version}" +sdk: "gecko_sdk:4.4.4" +toolchain: "12.2.1.20221205" gbl: fw_type: gecko-bootloader - dynamic: ["gecko_bootloader_version"] + gecko_bootloader_version: dynamic baudrate: 115200 remove_components: diff --git a/manifests/nabucasa/skyconnect_firmware-eraser.yaml b/manifests/nabucasa/skyconnect_firmware-eraser.yaml deleted file mode 100644 index 9feb8a14..00000000 --- a/manifests/nabucasa/skyconnect_firmware-eraser.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: SkyConnect Firmware Eraser -device: EFR32MG21A020F512IM32 -base_project: misc/firmware-eraser -filename: "{manifest_name}_gsdk_{sdk_version}" - -gbl: {} diff --git a/manifests/nabucasa/skyconnect_ot-rcp.yaml b/manifests/nabucasa/skyconnect_openthread_rcp.yaml similarity index 84% rename from manifests/nabucasa/skyconnect_ot-rcp.yaml rename to manifests/nabucasa/skyconnect_openthread_rcp.yaml index 8a6e5c6d..284e2993 100644 --- a/manifests/nabucasa/skyconnect_ot-rcp.yaml +++ b/manifests/nabucasa/skyconnect_openthread_rcp.yaml @@ -1,19 +1,19 @@ name: SkyConnect OpenThread RCP device: EFR32MG21A020F512IM32 -base_project: src/ot-rcp +base_project: src/openthread_rcp filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}" +sdk: "gecko_sdk:4.4.4" +toolchain: "12.2.1.20221205" gbl: - fw_type: ot-rcp - dynamic: ["ot_rcp_version"] + fw_type: openthread_rcp + ot_rcp_version: dynamic baudrate: 460800 -configuration: - SL_UARTDRV_USART_VCOM_BAUDRATE: 460800 - c_defines: SL_UARTDRV_USART_VCOM_PERIPHERAL: USART0 SL_UARTDRV_USART_VCOM_PERIPHERAL_NO: 0 + SL_UARTDRV_USART_VCOM_BAUDRATE: 460800 SL_UARTDRV_USART_VCOM_TX_PORT: gpioPortA SL_UARTDRV_USART_VCOM_TX_PIN: 6 diff --git a/manifests/nabucasa/skyconnect_rcp-uart-802154.yaml b/manifests/nabucasa/skyconnect_rcp-uart-802154.yaml deleted file mode 100644 index ea263f97..00000000 --- a/manifests/nabucasa/skyconnect_rcp-uart-802154.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: SkyConnect Multi-PAN -device: EFR32MG21A020F512IM32 -base_project: src/rcp-uart-802154 -filename: "{manifest_name}_gsdk_{sdk_version}" - -gbl: - fw_type: rcp-uart-802154 - dynamic: ["ezsp_version", "ot_rcp_version", "cpc_version"] - baudrate: 460800 - -configuration: - SL_CPC_DRV_UART_VCOM_BAUDRATE: 460800 - -c_defines: - CPC_SECONDARY_APP_VERSION_SUFFIX: 'template:"-{git_repo_hash}"' - - SL_CPC_DRV_UART_VCOM_PERIPHERAL: USART0 - SL_CPC_DRV_UART_VCOM_PERIPHERAL_NO: 0 - - SL_CPC_DRV_UART_VCOM_TX_PORT: gpioPortA - SL_CPC_DRV_UART_VCOM_TX_PIN: 6 - - SL_CPC_DRV_UART_VCOM_RX_PORT: gpioPortA - SL_CPC_DRV_UART_VCOM_RX_PIN: 5 - - SL_CPC_DRV_UART_VCOM_CTS_PORT: gpioPortB - SL_CPC_DRV_UART_VCOM_CTS_PIN: 1 - - SL_CPC_DRV_UART_VCOM_RTS_PORT: gpioPortB - SL_CPC_DRV_UART_VCOM_RTS_PIN: 0 - - SL_APPLICATION_PRODUCT_ID: '{0xE9, 0x92, 0x67, 0x94, 0xBB, 0x2C, 0x4E, 0xC8, 0x9F, 0x36, 0xD9, 0xC6, 0x79, 0x4A, 0x81, 0xFB}' diff --git a/manifests/nabucasa/skyconnect_ncp-uart-hw.yaml b/manifests/nabucasa/skyconnect_zigbee_ncp.yaml similarity index 67% rename from manifests/nabucasa/skyconnect_ncp-uart-hw.yaml rename to manifests/nabucasa/skyconnect_zigbee_ncp.yaml index fd04c863..44d707f1 100644 --- a/manifests/nabucasa/skyconnect_ncp-uart-hw.yaml +++ b/manifests/nabucasa/skyconnect_zigbee_ncp.yaml @@ -1,18 +1,30 @@ name: SkyConnect Zigbee device: EFR32MG21A020F512IM32 -base_project: src/ncp-uart-hw +base_project: src/zigbee_ncp filename: "{manifest_name}_{ezsp_version}" +sdk: "gecko_sdk:4.4.4" +toolchain: "12.2.1.20221205" gbl: - fw_type: ncp-uart-hw - dynamic: ["ezsp_version"] + fw_type: zigbee_ncp + ezsp_version: dynamic baudrate: 115200 configuration: + EMBER_CHILD_TABLE_SIZE: 32 + +c_defines: + EMBER_APS_UNICAST_MESSAGE_COUNT: 32 + EMBER_BINDING_TABLE_SIZE: 32 + EMBER_BROADCAST_TABLE_SIZE: 64 + EMBER_KEY_TABLE_SIZE: 12 + EMBER_MAX_END_DEVICE_CHILDREN: 32 + EMBER_PACKET_BUFFER_COUNT: 255 + EMBER_SOURCE_ROUTE_TABLE_SIZE: 200 + SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200 SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts -c_defines: SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0 SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO: 0 diff --git a/manifests/nabucasa/slusb001a-lr2_zwave_ncp_serial_api_controller.yaml b/manifests/nabucasa/slusb001a-lr2_zwave_ncp_serial_api_controller.yaml deleted file mode 100644 index cfcd0fbb..00000000 --- a/manifests/nabucasa/slusb001a-lr2_zwave_ncp_serial_api_controller.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: ??? -device: ZGM130S037HGN -base_project: src/zwave_ncp_serial_api_controller - -gbl: - fw_type: z-wave - dynamic: ["zwave_version"] - baudrate: 115200 - compression: lz4 - sign_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key" - encrypt_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key" - -add_components: -- id: brd4207a diff --git a/manifests/nabucasa/slusb001a-lr_zwave_ncp_serial_api_controller.yaml b/manifests/nabucasa/slusb001a-lr_zwave_ncp_serial_api_controller.yaml deleted file mode 100644 index 4f7c243a..00000000 --- a/manifests/nabucasa/slusb001a-lr_zwave_ncp_serial_api_controller.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Silicon Labs UZB-7 (SLUSB001A), +14 dBm, Z-Wave Long Range -device: EFR32ZG14P231F256GM32 -base_project: src/zwave_ncp_serial_api_controller - -gbl: - fw_type: z-wave - dynamic: ["zwave_version"] - baudrate: 115200 - compression: lz4 - sign_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key" - encrypt_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key" - -add_components: -- id: brd4206a diff --git a/manifests/nabucasa/slusb001a_zwave_ncp_serial_api_controller.yaml b/manifests/nabucasa/slusb001a_zwave_ncp_serial_api_controller.yaml deleted file mode 100644 index fae99012..00000000 --- a/manifests/nabucasa/slusb001a_zwave_ncp_serial_api_controller.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Silicon Labs UZB-7 (SLUSB001A), +14 dBm, with SAW filters -device: EFR32ZG14P231F256GM32 -base_project: src/zwave_ncp_serial_api_controller - -gbl: - fw_type: z-wave - dynamic: ["zwave_version"] - baudrate: 115200 - compression: lz4 - sign_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key" - encrypt_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key" - -add_components: -- id: brd4201a diff --git a/manifests/nabucasa/yellow_bootloader-uart-xmodem.yaml b/manifests/nabucasa/yellow_bootloader.yaml similarity index 84% rename from manifests/nabucasa/yellow_bootloader-uart-xmodem.yaml rename to manifests/nabucasa/yellow_bootloader.yaml index 9b263385..2859c852 100644 --- a/manifests/nabucasa/yellow_bootloader-uart-xmodem.yaml +++ b/manifests/nabucasa/yellow_bootloader.yaml @@ -1,11 +1,13 @@ name: Yellow Bootloader device: MGM210PA32JIA -base_project: src/bootloader-uart-xmodem +base_project: src/bootloader filename: "{manifest_name}_{gecko_bootloader_version}" +sdk: "gecko_sdk:4.4.4" +toolchain: "12.2.1.20221205" gbl: fw_type: gecko-bootloader - dynamic: ["gecko_bootloader_version"] + gecko_bootloader_version: dynamic baudrate: 115200 c_defines: diff --git a/manifests/nabucasa/yellow_ot-rcp.yaml b/manifests/nabucasa/yellow_openthread_rcp.yaml similarity index 86% rename from manifests/nabucasa/yellow_ot-rcp.yaml rename to manifests/nabucasa/yellow_openthread_rcp.yaml index d795c46c..d0ee8200 100644 --- a/manifests/nabucasa/yellow_ot-rcp.yaml +++ b/manifests/nabucasa/yellow_openthread_rcp.yaml @@ -1,23 +1,23 @@ name: Yellow OpenThread RCP device: MGM210PA32JIA -base_project: src/ot-rcp +base_project: src/openthread_rcp filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}" +sdk: "gecko_sdk:4.4.4" +toolchain: "12.2.1.20221205" gbl: - fw_type: ot-rcp - dynamic: ["ot_rcp_version"] + fw_type: openthread_rcp + ot_rcp_version: dynamic baudrate: 460800 add_components: - id: simple_led instance: [board_activity] -configuration: - SL_UARTDRV_USART_VCOM_BAUDRATE: 460800 - c_defines: SL_UARTDRV_USART_VCOM_PERIPHERAL: USART0 SL_UARTDRV_USART_VCOM_PERIPHERAL_NO: 0 + SL_UARTDRV_USART_VCOM_BAUDRATE: 460800 SL_UARTDRV_USART_VCOM_TX_PORT: gpioPortA SL_UARTDRV_USART_VCOM_TX_PIN: 5 diff --git a/manifests/nabucasa/yellow_rcp-uart-802154.yaml b/manifests/nabucasa/yellow_rcp-uart-802154.yaml deleted file mode 100644 index cc8fb465..00000000 --- a/manifests/nabucasa/yellow_rcp-uart-802154.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Yellow Multi-PAN -device: MGM210PA32JIA -base_project: src/rcp-uart-802154 - -gbl: - fw_type: rcp-uart-802154 - dynamic: ["ezsp_version", "ot_rcp_version", "cpc_version"] - baudrate: 460800 - -add_components: -- id: simple_led - instance: [board_activity] - -configuration: - SL_CPC_DRV_UART_VCOM_BAUDRATE: 460800 - -c_defines: - CPC_SECONDARY_APP_VERSION_SUFFIX: 'template:"-{git_repo_hash}"' - - SL_CPC_DRV_UART_VCOM_PERIPHERAL: USART0 - SL_CPC_DRV_UART_VCOM_PERIPHERAL_NO: 0 - - SL_CPC_DRV_UART_VCOM_TX_PORT: gpioPortA - SL_CPC_DRV_UART_VCOM_TX_PIN: 5 - - SL_CPC_DRV_UART_VCOM_RX_PORT: gpioPortA - SL_CPC_DRV_UART_VCOM_RX_PIN: 6 - - SL_CPC_DRV_UART_VCOM_CTS_PORT: gpioPortD - SL_CPC_DRV_UART_VCOM_CTS_PIN: 2 - - SL_CPC_DRV_UART_VCOM_RTS_PORT: gpioPortC - SL_CPC_DRV_UART_VCOM_RTS_PIN: 1 - - SL_SIMPLE_LED_BOARD_ACTIVITY_POLARITY: SL_SIMPLE_LED_POLARITY_ACTIVE_LOW - SL_SIMPLE_LED_BOARD_ACTIVITY_PORT: gpioPortB - SL_SIMPLE_LED_BOARD_ACTIVITY_PIN: 1 diff --git a/manifests/nabucasa/yellow_ncp-uart-hw.yaml b/manifests/nabucasa/yellow_zigbee_ncp.yaml similarity index 66% rename from manifests/nabucasa/yellow_ncp-uart-hw.yaml rename to manifests/nabucasa/yellow_zigbee_ncp.yaml index 118a5fb2..1cbdd0ae 100644 --- a/manifests/nabucasa/yellow_ncp-uart-hw.yaml +++ b/manifests/nabucasa/yellow_zigbee_ncp.yaml @@ -1,11 +1,13 @@ name: Yellow Zigbee device: MGM210PA32JIA -base_project: src/ncp-uart-hw +base_project: src/zigbee_ncp filename: "{manifest_name}_{ezsp_version}" +sdk: "gecko_sdk:4.4.4" +toolchain: "12.2.1.20221205" gbl: - fw_type: ncp-uart-hw - dynamic: ["ezsp_version"] + fw_type: zigbee_ncp + ezsp_version: dynamic baudrate: 115200 add_components: @@ -13,11 +15,21 @@ add_components: instance: [board_activity] configuration: + EMBER_CHILD_TABLE_SIZE: 32 + +c_defines: + EMBER_APS_UNICAST_MESSAGE_COUNT: 32 + EMBER_BINDING_TABLE_SIZE: 32 + EMBER_BROADCAST_TABLE_SIZE: 64 + EMBER_KEY_TABLE_SIZE: 12 + EMBER_MAX_END_DEVICE_CHILDREN: 32 + EMBER_PACKET_BUFFER_COUNT: 255 + EMBER_SOURCE_ROUTE_TABLE_SIZE: 200 + SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200 SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts -c_defines: - SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0 + SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0 SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO: 0 SL_IOSTREAM_USART_VCOM_TX_PORT: gpioPortA diff --git a/manifests/nabucasa/zwave_stick.yaml b/manifests/nabucasa/zwave_stick.yaml new file mode 100644 index 00000000..f48ffc2b --- /dev/null +++ b/manifests/nabucasa/zwave_stick.yaml @@ -0,0 +1,28 @@ +name: Z-Wave Stick +device: EFR32ZG23A020F512GM40 +base_project: src/zwave_ncp +filename: "{manifest_name}_{zwave_version}" +sdk: "simplicity_sdk:2024.6.2" +toolchain: "12.2.1.20221205" + +gbl: + fw_type: zwave_ncp + zwave_version: dynamic + baudrate: 115200 + compression: lz4 + sign_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key" + encrypt_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key" + +c_defines: + ZAF_CONFIG_MANUFACTURER_ID: "0x0466" + ZAF_CONFIG_PRODUCT_TYPE_ID: "0x0001" + ZAF_CONFIG_PRODUCT_ID: "0x0001" + + SERIAL_API_PERIPHERAL: USART0 + SERIAL_API_PERIPHERAL_NO: 0 + + SERIAL_API_TX_PORT: gpioPortA + SERIAL_API_TX_PIN: 8 + + SERIAL_API_RX_PORT: gpioPortA + SERIAL_API_RX_PIN: 9 \ No newline at end of file diff --git a/misc/firmware-eraser/.cproject b/misc/firmware-eraser/.cproject deleted file mode 100644 index 54a97c22..00000000 --- a/misc/firmware-eraser/.cproject +++ /dev/null @@ -1,2757 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/misc/firmware-eraser/app.cpp b/misc/firmware-eraser/app.cpp deleted file mode 100644 index 55706027..00000000 --- a/misc/firmware-eraser/app.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include - -#include -#include - -#include - - -// TODO: figure out how to actually include this properly -void bootloader_rebootAndInstall(void) -{ - // Set reset reason to bootloader entry - BootloaderResetCause_t* resetCause = (BootloaderResetCause_t*) (SRAM_BASE); - resetCause->reason = BOOTLOADER_RESET_REASON_BADAPP; - resetCause->signature = BOOTLOADER_RESET_SIGNATURE_INVALID; -#if defined(RMU_PRESENT) - // Clear resetcause - RMU->CMD = RMU_CMD_RCCLR; - // Trigger a software system reset - RMU->CTRL = (RMU->CTRL & ~_RMU_CTRL_SYSRMODE_MASK) | RMU_CTRL_SYSRMODE_FULL; -#endif - NVIC_SystemReset(); -} - -/***************************************************************************//** - * Initialize application. - ******************************************************************************/ -void app_init(void) -{ - // This will set the program counter (startOfAppSpace + 4) to 0xFFFFFFFF, which - // breaks the bootloader early with `BOOTLOADER_RESET_REASON_BADAPP`. - MSC_Init(); - MSC_ErasePage((uint32_t*)BTL_APPLICATION_BASE); - MSC_Deinit(); - - bootloader_rebootAndInstall(); -} - -/***************************************************************************//** - * App ticking function. - ******************************************************************************/ -void app_process_action(void) -{ -} diff --git a/misc/firmware-eraser/app.h b/misc/firmware-eraser/app.h deleted file mode 100644 index b8f74c81..00000000 --- a/misc/firmware-eraser/app.h +++ /dev/null @@ -1,31 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Top level application functions - ******************************************************************************* - * # 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 APP_H -#define APP_H - -/***************************************************************************//** - * Initialize application. - ******************************************************************************/ -void app_init(void); - -/***************************************************************************//** - * App ticking function. - ******************************************************************************/ -void app_process_action(void); - -#endif // APP_H diff --git a/misc/firmware-eraser/config/app_properties_config.h b/misc/firmware-eraser/config/app_properties_config.h deleted file mode 100644 index 792f1c8f..00000000 --- a/misc/firmware-eraser/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 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } - -// - -#endif // APP_PROPERTIES_CONFIG_H \ No newline at end of file diff --git a/misc/firmware-eraser/config/btl_interface_cfg.h b/misc/firmware-eraser/config/btl_interface_cfg.h deleted file mode 100644 index 13e09116..00000000 --- a/misc/firmware-eraser/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 \ No newline at end of file diff --git a/misc/firmware-eraser/config/btl_interface_cfg_s2c1.h b/misc/firmware-eraser/config/btl_interface_cfg_s2c1.h deleted file mode 100644 index 7f703143..00000000 --- a/misc/firmware-eraser/config/btl_interface_cfg_s2c1.h +++ /dev/null @@ -1,281 +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_S2C1_H -#define BTL_INTERFACE_CFG_S2C1_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Bootloader Interface Trust Zone Security State Configuration - -// Disable multi tiered fallback logic -// The fault handling logic as well as the USART auto-detection logic will be disabled. -// The re-configuration of SMU will be handled by querying the running bootloader -// for the peripheral list. Querying the peripheral list is supported from the bootloader -// version 2.0.0. Check for the BOOTLOADER_CAPABILITY_PERIPHERAL_LIST capability to -// see if the running bootloader supports querying the peripheral list. -#define BOOTLOADER_DISABLE_OLD_BOOTLOADER_MITIGATION 0 - -// Disable peripheral access fault handling -// The fault handling triggered by an erroneous access of peripherals will be disabled. -// -// This should be disabled iff all the peripherals that are in use by the bootloader -// have been properly configured by the "Manually override security state of peripherals" option. -#define BOOTLOADER_DISABLE_NVM3_FAULT_HANDLING 0 - -// Manually override the security state of peripherals in use by the bootloader -// Default: 0. -// Manually override the security state of peripherals. Choose the peripherals touched -// by the customized code to have a valid secure access state before interacting with the bootloader -// In practice, this means that the chosen peripherals will be available at the secure address, -// which is accessible by the bootloader. Once the application is entered back the secure access state -// is changed back to the original state. -// -// The USART auto-detection logic that detects which, if any, USART is in use by the bootloader -// will be disabled. Make sure to choose the correct USART used by the bootloader. -#define BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE 0 -// EMU -// Update secure access state of EMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_EMU 0 - -// CMU -// Update secure access state of CMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_CMU 0 - -// HFXO0 -// Update secure access state of HFXO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFXO0 0 - -// HFRCO0 -// Update secure access state of HFRCO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFRCO0 0 - -// FSRCO -// Update secure access state of FSRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_FSRCO 0 - -// DPLL0 -// Update secure access state of DPLL0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_DPLL0 0 - -// LFXO -// Update secure access state of LFXO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFXO 0 - -// LFRCO -// Update secure access state of LFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFRCO 0 - -// ULFRCO -// Update secure access state of ULFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_ULFRCO 0 - -// MSC -// Update secure access state of MSC before calling into bootloader -#define BOOTLOADER_PPUSATD0_MSC 0 - -// ICACHE0 -// Update secure access state of ICACHE0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_ICACHE0 0 - -// PRS -// Update secure access state of PRS before calling into bootloader -#define BOOTLOADER_PPUSATD0_PRS 0 - -// GPIO -// Update secure access state of GPIO before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPIO 0 - -// LDMA -// Update secure access state of LDMA before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMA 0 - -// LDMAXBAR -// Update secure access state of LDMAXBAR before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMAXBAR 0 - -// TIMER0 -// Update secure access state of TIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER0 0 - -// TIMER1 -// Update secure access state of TIMER1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER1 0 - -// TIMER2 -// Update secure access state of TIMER2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER2 0 - -// TIMER3 -// Update secure access state of TIMER3 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER3 0 - -// USART0 -// Update secure access state of USART0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART0 0 - -// USART1 -// Update secure access state of USART1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART1 0 - -// USART2 -// Update secure access state of USART2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART2 0 - -// BURTC -// Update secure access state of BURTC before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURTC 0 - -// I2C1 -// Update secure access state of I2C1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_I2C1 0 - -// CHIPTESTCTRL -// Update secure access state of CHIPTESTCTRL before calling into bootloader -#define BOOTLOADER_PPUSATD0_CHIPTESTCTRL 0 - -// LVGD -// Update secure access state of LVGD before calling into bootloader -#define BOOTLOADER_PPUSATD0_LVGD 0 - -// SYSCFG -// Update secure access state of SYSCFG before calling into bootloader -#define BOOTLOADER_PPUSATD0_SYSCFG 0 - -// BURAM -// Update secure access state of BURAM before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURAM 0 - -// IFADCDEBUG -// Update secure access state of IFADCDEBUG before calling into bootloader -#define BOOTLOADER_PPUSATD0_IFADCDEBUG 0 - -// GPCRC -// Update secure access state of GPCRC before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPCRC 0 - -// RTCC -// Update secure access state of RTCC before calling into bootloader -#define BOOTLOADER_PPUSATD0_RTCC 0 - -// LETIMER0 -// Update secure access state of LETIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_LETIMER0 0 - -// IADC0 -// Update secure access state of IADC0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_IADC0 0 - -// ACMP0 -// Update secure access state of ACMP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP0 0 - -// ACMP1 -// Update secure access state of ACMP1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP1 0 - -// I2C0 -// Update secure access state of I2C0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_I2C0 0 - -// HFRCOEM23 -// Update secure access state of HFRCOEM23 before calling into bootloader -#define BOOTLOADER_PPUSATD1_HFRCOEM23 0 - -// WDOG0 -// Update secure access state of WDOG0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG0 0 - -// WDOG1 -// Update secure access state of WDOG1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG1 0 - -// AMUXCP0 -// Update secure access state of AMUXCP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_AMUXCP0 0 - -// RADIOAES -// Update secure access state of RADIOAES before calling into bootloader -#define BOOTLOADER_PPUSATD1_RADIOAES 0 - -// BUFC -// Update secure access state of BUFC before calling into bootloader -#define BOOTLOADER_PPUSATD1_BUFC 0 - -// SMU -// Update secure access state of SMU before calling into bootloader -#define BOOTLOADER_PPUSATD1_SMU 0 - -// AHBRADIO -// Update secure access state of AHBRADIO before calling into bootloader -#define BOOTLOADER_PPUSATD1_AHBRADIO 0 - -// SEMAILBOX -// Update secure access state of SEMAILBOX before calling into bootloader -#define BOOTLOADER_PPUSATD1_SEMAILBOX 0 -// - -// -// <<< end of configuration section >>> - -#if BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE == 1 -#define BOOTLOADER_PPUSATD0_MASK ((BOOTLOADER_PPUSATD0_EMU << _SMU_PPUSATD0_EMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CMU << _SMU_PPUSATD0_CMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFXO0 << _SMU_PPUSATD0_HFXO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFRCO0 << _SMU_PPUSATD0_HFRCO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_FSRCO << _SMU_PPUSATD0_FSRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_DPLL0 << _SMU_PPUSATD0_DPLL0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFXO << _SMU_PPUSATD0_LFXO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFRCO << _SMU_PPUSATD0_LFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ULFRCO << _SMU_PPUSATD0_ULFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_MSC << _SMU_PPUSATD0_MSC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ICACHE0 << _SMU_PPUSATD0_ICACHE0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_PRS << _SMU_PPUSATD0_PRS_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPIO << _SMU_PPUSATD0_GPIO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMA << _SMU_PPUSATD0_LDMA_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMAXBAR << _SMU_PPUSATD0_LDMAXBAR_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER0 << _SMU_PPUSATD0_TIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER1 << _SMU_PPUSATD0_TIMER1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER2 << _SMU_PPUSATD0_TIMER2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER3 << _SMU_PPUSATD0_TIMER3_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART0 << _SMU_PPUSATD0_USART0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART1 << _SMU_PPUSATD0_USART1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART2 << _SMU_PPUSATD0_USART2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURTC << _SMU_PPUSATD0_BURTC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_I2C1 << _SMU_PPUSATD0_I2C1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CHIPTESTCTRL << _SMU_PPUSATD0_CHIPTESTCTRL_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LVGD << _SMU_PPUSATD0_LVGD_SHIFT) \ - | (BOOTLOADER_PPUSATD0_SYSCFG << _SMU_PPUSATD0_SYSCFG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURAM << _SMU_PPUSATD0_BURAM_SHIFT) \ - | (BOOTLOADER_PPUSATD0_IFADCDEBUG << _SMU_PPUSATD0_IFADCDEBUG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPCRC << _SMU_PPUSATD0_GPCRC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_RTCC << _SMU_PPUSATD0_RTCC_SHIFT)) -#define BOOTLOADER_PPUSATD1_MASK ((BOOTLOADER_PPUSATD1_LETIMER0 << _SMU_PPUSATD1_LETIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_IADC0 << _SMU_PPUSATD1_IADC0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP0 << _SMU_PPUSATD1_ACMP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP1 << _SMU_PPUSATD1_ACMP1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_I2C0 << _SMU_PPUSATD1_I2C0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_HFRCOEM23 << _SMU_PPUSATD1_HFRCOEM23_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG0 << _SMU_PPUSATD1_WDOG0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG1 << _SMU_PPUSATD1_WDOG1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AMUXCP0 << _SMU_PPUSATD1_AMUXCP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_RADIOAES << _SMU_PPUSATD1_RADIOAES_SHIFT) \ - | (BOOTLOADER_PPUSATD1_BUFC << _SMU_PPUSATD1_BUFC_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SMU << _SMU_PPUSATD1_SMU_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AHBRADIO << _SMU_PPUSATD1_AHBRADIO_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SEMAILBOX << _SMU_PPUSATD1_SEMAILBOX_SHIFT)) -#endif // BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE - -#endif // BTL_INTERFACE_CFG_S2C1_H \ No newline at end of file diff --git a/misc/firmware-eraser/config/emlib_core_debug_config.h b/misc/firmware-eraser/config/emlib_core_debug_config.h deleted file mode 100644 index e4a01682..00000000 --- a/misc/firmware-eraser/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/misc/firmware-eraser/config/pin_config.h b/misc/firmware-eraser/config/pin_config.h deleted file mode 100644 index b20910de..00000000 --- a/misc/firmware-eraser/config/pin_config.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[CMU] -// [CMU]$ - -// $[LFXO] -// LFXO LFXTAL_I on PD01 -#ifndef LFXO_LFXTAL_I_PORT -#define LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_I_PIN -#define LFXO_LFXTAL_I_PIN 1 -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef LFXO_LFXTAL_O_PORT -#define LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_O_PIN -#define LFXO_LFXTAL_O_PIN 0 -#endif - -// [LFXO]$ - -// $[PRS.ASYNCH0] -// [PRS.ASYNCH0]$ - -// $[PRS.ASYNCH1] -// [PRS.ASYNCH1]$ - -// $[PRS.ASYNCH2] -// [PRS.ASYNCH2]$ - -// $[PRS.ASYNCH3] -// [PRS.ASYNCH3]$ - -// $[PRS.ASYNCH4] -// [PRS.ASYNCH4]$ - -// $[PRS.ASYNCH5] -// [PRS.ASYNCH5]$ - -// $[PRS.ASYNCH6] -// [PRS.ASYNCH6]$ - -// $[PRS.ASYNCH7] -// [PRS.ASYNCH7]$ - -// $[PRS.ASYNCH8] -// [PRS.ASYNCH8]$ - -// $[PRS.ASYNCH9] -// [PRS.ASYNCH9]$ - -// $[PRS.ASYNCH10] -// [PRS.ASYNCH10]$ - -// $[PRS.ASYNCH11] -// [PRS.ASYNCH11]$ - -// $[PRS.SYNCH0] -// [PRS.SYNCH0]$ - -// $[PRS.SYNCH1] -// [PRS.SYNCH1]$ - -// $[PRS.SYNCH2] -// [PRS.SYNCH2]$ - -// $[PRS.SYNCH3] -// [PRS.SYNCH3]$ - -// $[GPIO] -// GPIO SWV on PA03 -#ifndef GPIO_SWV_PORT -#define GPIO_SWV_PORT gpioPortA -#endif -#ifndef GPIO_SWV_PIN -#define GPIO_SWV_PIN 3 -#endif - -// [GPIO]$ - -// $[TIMER0] -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[TIMER2] -// [TIMER2]$ - -// $[TIMER3] -// [TIMER3]$ - -// $[USART0] -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[I2C1] -// [I2C1]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[IADC0] -// [IADC0]$ - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[I2C0] -// [I2C0]$ - -// $[PTI] -// [PTI]$ - -// $[MODEM] -// [MODEM]$ - -// $[CUSTOM_PIN_NAME] -#ifndef _PORT -#define _PORT gpioPortA -#endif -#ifndef _PIN -#define _PIN 0 -#endif - -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - diff --git a/misc/firmware-eraser/config/sl_board_control_config.h b/misc/firmware-eraser/config/sl_board_control_config.h deleted file mode 100644 index b5a16b94..00000000 --- a/misc/firmware-eraser/config/sl_board_control_config.h +++ /dev/null @@ -1,56 +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 Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 0 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#ifndef SL_BOARD_ENABLE_VCOM_PORT -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD -#endif -#ifndef SL_BOARD_ENABLE_VCOM_PIN -#define SL_BOARD_ENABLE_VCOM_PIN 4 -#endif -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/misc/firmware-eraser/config/sl_debug_swo_config.h b/misc/firmware-eraser/config/sl_debug_swo_config.h deleted file mode 100644 index fee7e65d..00000000 --- a/misc/firmware-eraser/config/sl_debug_swo_config.h +++ /dev/null @@ -1,106 +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 -// $[GPIO_SL_DEBUG] -#ifndef SL_DEBUG_PERIPHERAL -#define SL_DEBUG_PERIPHERAL GPIO -#endif - -// GPIO SWV on PA03 -#ifndef SL_DEBUG_SWV_PORT -#define SL_DEBUG_SWV_PORT gpioPortA -#endif -#ifndef SL_DEBUG_SWV_PIN -#define SL_DEBUG_SWV_PIN 3 -#endif -// [GPIO_SL_DEBUG]$ -// <<< sl:end pin_tool >>> - -#endif // SL_DEBUG_SWO_CONFIG_H diff --git a/misc/firmware-eraser/config/sl_device_init_emu_config.h b/misc/firmware-eraser/config/sl_device_init_emu_config.h deleted file mode 100644 index f23d055b..00000000 --- a/misc/firmware-eraser/config/sl_device_init_emu_config.h +++ /dev/null @@ -1,53 +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 >>> - -// Allow debugger to remain connected in EM2 -// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. -// Enabling debug connectivity results in an increased power consumption in EM2/EM3. -// Default: 1 -#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 - -// 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 \ No newline at end of file diff --git a/misc/firmware-eraser/config/sl_device_init_hfrco_config.h b/misc/firmware-eraser/config/sl_device_init_hfrco_config.h deleted file mode 100644 index 532885ae..00000000 --- a/misc/firmware-eraser/config/sl_device_init_hfrco_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_HFRCO 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_HFRCO_CONFIG_H -#define SL_DEVICE_INIT_HFRCO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Frequency Band -// RC Oscillator Frequency Band -// 1 MHz -// 2 MHz -// 4 MHz -// 7 MHz -// 13 MHz -// 16 MHz -// 19 MHz -// 26 MHz -// 32 MHz -// 38 MHz -// 48 MHz -// 56 MHz -// 64 MHz -// 80 MHz -// Default: cmuHFRCODPLLFreq_80M0Hz -#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H \ No newline at end of file diff --git a/misc/firmware-eraser/config/sl_device_init_hfxo_config.h b/misc/firmware-eraser/config/sl_device_init_hfxo_config.h deleted file mode 100644 index 917e60a6..00000000 --- a/misc/firmware-eraser/config/sl_device_init_hfxo_config.h +++ /dev/null @@ -1,57 +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 sine wave -// Default: cmuHfxoOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_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-255> -// Default: 140 -#define SL_DEVICE_INIT_HFXO_CTUNE 133 - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H \ No newline at end of file diff --git a/misc/firmware-eraser/config/sl_device_init_lfxo_config.h b/misc/firmware-eraser/config/sl_device_init_lfxo_config.h deleted file mode 100644 index d2cd25f5..00000000 --- a/misc/firmware-eraser/config/sl_device_init_lfxo_config.h +++ /dev/null @@ -1,93 +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: cmuLfxoOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 79 - -// LFXO precision in PPM <0-65535> -// Default: 50 -#define SL_DEVICE_INIT_LFXO_PRECISION 50 - -// Startup Timeout Delay -// -// 2 cycles -// 256 cycles -// 1K cycles -// 2K cycles -// 4K cycles -// 8K cycles -// 16K cycles -// 32K cycles -// Default: cmuLfxoStartupDelay_4KCycles -#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_DEVICE_INIT_LFXO -// $[LFXO_SL_DEVICE_INIT_LFXO] -#ifndef SL_DEVICE_INIT_LFXO_PERIPHERAL -#define SL_DEVICE_INIT_LFXO_PERIPHERAL LFXO -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN 0 -#endif - -// LFXO LFXTAL_I on PD01 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN 1 -#endif - -// [LFXO_SL_DEVICE_INIT_LFXO]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/misc/firmware-eraser/config/sl_memory_config.h b/misc/firmware-eraser/config/sl_memory_config.h deleted file mode 100644 index b43ebcba..00000000 --- a/misc/firmware-eraser/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/misc/firmware-eraser/firmware-eraser.pintool b/misc/firmware-eraser/firmware-eraser.pintool deleted file mode 100644 index 734fdd07..00000000 --- a/misc/firmware-eraser/firmware-eraser.pintool +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/misc/firmware-eraser/firmware-eraser.slcp b/misc/firmware-eraser/firmware-eraser.slcp deleted file mode 100644 index f6d7ae34..00000000 --- a/misc/firmware-eraser/firmware-eraser.slcp +++ /dev/null @@ -1,41 +0,0 @@ -# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. -project_name: firmware-eraser -label: firmware-eraser -description: | - This example project shows an empty configuration that can be used as a starting point to add components and functionality. -category: Example|Platform -filter: -- name: Device Type - value: [SoC] -- name: MCU - value: [32-bit MCU] -- name: Project Difficulty - value: [Beginner] -package: platform -quality: production -readme: -- {path: readme.md} -source: -- {path: app.cpp} -- {path: main.cpp} -include: -- path: . - file_list: - - {path: app.h} -sdk: {id: gecko_sdk, version: 4.4.4} -toolchain_settings: [] -component: -- {id: EFR32MG21A010F1024IM32} -- {id: bootloader_app_properties} -- {id: bootloader_interface} -- {id: brd4001a} -- {id: brd4179b} -- {id: cpp_support} -- {id: device_init} -- {id: sl_system} -define: -- {name: DEBUG_EFM} -ui_hints: - highlight: - - {path: readme.md, focus: true} - diff --git a/misc/firmware-eraser/firmware-eraser.slps b/misc/firmware-eraser/firmware-eraser.slps deleted file mode 100644 index 953adc57..00000000 --- a/misc/firmware-eraser/firmware-eraser.slps +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/misc/firmware-eraser/gbl_metadata.yaml b/misc/firmware-eraser/gbl_metadata.yaml deleted file mode 100644 index 9e26dfee..00000000 --- a/misc/firmware-eraser/gbl_metadata.yaml +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/misc/firmware-eraser/main.cpp b/misc/firmware-eraser/main.cpp deleted file mode 100644 index 3e095007..00000000 --- a/misc/firmware-eraser/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************//** - * @file main.cpp - * @brief main() function. - ******************************************************************************* - * # 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. - * - ******************************************************************************/ -#include "sl_component_catalog.h" -#include "sl_system_init.h" -#include "app.h" -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#include "sl_power_manager.h" -#endif -#if defined(SL_CATALOG_KERNEL_PRESENT) -#include "sl_system_kernel.h" -#else // SL_CATALOG_KERNEL_PRESENT -#include "sl_system_process_action.h" -#endif // SL_CATALOG_KERNEL_PRESENT - -int main(void) -{ - // Initialize Silicon Labs device, system, service(s) and protocol stack(s). - // Note that if the kernel is present, processing task(s) will be created by - // this call. - sl_system_init(); - - // Initialize the application. For example, create periodic timer(s) or - // task(s) if the kernel is present. - app_init(); - -#if defined(SL_CATALOG_KERNEL_PRESENT) - // Start the kernel. Task(s) created in app_init() will start running. - sl_system_kernel_start(); -#else // SL_CATALOG_KERNEL_PRESENT - while (1) { - // Do not remove this call: Silicon Labs components process action routine - // must be called from the super loop. - sl_system_process_action(); - - // Application process. - app_process_action(); - -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - // Let the CPU go to sleep if the system allows it. - sl_power_manager_sleep(); -#endif - } -#endif // SL_CATALOG_KERNEL_PRESENT -} diff --git a/src/bootloader-uart-xmodem/.cproject b/src/bootloader-uart-xmodem/.cproject deleted file mode 100644 index 0729a5c6..00000000 --- a/src/bootloader-uart-xmodem/.cproject +++ /dev/null @@ -1,1865 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/bootloader-uart-xmodem.pintool b/src/bootloader-uart-xmodem/bootloader-uart-xmodem.pintool deleted file mode 100644 index 75c7893f..00000000 --- a/src/bootloader-uart-xmodem/bootloader-uart-xmodem.pintool +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/bootloader-uart-xmodem/bootloader-uart-xmodem.slcp b/src/bootloader-uart-xmodem/bootloader-uart-xmodem.slcp deleted file mode 100644 index f271700a..00000000 --- a/src/bootloader-uart-xmodem/bootloader-uart-xmodem.slcp +++ /dev/null @@ -1,40 +0,0 @@ -# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. -project_name: bootloader-uart-xmodem -label: bootloader-uart-xmodem -description: | - Standalone Bootloader using XMODEM-CRC over UART. The bootloader shows a menu, where an XMODEM transfer can be started by sending ASCII '1', or the application can be started by sending ASCII '2'. This is the recommended UART bootloader for the EmberZNet and Connect protocol stacks. -category: Example|Bootloader -filter: -- name: Device Type - value: [NCP] -- name: MCU - value: [Bootloader] -- name: Project Difficulty - value: [Advanced] -package: bootloader -quality: production -readme: -- {path: readme.md} -sdk: {id: gecko_sdk, version: 4.4.4} -toolchain_settings: [] -component: -- {id: EFR32MG21A010F1024IM32} -- {id: bootloader_aes_sha_ecdsa} -- {id: bootloader_core} -- {id: bootloader_crc} -- {id: bootloader_debug} -- {id: bootloader_delay_driver} -- {id: bootloader_gpio_activation} -- {id: bootloader_image_parser} -- {id: bootloader_serial_driver} -- {id: bootloader_token_management} -- {id: bootloader_uart_xmodem} -- {id: bootloader_xmodem_parser} -- {id: brd4001a} -- {id: brd4179b} -configuration: -- {name: SL_VCOM_ENABLE, value: '1'} -ui_hints: - highlight: - - {path: readme.md, focus: true} - diff --git a/src/bootloader-uart-xmodem/bootloader-uart-xmodem.slps b/src/bootloader-uart-xmodem/bootloader-uart-xmodem.slps deleted file mode 100644 index 87edfd11..00000000 --- a/src/bootloader-uart-xmodem/bootloader-uart-xmodem.slps +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/config/btl_aes_ctr_stream_block_cfg.h b/src/bootloader-uart-xmodem/config/btl_aes_ctr_stream_block_cfg.h deleted file mode 100644 index 3c393100..00000000 --- a/src/bootloader-uart-xmodem/config/btl_aes_ctr_stream_block_cfg.h +++ /dev/null @@ -1,44 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header for bootloader aes stream block - ******************************************************************************* - * # License - * Copyright 2023 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_AES_CTR_STREAM_BLOCK_CFG_H -#define BTL_AES_CTR_STREAM_BLOCK_CFG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Enable AES CTR stream block size configuration -// Default: 0 -// Enable AES CTR Stream Block size configuration to change the number of stream blocks that are pre-computed. -#define BOOTLOADER_AES_CTR_STREAM_BLOCK_CFG_ON 0 -// Set the Number of AES CTR Stream Blocks -// Default: 1 -// BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED allows to configure the stream block size that are pre-computed -#define BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED 1 -// - -// <<< end of configuration section >>> - -#if (BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED != 1U) \ - && (BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED != 2U) \ - && (BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED != 4U) \ - && (BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED != 8U) -#error "Recommnded values for BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED value must be 1 or 2 or 4 or 8" -#endif - -#if defined(BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED) -#define SLI_SE_AES_CTR_NUM_BLOCKS_BUFFERED BOOTLOADER_AES_CTR_NUM_BLOCKS_BUFFERED -#endif - -#endif //BTL_AES_CTR_STREAM_BLOCK_CFG_H \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/config/btl_core_cfg.h b/src/bootloader-uart-xmodem/config/btl_core_cfg.h deleted file mode 100644 index c626d884..00000000 --- a/src/bootloader-uart-xmodem/config/btl_core_cfg.h +++ /dev/null @@ -1,139 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header of Bootloader Core for Series 2 devices - ******************************************************************************* - * # 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_CORE_CONFIG_H -#define BTL_CORE_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Bootloader Core Configuration - -// Require signed firmware upgrade files -// Default: 0 -// Require that firmware upgrade files are authenticated using asymmetric signature verification. -#define BOOTLOADER_ENFORCE_SIGNED_UPGRADE 0 - -// Require encrypted firmware upgrade files -// Default: 0 -// Require that firmware upgrade files are encrypted. -#define BOOTLOADER_ENFORCE_ENCRYPTED_UPGRADE 0 - -// Use symmetric key stored in Secure Element storage -// Default: 0 -// Use the symmetric key stored in Secure Element storage for encryption and decryption. -#define BOOTLOADER_USE_SYMMETRIC_KEY_FROM_SE_STORAGE 0 - -// Use symmetric key stored in Application Properties Struct -// Default: 0 -// Use the symmetric key stored in Application Properties Struct for encryption and decryption. -#define BOOTLOADER_USE_SYMMETRIC_KEY_FROM_APP_PROPERTIES 0 - -// Enable secure boot -// Default: 0 -// Enforce signature verification on the application image in internal flash before every boot. -#define BOOTLOADER_ENFORCE_SECURE_BOOT 0 - -// Prevent write/erase of verified application -// Default: 0 -// Lock the application area in flash after the signature verification is passed. This option is only valid if secure boot is -// enabled. If end address of the signature does not touch a page boundary, the remaining flash memory in the page becomes unavailable. -#define APPLICATION_WRITE_DISABLE 0 - -// Enable application rollback protection -// Default: 0 -// Prevent applications from being downgraded. The application version can remain the same for upgrades. The -// bootloader will only allow applications to increment its version x times. Bootloader can be upgraded thenceforth -// to allow applications to increment its version again. This option is not applicable on the devices with Secure -// Element configured to perform full page lock. -#define BOOTLOADER_ROLLBACK_PROTECTION 0 - -// Minimum application version allowed -// Default: 0 -// The minimum version of the applications allowed for boot and upgrade. Prevent applications from being downgraded -// to the version below this. -#define BOOTLOADER_ROLLBACK_PROTECTION_MINIMUM_VERSION 0 -// - -// Enable certificate support -// Default: 0 -// Enforce signature verification on the application image using the certificate of the bootloader image. -// To utilize certificate secure boot authentication, secure Element should be configured to authenticate -// the bootloader image by configuring (certificate based) secure boot option in Secure Element OTP. This -// option will also allow certificate based authentication of the GBL files. -#define BOOTLOADER_SUPPORT_CERTIFICATES 0 - -// Reject direct signed images -// Default: 0 -// On every boot, look for a certificate on application images and only accept the application images with a certificate. -#define BOOTLOADER_REJECT_DIRECT_SIGNED_IMG 0 -// - -// - -// Allow use of public key from manufacturing token storage -// Default: 1 -// Allow use of the public key from the manufacturing token storage for signature verification if the public key is not stored in Secure Element. -#define BOOTLOADER_FALLBACK_LEGACY_KEY 1 - -// Prevent bootloader write/erase -// Default: 0 -// Write lock bootloader area before entering application. The bootloader area in flash will be locked until the next reboot. -// This does not affect bootloader upgrades, but prevents the application running in main flash from disturbing the bootloader. -// On Series-1 devices this is only applicable to devices that use the bootloader area of flash (EFR32xG12 and later). -#define BOOTLOADER_WRITE_DISABLE 0 - -// APPLICATION_VERIFICATION_SKIP_EM4_RST Skip verification of application on EM4 reset -// Default: 0 -// Skip verification of the application when the device wakes up from EM4 sleep. -#define APPLICATION_VERIFICATION_SKIP_EM4_RST 0 - -// Upgrade SE without using the staging area -// Default: 0 -// Applicable to storage bootloaders only. When enabled, the SE upgrade image will be fetched for installation directly from inside the stored GBL file. -// This requires that the SE upgrade GBL tag is unencrypted. -#define BOOTLOADER_SE_UPGRADE_NO_STAGING 0 - -// Base address of bootloader upgrade image -// Default: 0x8000 -// At the upgrade stage of the bootloader, the running main bootloader extracts the upgrade image from the GBL file, -// and stores it in internal flash at the address chosen. The address need to be a multiple of the page size. -#define BTL_UPGRADE_LOCATION_BASE 0x8000UL - -// Bootloader Version Main Customer -// Default: 0 -// Bootloader Version Main Customer -#define BOOTLOADER_VERSION_MAIN_CUSTOMER 2 - -// Use custom Bootloader Application Size -// Default: 0 -#define USE_CUSTOM_APP_SIZE 0 - -// Enter Bootloader App Space Size -// Default: 0 -// Bootloader App Space Size -#define CUSTOM_BTL_APP_SPACE_SIZE 0 -// - -#if USE_CUSTOM_APP_SIZE -#define BTL_APP_SPACE_SIZE CUSTOM_BTL_APP_SPACE_SIZE -#else -#define BTL_APP_SPACE_SIZE (FLASH_BASE + FLASH_SIZE) - BTL_APPLICATION_BASE -#endif - -// - -// <<< end of configuration section >>> - -#endif // BTL_CORE_CONFIG_H \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/config/btl_debug_cfg.h b/src/bootloader-uart-xmodem/config/btl_debug_cfg.h deleted file mode 100644 index a80201d5..00000000 --- a/src/bootloader-uart-xmodem/config/btl_debug_cfg.h +++ /dev/null @@ -1,52 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header for bootloader debug - ******************************************************************************* - * # 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_DEBUG_CONFIG_H -#define BTL_DEBUG_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Bootloader Debug Configuration - -// Debug prints -// Default: 0 -// Print debug messages to SWO. -#ifndef SL_DEBUG_PRINT -/// Print debug message to SWO. -#define SL_DEBUG_PRINT 0 -#endif - -// Debug asserts -// Default: 0 -// Enable assertions in the source code -/// Enable Assert in source code. -#define SL_DEBUG_ASSERT 0 - -// -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_DEBUG -// $[GPIO_SL_DEBUG] -#ifndef SL_DEBUG_PERIPHERAL -#define SL_DEBUG_PERIPHERAL GPIO -#endif - -// [GPIO_SL_DEBUG]$ -// <<< sl:end pin_tool >>> - -#endif // BTL_DEBUG_CONFIG_H diff --git a/src/bootloader-uart-xmodem/config/btl_gpio_activation_cfg.h b/src/bootloader-uart-xmodem/config/btl_gpio_activation_cfg.h deleted file mode 100644 index b85697a1..00000000 --- a/src/bootloader-uart-xmodem/config/btl_gpio_activation_cfg.h +++ /dev/null @@ -1,50 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header for bootloader GPIO Activation - ******************************************************************************* - * # 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_GPIO_ACTIVATION_CONFIG_H -#define BTL_GPIO_ACTIVATION_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Properties of Bootloader Entry - -// Active state -// Low -// High -// Default: LOW -// Enter firmware upgrade mode if GPIO pin has this state -#define SL_GPIO_ACTIVATION_POLARITY LOW - -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BTL_BUTTON - -// $[GPIO_SL_BTL_BUTTON] -#ifndef SL_BTL_BUTTON_PORT -#define SL_BTL_BUTTON_PORT gpioPortB -#endif -#ifndef SL_BTL_BUTTON_PIN -#define SL_BTL_BUTTON_PIN 0 -#endif -// [GPIO_SL_BTL_BUTTON]$ - -// <<< sl:end pin_tool >>> - -#endif // BTL_GPIO_ACTIVATION_CONFIG_H diff --git a/src/bootloader-uart-xmodem/config/btl_uart_driver_cfg.h b/src/bootloader-uart-xmodem/config/btl_uart_driver_cfg.h deleted file mode 100644 index 7f5ab91f..00000000 --- a/src/bootloader-uart-xmodem/config/btl_uart_driver_cfg.h +++ /dev/null @@ -1,108 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header for bootloader Uart Driver - ******************************************************************************* - * # 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_UART_DRIVER_CONFIG_H -#define BTL_UART_DRIVER_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// USART settings - -// Baud rate -// Default: 115200 -#define SL_SERIAL_UART_BAUD_RATE 115200 - -// Hardware flow control -// Default: 0 -#define SL_SERIAL_UART_FLOW_CONTROL 0 -// - -// Receive buffer size -// <0-2048:1> -// Default: 512 [0-2048] -#define SL_DRIVER_UART_RX_BUFFER_SIZE 512 - -// Transmit buffer size -// <0-2048:1> -// Default: 128 [0-2048] -#define SL_DRIVER_UART_TX_BUFFER_SIZE 128 - -// Virtual COM Port -// Default: 0 -#define SL_VCOM_ENABLE 1 -// - -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_SERIAL_UART -// $[USART_SL_SERIAL_UART] -#ifndef SL_SERIAL_UART_PERIPHERAL -#define SL_SERIAL_UART_PERIPHERAL USART0 -#endif -#ifndef SL_SERIAL_UART_PERIPHERAL_NO -#define SL_SERIAL_UART_PERIPHERAL_NO 0 -#endif - -// USART0 TX on PA05 -#ifndef SL_SERIAL_UART_TX_PORT -#define SL_SERIAL_UART_TX_PORT gpioPortA -#endif -#ifndef SL_SERIAL_UART_TX_PIN -#define SL_SERIAL_UART_TX_PIN 5 -#endif - -// USART0 RX on PA06 -#ifndef SL_SERIAL_UART_RX_PORT -#define SL_SERIAL_UART_RX_PORT gpioPortA -#endif -#ifndef SL_SERIAL_UART_RX_PIN -#define SL_SERIAL_UART_RX_PIN 6 -#endif - -// USART0 CTS on PC03 -#ifndef SL_SERIAL_UART_CTS_PORT -#define SL_SERIAL_UART_CTS_PORT gpioPortC -#endif -#ifndef SL_SERIAL_UART_CTS_PIN -#define SL_SERIAL_UART_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef SL_SERIAL_UART_RTS_PORT -#define SL_SERIAL_UART_RTS_PORT gpioPortC -#endif -#ifndef SL_SERIAL_UART_RTS_PIN -#define SL_SERIAL_UART_RTS_PIN 2 -#endif -// [USART_SL_SERIAL_UART]$ - -// SL_VCOM_ENABLE - -// $[GPIO_SL_VCOM_ENABLE] -#ifndef SL_VCOM_ENABLE_PORT -#define SL_VCOM_ENABLE_PORT gpioPortD -#endif -#ifndef SL_VCOM_ENABLE_PIN -#define SL_VCOM_ENABLE_PIN 4 -#endif -// [GPIO_SL_VCOM_ENABLE]$ - -// <<< sl:end pin_tool >>> - -#endif // BTL_UART_DRIVER_CONFIG_H diff --git a/src/bootloader-uart-xmodem/config/btl_xmodem_config.h b/src/bootloader-uart-xmodem/config/btl_xmodem_config.h deleted file mode 100644 index 6306f3e6..00000000 --- a/src/bootloader-uart-xmodem/config/btl_xmodem_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @file btl_xmodem_config.h - * @brief Status Uart Xmodem Functions Configuration - Configuration Template File - ******************************************************************************* - * # 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 >>> - -/********************************************************************************************************* - ********************************************************************************************************* - * MODULE - ******************************************************************************************************** - *******************************************************************************************************/ - -#ifndef BTL_XMODEM_CONFIG_H -#define BTL_XMODEM_CONFIG_H - -// Options: - -/******************************************************************************************************** - ******************************************************************************************************** - * XMODEM UART CONFIGURATION - ********************************************************************************************************* - ********************************************************************************************************/ -// Menu idle timeout (seconds)[0-60] -// <0-60:1> -// Default: 0 -// If the host hasn't initiated communication with the bootloader within this window, -// the bootloader will abort the firmware upgrade process and return to the application. -#define BTL_XMODEM_IDLE_TIMEOUT 0 - - -// - -#endif // End of BTL_XMODEM_CONFIG_H module include. - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/config/emlib_core_debug_config.h b/src/bootloader-uart-xmodem/config/emlib_core_debug_config.h deleted file mode 100644 index e4a01682..00000000 --- a/src/bootloader-uart-xmodem/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/src/bootloader-uart-xmodem/config/pin_config.h b/src/bootloader-uart-xmodem/config/pin_config.h deleted file mode 100644 index 3ddb3667..00000000 --- a/src/bootloader-uart-xmodem/config/pin_config.h +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[CMU] -// [CMU]$ - -// $[LFXO] -// [LFXO]$ - -// $[PRS.ASYNCH0] -// [PRS.ASYNCH0]$ - -// $[PRS.ASYNCH1] -// [PRS.ASYNCH1]$ - -// $[PRS.ASYNCH2] -// [PRS.ASYNCH2]$ - -// $[PRS.ASYNCH3] -// [PRS.ASYNCH3]$ - -// $[PRS.ASYNCH4] -// [PRS.ASYNCH4]$ - -// $[PRS.ASYNCH5] -// [PRS.ASYNCH5]$ - -// $[PRS.ASYNCH6] -// [PRS.ASYNCH6]$ - -// $[PRS.ASYNCH7] -// [PRS.ASYNCH7]$ - -// $[PRS.ASYNCH8] -// [PRS.ASYNCH8]$ - -// $[PRS.ASYNCH9] -// [PRS.ASYNCH9]$ - -// $[PRS.ASYNCH10] -// [PRS.ASYNCH10]$ - -// $[PRS.ASYNCH11] -// [PRS.ASYNCH11]$ - -// $[PRS.SYNCH0] -// [PRS.SYNCH0]$ - -// $[PRS.SYNCH1] -// [PRS.SYNCH1]$ - -// $[PRS.SYNCH2] -// [PRS.SYNCH2]$ - -// $[PRS.SYNCH3] -// [PRS.SYNCH3]$ - -// $[GPIO] -// [GPIO]$ - -// $[TIMER0] -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[TIMER2] -// [TIMER2]$ - -// $[TIMER3] -// [TIMER3]$ - -// $[USART0] -// USART0 CTS on PC03 -#ifndef USART0_CTS_PORT -#define USART0_CTS_PORT gpioPortC -#endif -#ifndef USART0_CTS_PIN -#define USART0_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef USART0_RTS_PORT -#define USART0_RTS_PORT gpioPortC -#endif -#ifndef USART0_RTS_PIN -#define USART0_RTS_PIN 2 -#endif - -// USART0 RX on PA06 -#ifndef USART0_RX_PORT -#define USART0_RX_PORT gpioPortA -#endif -#ifndef USART0_RX_PIN -#define USART0_RX_PIN 6 -#endif - -// USART0 TX on PA05 -#ifndef USART0_TX_PORT -#define USART0_TX_PORT gpioPortA -#endif -#ifndef USART0_TX_PIN -#define USART0_TX_PIN 5 -#endif - -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[I2C1] -// [I2C1]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[IADC0] -// [IADC0]$ - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[I2C0] -// [I2C0]$ - -// $[PTI] -// [PTI]$ - -// $[MODEM] -// [MODEM]$ - -// $[CUSTOM_PIN_NAME] -#ifndef _PORT -#define _PORT gpioPortA -#endif -#ifndef _PIN -#define _PIN 0 -#endif - -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - diff --git a/src/bootloader-uart-xmodem/config/psa_crypto_config.h b/src/bootloader-uart-xmodem/config/psa_crypto_config.h deleted file mode 100644 index a17b0efc..00000000 --- a/src/bootloader-uart-xmodem/config/psa_crypto_config.h +++ /dev/null @@ -1,170 +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 - -// - -// Power optimization configuration - -// Store already-generated random bytes before putting the device to sleep -// Using the hardware TRNG (for example through psa_generate_random()) will -// consume a non-negligible amount of power. A start-up routine must pass -// and a relatively large minimum amount of random bytes will be generated. -// Use cases where the device is frequently entering EM2/EM3 and thereafter -// consumes a small amount of data from the TRNG may benefit from buffering -// the existing random bytes before putting the device to sleep. These -// buffered bytes are then consumed until exhaustion before the TRNG needs -// to be initialized and used again. -// -// NOTE: this configuration option is only applicable for devices with a -// Virtual Secure Engine (VSE), and requires the 'Power Manager' component -// to be included in the project. -// -// Default: 0 -#define SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP (0) - -// Number of random words to buffer before putting the device to sleep <1-63> -// This option can be used to decrease the amount of random words that -// (if enabled) are buffered before the device enters EM2/EM3. Lowering this -// number will result in less static RAM usage, but also means that the TRNG -// potentially has to be initialized more times--leading to increased power -// consumption. By default this option in configured to buffer as much TRNG -// data as possible (limited by the depth of the TRNG FIFO). -// -// NOTE: this configuration option is only applicable when -// SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP is enabled. -// -// Default: 63 -#define SL_VSE_MAX_TRNG_WORDS_BUFFERED_DURING_SLEEP (63) -// - -// - -// <<< 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/src/bootloader-uart-xmodem/config/sl_fault_injection_hardening_cfg.h b/src/bootloader-uart-xmodem/config/sl_fault_injection_hardening_cfg.h deleted file mode 100644 index 3cde4e05..00000000 --- a/src/bootloader-uart-xmodem/config/sl_fault_injection_hardening_cfg.h +++ /dev/null @@ -1,107 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Configuration header of Fault Injection Hardening Library - ******************************************************************************* - * # License - * Copyright 2023 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 FAULT_INJECTION_HARDENING_CFG_H -#define FAULT_INJECTION_HARDENING_CFG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Fault Injection Profile Configuration - -// Enable TFM Fault Injection Hardening Profile -// Default: 0 -// Enforce TFM Fault Injection Hardening Profile ON in the firmware -// TZ bootloader applies the FI hardening to critical bootloader functions. -// TZ Secure Key Library initialisation applies FI hardening to secure that the TZ configuration is securely setup before jumping to the NonSecure application -#define SL_TFM_FIH_PROFILE_ON 0 - -#if defined(SL_TFM_FIH_PROFILE_ON) && (SL_TFM_FIH_PROFILE_ON == 1) -#define TFM_FIH_PROFILE_ON -#endif - -// TFM Fault Injection Hardening Profile as Low. -// Default: 0 -// enabled. Configures the TFM Fault Injection Hardening profile as low. -// Includes FIH_ENABLE_GLOBAL_FAIL (hardens the mitigations against the loop) -// Includes FIH_ENABLE_CFI (Control Flow Integrity) creates a global counter that is -// incremented before every FIH_CALL of vulnerable functions. On the function -// return the counter is decremented, and after the return it is verified that -// the counter has the same value as before this process. -#define SL_TFM_FIH_PROFILE_LOW 0 - -#if defined(SL_TFM_FIH_PROFILE_LOW) && (SL_TFM_FIH_PROFILE_LOW == 1) -#define TFM_FIH_PROFILE_LOW -#endif - -// TFM Fault Injection Hardening Profile as Medium. -// Default: 0 -// enabled. Configures the TFM Fault Injection Hardening profile as medium. -// Includes FIH_ENABLE_DOUBLE_VARS makes critical variables into a tuple (x, x ^ msk). -// Then the correctness of x can be checked by XORing the two tuple values together. -// This also means that comparisons between fih_ints can be verified -// by doing x == y && x_msk == y_msk. -// Includes FIH_ENABLE_GLOBAL_FAIL (hardens the mitigations against the loop) -// Includes FIH_ENABLE_CFI (Control Flow Integrity) creates a global counter that is -// incremented before every FIH_CALL of vulnerable functions. On the function -// return the counter is decremented, and after the return it is verified that -// the counter has the same value as before this process. -#define SL_TFM_FIH_PROFILE_MEDIUM 0 - -#if defined(SL_TFM_FIH_PROFILE_MEDIUM) && (SL_TFM_FIH_PROFILE_MEDIUM == 1) -#define TFM_FIH_PROFILE_MEDIUM -#endif - -// TFM Fault Injection Hardening Profile as High. -// Default: 0 -// enabled. Configures the TFM Fault Injection Hardening profile as high. -// Includes FIH_ENABLE_DELAY causes random delays. This makes it hard to cause faults precisely -// Includes FIH_ENABLE_DOUBLE_VARS makes critical variables into a tuple (x, x ^ msk). -// Then the correctness of x can be checked by XORing the two tuple values together. -// This also means that comparisons between fih_ints can be verified -// by doing x == y && x_msk == y_msk. -// Includes FIH_ENABLE_GLOBAL_FAIL (hardens the mitigations against the loop) -// Includes FIH_ENABLE_CFI (Control Flow Integrity) creates a global counter that is -// incremented before every FIH_CALL of vulnerable functions. On the function -// return the counter is decremented, and after the return it is verified that -// the counter has the same value as before this process. -#define SL_TFM_FIH_PROFILE_HIGH 0 - -#if defined(SL_TFM_FIH_PROFILE_HIGH) && (SL_TFM_FIH_PROFILE_HIGH == 1) -#define TFM_FIH_PROFILE_HIGH -#endif - -// - -// - -// <<< end of configuration section >>> -#if defined(TFM_FIH_PROFILE_ON) - #if (defined(TFM_FIH_PROFILE_LOW) && defined(TFM_FIH_PROFILE_MEDIUM) && defined(TFM_FIH_PROFILE_HIGH)) - #error "Choose either TFM fault injection hardening profile as LOW or Medium or High" - #endif // TFM_FIH_PROFILE_LOW && TFM_FIH_PROFILE_MEDIUM && TFM_FIH_PROFILE_HIGH - - #if (defined(TFM_FIH_PROFILE_LOW) && !defined(TFM_FIH_PROFILE_MEDIUM) && defined(TFM_FIH_PROFILE_HIGH)) - #error "Choose either TFM fault injection hardening profile as LOW or Medium or High" - #endif // TFM_FIH_PROFILE_LOW && !TFM_FIH_PROFILE_MEDIUM && TFM_FIH_PROFILE_HIGH - - #if (defined(TFM_FIH_PROFILE_LOW) && defined(TFM_FIH_PROFILE_MEDIUM) && !defined(TFM_FIH_PROFILE_HIGH)) - #error "Choose either TFM fault injection hardening profile as LOW or Medium or High" - #endif // TFM_FIH_PROFILE_LOW && TFM_FIH_PROFILE_MEDIUM && !TFM_FIH_PROFILE_HIGH - - #if (!defined(TFM_FIH_PROFILE_LOW) && defined(TFM_FIH_PROFILE_MEDIUM) && defined(TFM_FIH_PROFILE_HIGH)) - #error "Choose either TFM fault injection hardening profile as LOW or Medium or High" - #endif // !TFM_FIH_PROFILE_LOW && TFM_FIH_PROFILE_MEDIUM && TFM_FIH_PROFILE_HIGH -#endif // TFM_FIH_PROFILE_ON -#endif // FAULT_INJECTION_HARDENING_CFG_H \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/config/sl_mbedtls_config.h b/src/bootloader-uart-xmodem/config/sl_mbedtls_config.h deleted file mode 100644 index 5ebefc9a..00000000 --- a/src/bootloader-uart-xmodem/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/src/bootloader-uart-xmodem/config/sl_mbedtls_device_config.h b/src/bootloader-uart-xmodem/config/sl_mbedtls_device_config.h deleted file mode 100644 index e286a0d9..00000000 --- a/src/bootloader-uart-xmodem/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 \ No newline at end of file diff --git a/src/bootloader-uart-xmodem/config/sl_memory_config.h b/src/bootloader-uart-xmodem/config/sl_memory_config.h deleted file mode 100644 index b43ebcba..00000000 --- a/src/bootloader-uart-xmodem/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/src/bootloader-uart-xmodem/gbl_metadata.yaml b/src/bootloader-uart-xmodem/gbl_metadata.yaml deleted file mode 100644 index 45dc570c..00000000 --- a/src/bootloader-uart-xmodem/gbl_metadata.yaml +++ /dev/null @@ -1,3 +0,0 @@ -baudrate: 115200 -dynamic: [gecko_bootloader_version] -fw_type: gecko-bootloader diff --git a/src/bootloader-uart-xmodem/readme.md b/src/bootloader-uart-xmodem/readme.md deleted file mode 100644 index d6ed442a..00000000 --- a/src/bootloader-uart-xmodem/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# UART XMODEM Bootloader - -Standalone Bootloader using XMODEM-CRC over UART. The bootloader shows a menu, where an XMODEM transfer can be started by sending ASCII '1', or the application can be started by sending ASCII '2'. This is the recommended UART bootloader for the EmberZNet and Connect protocol stacks. diff --git a/src/bootloader/bootloader.slcp b/src/bootloader/bootloader.slcp new file mode 100644 index 00000000..768197bd --- /dev/null +++ b/src/bootloader/bootloader.slcp @@ -0,0 +1,35 @@ +project_name: bootloader +package: bootloader +quality: production +label: Bootloader +description: Gecko bootloader with XMODEM-CRC transfer over UART. + +category: Example|Bootloader +filter: + - name: "Device Type" + value: ["NCP"] + - name: "Project Difficulty" + value: ["Advanced"] + - name: "MCU" + value: ["Bootloader"] + + +component: + - id: bootloader_core + - id: bootloader_crc + - id: bootloader_aes_sha_ecdsa + - id: bootloader_delay_driver + - id: bootloader_gpio_activation + - id: bootloader_image_parser + - id: bootloader_token_management + - id: bootloader_serial_driver + - id: bootloader_xmodem_parser + - id: bootloader_uart_xmodem + - id: bootloader_debug + +configuration: + - name: SL_VCOM_ENABLE + value: 1 + +post_build: + profile: bootloader_series_2 \ No newline at end of file diff --git a/src/ncp-uart-hw/.cproject b/src/ncp-uart-hw/.cproject deleted file mode 100644 index a56c4b0b..00000000 --- a/src/ncp-uart-hw/.cproject +++ /dev/null @@ -1,3171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ncp-uart-hw/config/SEGGER_RTT_Conf.h b/src/ncp-uart-hw/config/SEGGER_RTT_Conf.h deleted file mode 100644 index 78a5a062..00000000 --- a/src/ncp-uart-hw/config/SEGGER_RTT_Conf.h +++ /dev/null @@ -1,428 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH * -* The Embedded Experts * -********************************************************************** -* * -* (c) 1995 - 2023 SEGGER Microcontroller GmbH * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** -* * -* SEGGER SystemView * Real-time application analysis * -* * -********************************************************************** -* * -* All rights reserved. * -* * -* SEGGER strongly recommends to not make any changes * -* to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * -* * -* Redistribution and use in source and binary forms, with or * -* without modification, are permitted provided that the following * -* condition is met: * -* * -* o Redistributions of source code must retain the above copyright * -* notice, this condition and the following disclaimer. * -* * -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * -* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -* DAMAGE. * -* * -********************************************************************** -* * -* SystemView version: 3.52 * -* * -********************************************************************** ----------------------------END-OF-HEADER------------------------------ -File : SEGGER_RTT_Conf.h -Purpose : Implementation of SEGGER real-time transfer (RTT) which - allows real-time communication on targets which support - debugger memory accesses while the CPU is running. -Revision: $Rev: 24316 $ - -*/ - -#ifndef SEGGER_RTT_CONF_H -#define SEGGER_RTT_CONF_H - -#ifdef __IAR_SYSTEMS_ICC__ - #include -#endif - -/********************************************************************* -* -* Defines, configurable -* -********************************************************************** -*/ - -// -// Take in and set to correct values for Cortex-A systems with CPU cache -// -//#define SEGGER_RTT_CPU_CACHE_LINE_SIZE (32) // Largest cache line size (in bytes) in the current system -//#define SEGGER_RTT_UNCACHED_OFF (0xFB000000) // Address alias where RTT CB and buffers can be accessed uncached -// -// Most common case: -// Up-channel 0: RTT -// Up-channel 1: SystemView -// -#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS - #define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3) -#endif -// -// Most common case: -// Down-channel 0: RTT -// Down-channel 1: SystemView -// -#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS - #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3) -#endif - -#ifndef BUFFER_SIZE_UP - #define BUFFER_SIZE_UP (1024) // Size of the buffer for terminal output of target, up to host (Default: 1k) -#endif - -#ifndef BUFFER_SIZE_DOWN - #define BUFFER_SIZE_DOWN (1024) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16) -#endif - -#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE - #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64) -#endif - -#ifndef SEGGER_RTT_MODE_DEFAULT - #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0) -#endif - -/********************************************************************* -* -* RTT memcpy configuration -* -* memcpy() is good for large amounts of data, -* but the overhead is big for small amounts, which are usually stored via RTT. -* With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead. -* -* SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions. -* This is may be required with memory access restrictions, -* such as on Cortex-A devices with MMU. -*/ -#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP - #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop -#endif -// -// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets -// -//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__)) -// #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) SEGGER_memcpy((pDest), (pSrc), (NumBytes)) -//#endif - -// -// Target is not allowed to perform other RTT operations while string still has not been stored completely. -// Otherwise we would probably end up with a mixed string in the buffer. -// If using RTT from within interrupts, multiple tasks or multi processors, define the SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() function here. -// -// SEGGER_RTT_MAX_INTERRUPT_PRIORITY can be used in the sample lock routines on Cortex-M3/4. -// Make sure to mask all interrupts which can send RTT data, i.e. generate SystemView events, or cause task switches. -// When high-priority interrupts must not be masked while sending RTT data, SEGGER_RTT_MAX_INTERRUPT_PRIORITY needs to be adjusted accordingly. -// (Higher priority = lower priority number) -// Default value for embOS: 128u -// Default configuration in FreeRTOS: configMAX_SYSCALL_INTERRUPT_PRIORITY: ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) -// In case of doubt mask all interrupts: 1 << (8 - BASEPRI_PRIO_BITS) i.e. 1 << 5 when 3 bits are implemented in NVIC -// or define SEGGER_RTT_LOCK() to completely disable interrupts. -// -#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20) -#endif - -/********************************************************************* -* -* RTT lock configuration for SEGGER Embedded Studio, -* Rowley CrossStudio and GCC -*/ -#if ((defined(__SES_ARM) || defined(__SES_RISCV) || defined(__CROSSWORKS_ARM) || defined(__GNUC__) || defined(__clang__)) && !defined (__CC_ARM) && !defined(WIN32)) - #if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__)) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - __asm volatile ("mrs %0, primask \n\t" \ - "movs r1, #1 \n\t" \ - "msr primask, r1 \n\t" \ - : "=r" (_SEGGER_RTT__LockState) \ - : \ - : "r1", "cc" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("msr primask, %0 \n\t" \ - : \ - : "r" (_SEGGER_RTT__LockState) \ - : \ - ); \ - } - #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - __asm volatile ("mrs %0, basepri \n\t" \ - "mov r1, %1 \n\t" \ - "msr basepri, r1 \n\t" \ - : "=r" (_SEGGER_RTT__LockState) \ - : "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY) \ - : "r1", "cc" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("msr basepri, %0 \n\t" \ - : \ - : "r" (_SEGGER_RTT__LockState) \ - : \ - ); \ - } - - #elif (defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__)) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - __asm volatile ("mrs r1, CPSR \n\t" \ - "mov %0, r1 \n\t" \ - "orr r1, r1, #0xC0 \n\t" \ - "msr CPSR_c, r1 \n\t" \ - : "=r" (_SEGGER_RTT__LockState) \ - : \ - : "r1", "cc" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ - "mrs r1, CPSR \n\t" \ - "bic r1, r1, #0xC0 \n\t" \ - "and r0, r0, #0xC0 \n\t" \ - "orr r1, r1, r0 \n\t" \ - "msr CPSR_c, r1 \n\t" \ - : \ - : "r" (_SEGGER_RTT__LockState) \ - : "r0", "r1", "cc" \ - ); \ - } - #elif defined(__riscv) || defined(__riscv_xlen) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - __asm volatile ("csrr %0, mstatus \n\t" \ - "csrci mstatus, 8 \n\t" \ - "andi %0, %0, 8 \n\t" \ - : "=r" (_SEGGER_RTT__LockState) \ - : \ - : \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("csrr a1, mstatus \n\t" \ - "or %0, %0, a1 \n\t" \ - "csrs mstatus, %0 \n\t" \ - : \ - : "r" (_SEGGER_RTT__LockState) \ - : "a1" \ - ); \ - } - #else - #define SEGGER_RTT_LOCK() - #define SEGGER_RTT_UNLOCK() - #endif -#endif - -/********************************************************************* -* -* RTT lock configuration for IAR EWARM -*/ -#ifdef __ICCARM__ - #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) || \ - (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = __get_PRIMASK(); \ - __set_PRIMASK(1); - - #define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \ - } - #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || \ - (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) || \ - (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) || \ - (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = __get_BASEPRI(); \ - __set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); - - #define SEGGER_RTT_UNLOCK() __set_BASEPRI(_SEGGER_RTT__LockState); \ - } - #elif (defined (__ARM7A__) && (__CORE__ == __ARM7A__)) || \ - (defined (__ARM7R__) && (__CORE__ == __ARM7R__)) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - __asm volatile ("mrs r1, CPSR \n\t" \ - "mov %0, r1 \n\t" \ - "orr r1, r1, #0xC0 \n\t" \ - "msr CPSR_c, r1 \n\t" \ - : "=r" (_SEGGER_RTT__LockState) \ - : \ - : "r1", "cc" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ - "mrs r1, CPSR \n\t" \ - "bic r1, r1, #0xC0 \n\t" \ - "and r0, r0, #0xC0 \n\t" \ - "orr r1, r1, r0 \n\t" \ - "msr CPSR_c, r1 \n\t" \ - : \ - : "r" (_SEGGER_RTT__LockState) \ - : "r0", "r1", "cc" \ - ); \ - } - #endif -#endif - -/********************************************************************* -* -* RTT lock configuration for IAR RX -*/ -#ifdef __ICCRX__ - #define SEGGER_RTT_LOCK() { \ - unsigned long _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = __get_interrupt_state(); \ - __disable_interrupt(); - - #define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \ - } -#endif - -/********************************************************************* -* -* RTT lock configuration for IAR RL78 -*/ -#ifdef __ICCRL78__ - #define SEGGER_RTT_LOCK() { \ - __istate_t _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = __get_interrupt_state(); \ - __disable_interrupt(); - - #define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \ - } -#endif - -/********************************************************************* -* -* RTT lock configuration for KEIL ARM -*/ -#ifdef __CC_ARM - #if (defined __TARGET_ARCH_6S_M) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - register unsigned char _SEGGER_RTT__PRIMASK __asm( "primask"); \ - _SEGGER_RTT__LockState = _SEGGER_RTT__PRIMASK; \ - _SEGGER_RTT__PRIMASK = 1u; \ - __schedule_barrier(); - - #define SEGGER_RTT_UNLOCK() _SEGGER_RTT__PRIMASK = _SEGGER_RTT__LockState; \ - __schedule_barrier(); \ - } - #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - register unsigned char BASEPRI __asm( "basepri"); \ - _SEGGER_RTT__LockState = BASEPRI; \ - BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY; \ - __schedule_barrier(); - - #define SEGGER_RTT_UNLOCK() BASEPRI = _SEGGER_RTT__LockState; \ - __schedule_barrier(); \ - } - #endif -#endif - -/********************************************************************* -* -* RTT lock configuration for TI ARM -*/ -#ifdef __TI_ARM__ - #if defined (__TI_ARM_V6M0__) - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = __get_PRIMASK(); \ - __set_PRIMASK(1); - - #define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \ - } - #elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); - - #define SEGGER_RTT_UNLOCK() _set_interrupt_priority(_SEGGER_RTT__LockState); \ - } - #endif -#endif - -/********************************************************************* -* -* RTT lock configuration for CCRX -*/ -#ifdef __RX - #include - #define SEGGER_RTT_LOCK() { \ - unsigned long _SEGGER_RTT__LockState; \ - _SEGGER_RTT__LockState = get_psw() & 0x010000; \ - clrpsw_i(); - - #define SEGGER_RTT_UNLOCK() set_psw(get_psw() | _SEGGER_RTT__LockState); \ - } -#endif - -/********************************************************************* -* -* RTT lock configuration for embOS Simulation on Windows -* (Can also be used for generic RTT locking with embOS) -*/ -#if defined(WIN32) || defined(SEGGER_RTT_LOCK_EMBOS) - -void OS_SIM_EnterCriticalSection(void); -void OS_SIM_LeaveCriticalSection(void); - -#define SEGGER_RTT_LOCK() { \ - OS_SIM_EnterCriticalSection(); - -#define SEGGER_RTT_UNLOCK() OS_SIM_LeaveCriticalSection(); \ - } -#endif - -/********************************************************************* -* -* RTT lock configuration fallback -*/ -#ifndef SEGGER_RTT_LOCK - #define SEGGER_RTT_LOCK() // Lock RTT (nestable) (i.e. disable interrupts) -#endif - -#ifndef SEGGER_RTT_UNLOCK - #define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) -#endif - -#endif -/*************************** End of file ****************************/ \ No newline at end of file diff --git a/src/ncp-uart-hw/config/app_properties_config.h b/src/ncp-uart-hw/config/app_properties_config.h deleted file mode 100644 index 6951a569..00000000 --- a/src/ncp-uart-hw/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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/btl_interface_cfg.h b/src/ncp-uart-hw/config/btl_interface_cfg.h deleted file mode 100644 index 13e09116..00000000 --- a/src/ncp-uart-hw/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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/btl_interface_cfg_s2c1.h b/src/ncp-uart-hw/config/btl_interface_cfg_s2c1.h deleted file mode 100644 index 7f703143..00000000 --- a/src/ncp-uart-hw/config/btl_interface_cfg_s2c1.h +++ /dev/null @@ -1,281 +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_S2C1_H -#define BTL_INTERFACE_CFG_S2C1_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Bootloader Interface Trust Zone Security State Configuration - -// Disable multi tiered fallback logic -// The fault handling logic as well as the USART auto-detection logic will be disabled. -// The re-configuration of SMU will be handled by querying the running bootloader -// for the peripheral list. Querying the peripheral list is supported from the bootloader -// version 2.0.0. Check for the BOOTLOADER_CAPABILITY_PERIPHERAL_LIST capability to -// see if the running bootloader supports querying the peripheral list. -#define BOOTLOADER_DISABLE_OLD_BOOTLOADER_MITIGATION 0 - -// Disable peripheral access fault handling -// The fault handling triggered by an erroneous access of peripherals will be disabled. -// -// This should be disabled iff all the peripherals that are in use by the bootloader -// have been properly configured by the "Manually override security state of peripherals" option. -#define BOOTLOADER_DISABLE_NVM3_FAULT_HANDLING 0 - -// Manually override the security state of peripherals in use by the bootloader -// Default: 0. -// Manually override the security state of peripherals. Choose the peripherals touched -// by the customized code to have a valid secure access state before interacting with the bootloader -// In practice, this means that the chosen peripherals will be available at the secure address, -// which is accessible by the bootloader. Once the application is entered back the secure access state -// is changed back to the original state. -// -// The USART auto-detection logic that detects which, if any, USART is in use by the bootloader -// will be disabled. Make sure to choose the correct USART used by the bootloader. -#define BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE 0 -// EMU -// Update secure access state of EMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_EMU 0 - -// CMU -// Update secure access state of CMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_CMU 0 - -// HFXO0 -// Update secure access state of HFXO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFXO0 0 - -// HFRCO0 -// Update secure access state of HFRCO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFRCO0 0 - -// FSRCO -// Update secure access state of FSRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_FSRCO 0 - -// DPLL0 -// Update secure access state of DPLL0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_DPLL0 0 - -// LFXO -// Update secure access state of LFXO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFXO 0 - -// LFRCO -// Update secure access state of LFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFRCO 0 - -// ULFRCO -// Update secure access state of ULFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_ULFRCO 0 - -// MSC -// Update secure access state of MSC before calling into bootloader -#define BOOTLOADER_PPUSATD0_MSC 0 - -// ICACHE0 -// Update secure access state of ICACHE0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_ICACHE0 0 - -// PRS -// Update secure access state of PRS before calling into bootloader -#define BOOTLOADER_PPUSATD0_PRS 0 - -// GPIO -// Update secure access state of GPIO before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPIO 0 - -// LDMA -// Update secure access state of LDMA before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMA 0 - -// LDMAXBAR -// Update secure access state of LDMAXBAR before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMAXBAR 0 - -// TIMER0 -// Update secure access state of TIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER0 0 - -// TIMER1 -// Update secure access state of TIMER1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER1 0 - -// TIMER2 -// Update secure access state of TIMER2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER2 0 - -// TIMER3 -// Update secure access state of TIMER3 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER3 0 - -// USART0 -// Update secure access state of USART0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART0 0 - -// USART1 -// Update secure access state of USART1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART1 0 - -// USART2 -// Update secure access state of USART2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART2 0 - -// BURTC -// Update secure access state of BURTC before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURTC 0 - -// I2C1 -// Update secure access state of I2C1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_I2C1 0 - -// CHIPTESTCTRL -// Update secure access state of CHIPTESTCTRL before calling into bootloader -#define BOOTLOADER_PPUSATD0_CHIPTESTCTRL 0 - -// LVGD -// Update secure access state of LVGD before calling into bootloader -#define BOOTLOADER_PPUSATD0_LVGD 0 - -// SYSCFG -// Update secure access state of SYSCFG before calling into bootloader -#define BOOTLOADER_PPUSATD0_SYSCFG 0 - -// BURAM -// Update secure access state of BURAM before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURAM 0 - -// IFADCDEBUG -// Update secure access state of IFADCDEBUG before calling into bootloader -#define BOOTLOADER_PPUSATD0_IFADCDEBUG 0 - -// GPCRC -// Update secure access state of GPCRC before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPCRC 0 - -// RTCC -// Update secure access state of RTCC before calling into bootloader -#define BOOTLOADER_PPUSATD0_RTCC 0 - -// LETIMER0 -// Update secure access state of LETIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_LETIMER0 0 - -// IADC0 -// Update secure access state of IADC0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_IADC0 0 - -// ACMP0 -// Update secure access state of ACMP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP0 0 - -// ACMP1 -// Update secure access state of ACMP1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP1 0 - -// I2C0 -// Update secure access state of I2C0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_I2C0 0 - -// HFRCOEM23 -// Update secure access state of HFRCOEM23 before calling into bootloader -#define BOOTLOADER_PPUSATD1_HFRCOEM23 0 - -// WDOG0 -// Update secure access state of WDOG0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG0 0 - -// WDOG1 -// Update secure access state of WDOG1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG1 0 - -// AMUXCP0 -// Update secure access state of AMUXCP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_AMUXCP0 0 - -// RADIOAES -// Update secure access state of RADIOAES before calling into bootloader -#define BOOTLOADER_PPUSATD1_RADIOAES 0 - -// BUFC -// Update secure access state of BUFC before calling into bootloader -#define BOOTLOADER_PPUSATD1_BUFC 0 - -// SMU -// Update secure access state of SMU before calling into bootloader -#define BOOTLOADER_PPUSATD1_SMU 0 - -// AHBRADIO -// Update secure access state of AHBRADIO before calling into bootloader -#define BOOTLOADER_PPUSATD1_AHBRADIO 0 - -// SEMAILBOX -// Update secure access state of SEMAILBOX before calling into bootloader -#define BOOTLOADER_PPUSATD1_SEMAILBOX 0 -// - -// -// <<< end of configuration section >>> - -#if BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE == 1 -#define BOOTLOADER_PPUSATD0_MASK ((BOOTLOADER_PPUSATD0_EMU << _SMU_PPUSATD0_EMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CMU << _SMU_PPUSATD0_CMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFXO0 << _SMU_PPUSATD0_HFXO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFRCO0 << _SMU_PPUSATD0_HFRCO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_FSRCO << _SMU_PPUSATD0_FSRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_DPLL0 << _SMU_PPUSATD0_DPLL0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFXO << _SMU_PPUSATD0_LFXO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFRCO << _SMU_PPUSATD0_LFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ULFRCO << _SMU_PPUSATD0_ULFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_MSC << _SMU_PPUSATD0_MSC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ICACHE0 << _SMU_PPUSATD0_ICACHE0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_PRS << _SMU_PPUSATD0_PRS_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPIO << _SMU_PPUSATD0_GPIO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMA << _SMU_PPUSATD0_LDMA_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMAXBAR << _SMU_PPUSATD0_LDMAXBAR_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER0 << _SMU_PPUSATD0_TIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER1 << _SMU_PPUSATD0_TIMER1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER2 << _SMU_PPUSATD0_TIMER2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER3 << _SMU_PPUSATD0_TIMER3_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART0 << _SMU_PPUSATD0_USART0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART1 << _SMU_PPUSATD0_USART1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART2 << _SMU_PPUSATD0_USART2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURTC << _SMU_PPUSATD0_BURTC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_I2C1 << _SMU_PPUSATD0_I2C1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CHIPTESTCTRL << _SMU_PPUSATD0_CHIPTESTCTRL_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LVGD << _SMU_PPUSATD0_LVGD_SHIFT) \ - | (BOOTLOADER_PPUSATD0_SYSCFG << _SMU_PPUSATD0_SYSCFG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURAM << _SMU_PPUSATD0_BURAM_SHIFT) \ - | (BOOTLOADER_PPUSATD0_IFADCDEBUG << _SMU_PPUSATD0_IFADCDEBUG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPCRC << _SMU_PPUSATD0_GPCRC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_RTCC << _SMU_PPUSATD0_RTCC_SHIFT)) -#define BOOTLOADER_PPUSATD1_MASK ((BOOTLOADER_PPUSATD1_LETIMER0 << _SMU_PPUSATD1_LETIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_IADC0 << _SMU_PPUSATD1_IADC0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP0 << _SMU_PPUSATD1_ACMP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP1 << _SMU_PPUSATD1_ACMP1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_I2C0 << _SMU_PPUSATD1_I2C0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_HFRCOEM23 << _SMU_PPUSATD1_HFRCOEM23_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG0 << _SMU_PPUSATD1_WDOG0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG1 << _SMU_PPUSATD1_WDOG1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AMUXCP0 << _SMU_PPUSATD1_AMUXCP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_RADIOAES << _SMU_PPUSATD1_RADIOAES_SHIFT) \ - | (BOOTLOADER_PPUSATD1_BUFC << _SMU_PPUSATD1_BUFC_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SMU << _SMU_PPUSATD1_SMU_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AHBRADIO << _SMU_PPUSATD1_AHBRADIO_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SEMAILBOX << _SMU_PPUSATD1_SEMAILBOX_SHIFT)) -#endif // BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE - -#endif // BTL_INTERFACE_CFG_S2C1_H \ No newline at end of file diff --git a/src/ncp-uart-hw/config/dmadrv_config.h b/src/ncp-uart-hw/config/dmadrv_config.h deleted file mode 100644 index be24f49d..00000000 --- a/src/ncp-uart-hw/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-15> -// Priority of the DMA interrupt. Smaller number equals higher priority. -// Default: 8 -#define EMDRV_DMADRV_DMA_IRQ_PRIORITY 8 - -// 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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/emlib_core_debug_config.h b/src/ncp-uart-hw/config/emlib_core_debug_config.h deleted file mode 100644 index e4a01682..00000000 --- a/src/ncp-uart-hw/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/src/ncp-uart-hw/config/legacy_common_ash_config.h b/src/ncp-uart-hw/config/legacy_common_ash_config.h deleted file mode 100644 index fe9ffaf4..00000000 --- a/src/ncp-uart-hw/config/legacy_common_ash_config.h +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Legacy Host ASH 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_NCP_ASH_CONFIG_H -#define LEGACY_NCP_ASH_CONFIG_H - -// The USART used for ASH communications in COM_Port_t format, as defined in platform/service/legacy_hal/inc/serial.h (see defined names for USART ports) <-1..3:1> -// Default: (-1) -// The default value of -1 causes the ASH code to try to use the USART assigned to the "VCOM" instance of SL_IOSTREAM_USART. Otherwise the value is passed to Legacy HAL, which attempts to find an instance of SL_IOSTREAM_USART which uses that USART. -#define LEGACY_NCP_ASH_SERIAL_PORT (-1) - -#endif /* LEGACY_NCP_ASH_CONFIG_H */ - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/legacy_hal_config.h b/src/ncp-uart-hw/config/legacy_hal_config.h deleted file mode 100644 index a6d18138..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/nvm3_default_config.h b/src/ncp-uart-hw/config/nvm3_default_config.h deleted file mode 100644 index df85ba9e..00000000 --- a/src/ncp-uart-hw/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: 40960 -#define NVM3_DEFAULT_NVM_SIZE 32768 -#endif - -// - -// <<< end of configuration section >>> - -#endif // NVM3_DEFAULT_CONFIG_H \ No newline at end of file diff --git a/src/ncp-uart-hw/config/pin_config.h b/src/ncp-uart-hw/config/pin_config.h deleted file mode 100644 index 552874a5..00000000 --- a/src/ncp-uart-hw/config/pin_config.h +++ /dev/null @@ -1,189 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[CMU] -// [CMU]$ - -// $[LFXO] -// LFXO LFXTAL_I on PD01 -#ifndef LFXO_LFXTAL_I_PORT -#define LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_I_PIN -#define LFXO_LFXTAL_I_PIN 1 -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef LFXO_LFXTAL_O_PORT -#define LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_O_PIN -#define LFXO_LFXTAL_O_PIN 0 -#endif - -// [LFXO]$ - -// $[PRS.ASYNCH0] -// [PRS.ASYNCH0]$ - -// $[PRS.ASYNCH1] -// [PRS.ASYNCH1]$ - -// $[PRS.ASYNCH2] -// [PRS.ASYNCH2]$ - -// $[PRS.ASYNCH3] -// [PRS.ASYNCH3]$ - -// $[PRS.ASYNCH4] -// [PRS.ASYNCH4]$ - -// $[PRS.ASYNCH5] -// [PRS.ASYNCH5]$ - -// $[PRS.ASYNCH6] -// [PRS.ASYNCH6]$ - -// $[PRS.ASYNCH7] -// [PRS.ASYNCH7]$ - -// $[PRS.ASYNCH8] -// [PRS.ASYNCH8]$ - -// $[PRS.ASYNCH9] -// [PRS.ASYNCH9]$ - -// $[PRS.ASYNCH10] -// [PRS.ASYNCH10]$ - -// $[PRS.ASYNCH11] -// [PRS.ASYNCH11]$ - -// $[PRS.SYNCH0] -// [PRS.SYNCH0]$ - -// $[PRS.SYNCH1] -// [PRS.SYNCH1]$ - -// $[PRS.SYNCH2] -// [PRS.SYNCH2]$ - -// $[PRS.SYNCH3] -// [PRS.SYNCH3]$ - -// $[GPIO] -// GPIO SWV on PA03 -#ifndef GPIO_SWV_PORT -#define GPIO_SWV_PORT gpioPortA -#endif -#ifndef GPIO_SWV_PIN -#define GPIO_SWV_PIN 3 -#endif - -// [GPIO]$ - -// $[TIMER0] -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[TIMER2] -// [TIMER2]$ - -// $[TIMER3] -// [TIMER3]$ - -// $[USART0] -// USART0 CTS on PC03 -#ifndef USART0_CTS_PORT -#define USART0_CTS_PORT gpioPortC -#endif -#ifndef USART0_CTS_PIN -#define USART0_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef USART0_RTS_PORT -#define USART0_RTS_PORT gpioPortC -#endif -#ifndef USART0_RTS_PIN -#define USART0_RTS_PIN 2 -#endif - -// USART0 RX on PA06 -#ifndef USART0_RX_PORT -#define USART0_RX_PORT gpioPortA -#endif -#ifndef USART0_RX_PIN -#define USART0_RX_PIN 6 -#endif - -// USART0 TX on PA05 -#ifndef USART0_TX_PORT -#define USART0_TX_PORT gpioPortA -#endif -#ifndef USART0_TX_PIN -#define USART0_TX_PIN 5 -#endif - -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[I2C1] -// [I2C1]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[IADC0] -// [IADC0]$ - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[I2C0] -// [I2C0]$ - -// $[PTI] -// PTI DFRAME on PC05 -#ifndef PTI_DFRAME_PORT -#define PTI_DFRAME_PORT gpioPortC -#endif -#ifndef PTI_DFRAME_PIN -#define PTI_DFRAME_PIN 5 -#endif - -// PTI DOUT on PC04 -#ifndef PTI_DOUT_PORT -#define PTI_DOUT_PORT gpioPortC -#endif -#ifndef PTI_DOUT_PIN -#define PTI_DOUT_PIN 4 -#endif - -// [PTI]$ - -// $[MODEM] -// [MODEM]$ - -// $[CUSTOM_PIN_NAME] -#ifndef _PORT -#define _PORT gpioPortA -#endif -#ifndef _PIN -#define _PIN 0 -#endif - -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - diff --git a/src/ncp-uart-hw/config/psa_crypto_config.h b/src/ncp-uart-hw/config/psa_crypto_config.h deleted file mode 100644 index a17b0efc..00000000 --- a/src/ncp-uart-hw/config/psa_crypto_config.h +++ /dev/null @@ -1,170 +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 - -// - -// Power optimization configuration - -// Store already-generated random bytes before putting the device to sleep -// Using the hardware TRNG (for example through psa_generate_random()) will -// consume a non-negligible amount of power. A start-up routine must pass -// and a relatively large minimum amount of random bytes will be generated. -// Use cases where the device is frequently entering EM2/EM3 and thereafter -// consumes a small amount of data from the TRNG may benefit from buffering -// the existing random bytes before putting the device to sleep. These -// buffered bytes are then consumed until exhaustion before the TRNG needs -// to be initialized and used again. -// -// NOTE: this configuration option is only applicable for devices with a -// Virtual Secure Engine (VSE), and requires the 'Power Manager' component -// to be included in the project. -// -// Default: 0 -#define SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP (0) - -// Number of random words to buffer before putting the device to sleep <1-63> -// This option can be used to decrease the amount of random words that -// (if enabled) are buffered before the device enters EM2/EM3. Lowering this -// number will result in less static RAM usage, but also means that the TRNG -// potentially has to be initialized more times--leading to increased power -// consumption. By default this option in configured to buffer as much TRNG -// data as possible (limited by the depth of the TRNG FIFO). -// -// NOTE: this configuration option is only applicable when -// SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP is enabled. -// -// Default: 63 -#define SL_VSE_MAX_TRNG_WORDS_BUFFERED_DURING_SLEEP (63) -// - -// - -// <<< 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/src/ncp-uart-hw/config/sl_board_control_config.h b/src/ncp-uart-hw/config/sl_board_control_config.h deleted file mode 100644 index f1804587..00000000 --- a/src/ncp-uart-hw/config/sl_board_control_config.h +++ /dev/null @@ -1,56 +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 Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 1 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#ifndef SL_BOARD_ENABLE_VCOM_PORT -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD -#endif -#ifndef SL_BOARD_ENABLE_VCOM_PIN -#define SL_BOARD_ENABLE_VCOM_PIN 4 -#endif -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/src/ncp-uart-hw/config/sl_custom_manufacturing_token_header.h b/src/ncp-uart-hw/config/sl_custom_manufacturing_token_header.h deleted file mode 100644 index cba1a05e..00000000 --- a/src/ncp-uart-hw/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 - */ \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_custom_token_header.h b/src/ncp-uart-hw/config/sl_custom_token_header.h deleted file mode 100644 index 2d68afff..00000000 --- a/src/ncp-uart-hw/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 - * - ******************************************************************************/ \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_debug_swo_config.h b/src/ncp-uart-hw/config/sl_debug_swo_config.h deleted file mode 100644 index fee7e65d..00000000 --- a/src/ncp-uart-hw/config/sl_debug_swo_config.h +++ /dev/null @@ -1,106 +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 -// $[GPIO_SL_DEBUG] -#ifndef SL_DEBUG_PERIPHERAL -#define SL_DEBUG_PERIPHERAL GPIO -#endif - -// GPIO SWV on PA03 -#ifndef SL_DEBUG_SWV_PORT -#define SL_DEBUG_SWV_PORT gpioPortA -#endif -#ifndef SL_DEBUG_SWV_PIN -#define SL_DEBUG_SWV_PIN 3 -#endif -// [GPIO_SL_DEBUG]$ -// <<< sl:end pin_tool >>> - -#endif // SL_DEBUG_SWO_CONFIG_H diff --git a/src/ncp-uart-hw/config/sl_device_init_emu_config.h b/src/ncp-uart-hw/config/sl_device_init_emu_config.h deleted file mode 100644 index f23d055b..00000000 --- a/src/ncp-uart-hw/config/sl_device_init_emu_config.h +++ /dev/null @@ -1,53 +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 >>> - -// Allow debugger to remain connected in EM2 -// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. -// Enabling debug connectivity results in an increased power consumption in EM2/EM3. -// Default: 1 -#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 - -// 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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_device_init_hfrco_config.h b/src/ncp-uart-hw/config/sl_device_init_hfrco_config.h deleted file mode 100644 index 532885ae..00000000 --- a/src/ncp-uart-hw/config/sl_device_init_hfrco_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_HFRCO 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_HFRCO_CONFIG_H -#define SL_DEVICE_INIT_HFRCO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Frequency Band -// RC Oscillator Frequency Band -// 1 MHz -// 2 MHz -// 4 MHz -// 7 MHz -// 13 MHz -// 16 MHz -// 19 MHz -// 26 MHz -// 32 MHz -// 38 MHz -// 48 MHz -// 56 MHz -// 64 MHz -// 80 MHz -// Default: cmuHFRCODPLLFreq_80M0Hz -#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_device_init_hfxo_config.h b/src/ncp-uart-hw/config/sl_device_init_hfxo_config.h deleted file mode 100644 index 917e60a6..00000000 --- a/src/ncp-uart-hw/config/sl_device_init_hfxo_config.h +++ /dev/null @@ -1,57 +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 sine wave -// Default: cmuHfxoOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_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-255> -// Default: 140 -#define SL_DEVICE_INIT_HFXO_CTUNE 133 - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_device_init_lfxo_config.h b/src/ncp-uart-hw/config/sl_device_init_lfxo_config.h deleted file mode 100644 index d2cd25f5..00000000 --- a/src/ncp-uart-hw/config/sl_device_init_lfxo_config.h +++ /dev/null @@ -1,93 +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: cmuLfxoOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 79 - -// LFXO precision in PPM <0-65535> -// Default: 50 -#define SL_DEVICE_INIT_LFXO_PRECISION 50 - -// Startup Timeout Delay -// -// 2 cycles -// 256 cycles -// 1K cycles -// 2K cycles -// 4K cycles -// 8K cycles -// 16K cycles -// 32K cycles -// Default: cmuLfxoStartupDelay_4KCycles -#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_DEVICE_INIT_LFXO -// $[LFXO_SL_DEVICE_INIT_LFXO] -#ifndef SL_DEVICE_INIT_LFXO_PERIPHERAL -#define SL_DEVICE_INIT_LFXO_PERIPHERAL LFXO -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN 0 -#endif - -// LFXO LFXTAL_I on PD01 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN 1 -#endif - -// [LFXO_SL_DEVICE_INIT_LFXO]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/src/ncp-uart-hw/config/sl_iostream_usart_vcom_config.h b/src/ncp-uart-hw/config/sl_iostream_usart_vcom_config.h deleted file mode 100644 index d622f20a..00000000 --- a/src/ncp-uart-hw/config/sl_iostream_usart_vcom_config.h +++ /dev/null @@ -1,128 +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 usartHwFlowControlCtsAndRts - -// 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 PA05 -#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 5 -#endif - -// USART0 RX on PA06 -#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 6 -#endif - -// USART0 CTS on PC03 -#ifndef SL_IOSTREAM_USART_VCOM_CTS_PORT -#define SL_IOSTREAM_USART_VCOM_CTS_PORT gpioPortC -#endif -#ifndef SL_IOSTREAM_USART_VCOM_CTS_PIN -#define SL_IOSTREAM_USART_VCOM_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef SL_IOSTREAM_USART_VCOM_RTS_PORT -#define SL_IOSTREAM_USART_VCOM_RTS_PORT gpioPortC -#endif -#ifndef SL_IOSTREAM_USART_VCOM_RTS_PIN -#define SL_IOSTREAM_USART_VCOM_RTS_PIN 2 -#endif -// [USART_SL_IOSTREAM_USART_VCOM]$ -// <<< sl:end pin_tool >>> - -#endif diff --git a/src/ncp-uart-hw/config/sl_iostream_vuart_config.h b/src/ncp-uart-hw/config/sl_iostream_vuart_config.h deleted file mode 100644 index b0c53246..00000000 --- a/src/ncp-uart-hw/config/sl_iostream_vuart_config.h +++ /dev/null @@ -1,42 +0,0 @@ -/***************************************************************************//** - * @file - * @brief SL_IOSTREAM_VUART 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_IOSTREAM_VUART_CONFIG_H -#define SL_IOSTREAM_VUART_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// VUART settings -// Receive buffer size -// Default: 32 -#define SL_IOSTREAM_VUART_RX_BUFFER_SIZE 32 - -// -// <<< end of configuration section >>> -#endif \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_legacy_hal_wdog_config.h b/src/ncp-uart-hw/config/sl_legacy_hal_wdog_config.h deleted file mode 100644 index 786ef227..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_mbedtls_config.h b/src/ncp-uart-hw/config/sl_mbedtls_config.h deleted file mode 100644 index 5ebefc9a..00000000 --- a/src/ncp-uart-hw/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/src/ncp-uart-hw/config/sl_mbedtls_device_config.h b/src/ncp-uart-hw/config/sl_mbedtls_device_config.h deleted file mode 100644 index e286a0d9..00000000 --- a/src/ncp-uart-hw/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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_memory_config.h b/src/ncp-uart-hw/config/sl_memory_config.h deleted file mode 100644 index b43ebcba..00000000 --- a/src/ncp-uart-hw/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/src/ncp-uart-hw/config/sl_power_manager_config.h b/src/ncp-uart-hw/config/sl_power_manager_config.h deleted file mode 100644 index e4b1da09..00000000 --- a/src/ncp-uart-hw/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/src/ncp-uart-hw/config/sl_rail_util_pa_config.h b/src/ncp-uart-hw/config/sl_rail_util_pa_config.h deleted file mode 100644 index 84b836c2..00000000 --- a/src/ncp-uart-hw/config/sl_rail_util_pa_config.h +++ /dev/null @@ -1,81 +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 -// Highest Possible -// High Power (chip-specific) -// Medium Power (chip-specific) -// Low Power -// Disable -// Default: RAIL_TX_POWER_MODE_2P4GIG_HIGHEST -#define SL_RAIL_UTIL_PA_SELECTION_2P4GHZ RAIL_TX_POWER_MODE_2P4GIG_HIGHEST -// Sub-1 GHz PA Selection -// Disable -// Default: RAIL_TX_POWER_MODE_NONE -#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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_rail_util_power_manager_init_config.h b/src/ncp-uart-hw/config/sl_rail_util_power_manager_init_config.h deleted file mode 100644 index 03a1dfd0..00000000 --- a/src/ncp-uart-hw/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 \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_rail_util_pti_config.h b/src/ncp-uart-hw/config/sl_rail_util_pti_config.h deleted file mode 100644 index de9d71ae..00000000 --- a/src/ncp-uart-hw/config/sl_rail_util_pti_config.h +++ /dev/null @@ -1,82 +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 PC04 -#ifndef SL_RAIL_UTIL_PTI_DOUT_PORT -#define SL_RAIL_UTIL_PTI_DOUT_PORT gpioPortC -#endif -#ifndef SL_RAIL_UTIL_PTI_DOUT_PIN -#define SL_RAIL_UTIL_PTI_DOUT_PIN 4 -#endif - -// PTI DFRAME on PC05 -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PORT -#define SL_RAIL_UTIL_PTI_DFRAME_PORT gpioPortC -#endif -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PIN -#define SL_RAIL_UTIL_PTI_DFRAME_PIN 5 -#endif - -// [PTI_SL_RAIL_UTIL_PTI]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_RAIL_UTIL_PTI_CONFIG_H diff --git a/src/ncp-uart-hw/config/sl_rail_util_rf_path_config.h b/src/ncp-uart-hw/config/sl_rail_util_rf_path_config.h deleted file mode 100644 index 464e91c3..00000000 --- a/src/ncp-uart-hw/config/sl_rail_util_rf_path_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @file - * @brief - ******************************************************************************* - * # 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_RF_PATH_CONFIG_H -#define SL_RAIL_UTIL_RF_PATH_CONFIG_H - -#include "rail_types.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// Chip-internal RF Path Configuration -// RF Path Mode -// Path 0 -// Path 1 -// Default: RAIL_ANTENNA_1 -#define SL_RAIL_UTIL_RF_PATH_INT_RF_PATH_MODE RAIL_ANTENNA_1 -// - -// <<< end of configuration section >>> - -#endif // SL_RAIL_UTIL_RF_PATH_CONFIG_H \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_sleeptimer_config.h b/src/ncp-uart-hw/config/sl_sleeptimer_config.h deleted file mode 100644 index bba646d6..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_token_manager_config.h b/src/ncp-uart-hw/config/sl_token_manager_config.h deleted file mode 100644 index 02544106..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_zigbee_debug_print_config.h b/src/ncp-uart-hw/config/sl_zigbee_debug_print_config.h deleted file mode 100644 index 55a8e72e..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_zigbee_green_power_config.h b/src/ncp-uart-hw/config/sl_zigbee_green_power_config.h deleted file mode 100644 index e0310d3a..00000000 --- a/src/ncp-uart-hw/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/src/ncp-uart-hw/config/sl_zigbee_light_link_config.h b/src/ncp-uart-hw/config/sl_zigbee_light_link_config.h deleted file mode 100644 index edaded9a..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_zigbee_pro_stack_config.h b/src/ncp-uart-hw/config/sl_zigbee_pro_stack_config.h deleted file mode 100644 index 203542e6..00000000 --- a/src/ncp-uart-hw/config/sl_zigbee_pro_stack_config.h +++ /dev/null @@ -1,101 +0,0 @@ -/***************************************************************************//** - * @brief ZigBee PRO Full 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 - -// Child Table Size <0-64> -// Default: 6 -// The maximum number of ZigBee PRO End Devices that can be supported by a single device. -#define EMBER_MAX_END_DEVICE_CHILDREN 32 - -// 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 255 - -// 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_256 - -// 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 32 - -// 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 64 - -// Neighbor Table Size -// Neighbor Table Size -// <16=> 16 -// <26=> 26 -// Default: 16 -// The size of the neighbor table. -#define EMBER_NEIGHBOR_TABLE_SIZE 16 - -// 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 - -// 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/src/ncp-uart-hw/config/sl_zigbee_security_link_keys_config.h b/src/ncp-uart-hw/config/sl_zigbee_security_link_keys_config.h deleted file mode 100644 index 1bd373cc..00000000 --- a/src/ncp-uart-hw/config/sl_zigbee_security_link_keys_config.h +++ /dev/null @@ -1,33 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Security Link Keys 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 Security Link Keys Library configuration - -// Link Key Table Size <1-127> -// Default: 6 -// The maximum number of link key table entries supported by the stack. -#define EMBER_KEY_TABLE_SIZE 12 - -// Request Key Timeout <0-10> -// Default: 0 -// The length of time that a node will wait for a trust center to answer its Application Link Key request. -#define EMBER_REQUEST_KEY_TIMEOUT 0 - -// - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/sl_zigbee_source_route_config.h b/src/ncp-uart-hw/config/sl_zigbee_source_route_config.h deleted file mode 100644 index af3d1adf..00000000 --- a/src/ncp-uart-hw/config/sl_zigbee_source_route_config.h +++ /dev/null @@ -1,33 +0,0 @@ -/***************************************************************************//** - * @brief Zigbee Source Route 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 Source Route Library configuration - -// Source route table Size (SoC or NCP) <2-255> -// Default: 7 -// The size of the source route table for storing source routes on the SOC or NCP. -#define EMBER_SOURCE_ROUTE_TABLE_SIZE 200 - -// Max source route relay counts <11-40> -// Default: 11 -// Max source route hops accepted or/and inserted in the source route table/header. -#define EMBER_MAX_SOURCE_ROUTE_RELAY_COUNT 11 - -// - -// <<< end of configuration section >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/zigbee_sleep_config.h b/src/ncp-uart-hw/config/zigbee_sleep_config.h deleted file mode 100644 index 49fe8146..00000000 --- a/src/ncp-uart-hw/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 1 - -// 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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/config/zigbee_watchdog_periodic_refresh_config.h b/src/ncp-uart-hw/config/zigbee_watchdog_periodic_refresh_config.h deleted file mode 100644 index 35f204e7..00000000 --- a/src/ncp-uart-hw/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 >>> \ No newline at end of file diff --git a/src/ncp-uart-hw/gbl_metadata.yaml b/src/ncp-uart-hw/gbl_metadata.yaml deleted file mode 100644 index f74de2d4..00000000 --- a/src/ncp-uart-hw/gbl_metadata.yaml +++ /dev/null @@ -1,3 +0,0 @@ -baudrate: 115200 -dynamic: [ezsp_version] -fw_type: ncp-uart-hw diff --git a/src/ncp-uart-hw/ncp-uart-hw.pintool b/src/ncp-uart-hw/ncp-uart-hw.pintool deleted file mode 100644 index 734fdd07..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw.pintool +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/ncp-uart-hw/ncp-uart-hw.slcp b/src/ncp-uart-hw/ncp-uart-hw.slcp deleted file mode 100644 index e1036f4a..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw.slcp +++ /dev/null @@ -1,76 +0,0 @@ -# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. -project_name: ncp-uart-hw -label: ncp-uart-hw -author: Silicon Laboratories, Inc. -description: This network coprocessor (NCP) application supports communication with - a host application over a UART interface with hardware flow control. This NCP application - can be built as configured, or optionally can be augmented with customized extensions - for initialization, main loop processing, event definition/handling, and messaging - with the host. To create a ECC-enabled application for the Smart Energy Profile, - please download and extract the 'EmberZnet-Smart-Energy.zip' side-package over your - installed SDK and add, depending on use-case, one of two new components ('CBKE 163k1'; - 'CBKE 283k1') to your application. -category: Zigbee Application -filter: -- name: Device Type - value: [NCP] -- name: Project Difficulty - value: [Advanced] -- name: Wireless Technology - value: [Zigbee] -package: Zigbee -quality: production -readme: -- {path: readme.html} -source: -- {path: main.c} -- {path: app.c} -tag: [prebuilt_demo] -sdk: {id: gecko_sdk, version: 4.4.4} -toolchain_settings: [] -component: -- {id: EFR32MG21A010F1024IM32} -- {id: brd4001a} -- {id: brd4179b} -- instance: [vcom] - id: iostream_usart -- {id: iostream_vuart} -- {id: token_manager} -- {id: zigbee_app_framework_common} -- {id: zigbee_debug_basic} -- {id: zigbee_debug_extended} -- {id: zigbee_debug_print} -- {id: zigbee_gp} -- {id: zigbee_mfglib} -- {id: zigbee_ncp_uart_hardware} -- {id: zigbee_pro_stack} -- {id: zigbee_r22_support} -- {id: zigbee_security_link_keys} -- {id: zigbee_source_route} -- {id: zigbee_token_interface} -- {id: zigbee_zll} -define: -- {name: EMBER_CUSTOM_MAC_FILTER_TABLE_SIZE, value: '15'} -configuration: -- {name: SL_BOARD_ENABLE_VCOM, value: '1'} -- {name: SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE, value: usartHwFlowControlCtsAndRts} -- {name: SL_CLI_MAX_INPUT_ARGUMENTS, value: '16'} -- {name: EMBER_BINDING_TABLE_SIZE, value: '32'} -- {name: EMBER_MAX_END_DEVICE_CHILDREN, value: '32'} -- {name: EMBER_PACKET_BUFFER_COUNT, value: '255'} -- {name: EMBER_AF_PLUGIN_ZIGBEE_PRO_STACK_CHILD_TABLE_SIZE, value: '32'} -- {name: EMBER_KEY_TABLE_SIZE, value: '12'} -- {name: SL_CLI_EXAMPLE_IOSTREAM_HANDLE, value: sl_iostream_vuart_handle} -- condition: [device_series_1] - name: NVM3_DEFAULT_NVM_SIZE - value: '36864' -- condition: [device_series_2] - name: NVM3_DEFAULT_NVM_SIZE - value: '32768' -- {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'} -ui_hints: - highlight: - - {path: readme.html} - diff --git a/src/ncp-uart-hw/ncp-uart-hw.slps b/src/ncp-uart-hw/ncp-uart-hw.slps deleted file mode 100644 index 9aaaa27f..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw.slps +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ncp-uart-hw/ncp-uart-hw_cmake/CMakeLists.txt b/src/ncp-uart-hw/ncp-uart-hw_cmake/CMakeLists.txt deleted file mode 100644 index e1ed06f1..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw_cmake/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -# Define minimal required version of CMake. -cmake_minimum_required(VERSION "3.25") - -# Project definition -project( - ncp-uart-hw - VERSION 1.0 - LANGUAGES C CXX ASM -) - -# Include the definition of the slc_ncp-uart-hw target, -# which contains the content of the SLC project -include(ncp-uart-hw.cmake) - -add_executable(ncp-uart-hw - # Add additional sources here -) - -target_include_directories(ncp-uart-hw PUBLIC - # Add additional include paths here -) - -target_compile_definitions(ncp-uart-hw PUBLIC - # Add additional macros here -) - -target_compile_options(ncp-uart-hw PUBLIC - # Set additional compiler flags here -) - -target_link_options(ncp-uart-hw PUBLIC - # Set additional linker flags here -) - -# Link with the content defined in the SLC project -target_link_libraries(ncp-uart-hw PRIVATE - slc_ncp-uart-hw -) - -# Include managed project content if available -include(ncp-uart-hw_project.cmake OPTIONAL RESULT_VARIABLE managed_project) -if(managed_project) - message(STATUS "Using managed project content from ${managed_project}") -endif() - -# Force the gcc linker command -set_target_properties(ncp-uart-hw PROPERTIES LINKER_LANGUAGE C) - -# Create .bin, .hex and .s37 artifacts after building the project -add_custom_command(TARGET ncp-uart-hw - POST_BUILD - COMMAND ${CMAKE_OBJCOPY} -O srec "$" "$/$.s37" - COMMAND ${CMAKE_OBJCOPY} -O ihex "$" "$/$.hex" - COMMAND ${CMAKE_OBJCOPY} -O binary "$" "$/$.bin" -) - -# Run post-build pipeline to perform additional post-processing -if(post_build_command) -add_custom_command(TARGET ncp-uart-hw - POST_BUILD - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/.. - COMMAND ${post_build_command} -) -endif() \ No newline at end of file diff --git a/src/ncp-uart-hw/ncp-uart-hw_cmake/CMakePresets.json b/src/ncp-uart-hw/ncp-uart-hw_cmake/CMakePresets.json deleted file mode 100644 index 2a4fd450..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw_cmake/CMakePresets.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": 6, - "cmakeMinimumRequired": { - "major": 3, - "minor": 25, - "patch": 0 - }, - "configurePresets": [ - { - "name": "project", - "displayName": "Configure ncp-uart-hw", - "generator": "Ninja Multi-Config", - "binaryDir": "${sourceDir}/build", - "toolchainFile": "${sourceDir}/toolchain.cmake", - "cacheVariables": { - "CMAKE_CONFIGURATION_TYPES": "default_config" - } - } - ], - "buildPresets": [ - { - "name": "default_config", - "displayName": "Build ncp-uart-hw", - "configurePreset": "project", - "configuration": "default_config", - "targets": ["ncp-uart-hw"] - } - ], - "workflowPresets": [ - { - "name": "project", - "steps": [ - {"type": "configure", "name": "project"}, - {"type": "build", "name": "default_config"} - ] - } - ] - } diff --git a/src/ncp-uart-hw/ncp-uart-hw_cmake/ncp-uart-hw.cmake b/src/ncp-uart-hw/ncp-uart-hw_cmake/ncp-uart-hw.cmake deleted file mode 100644 index bb872853..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw_cmake/ncp-uart-hw.cmake +++ /dev/null @@ -1,405 +0,0 @@ -set(SDK_PATH "/Users/nikita/SimplicityStudio/SDKs/gecko_sdk") -set(COPIED_SDK_PATH "gecko_sdk_4.4.0") - -add_library(slc_ncp-uart-hw OBJECT - "${SDK_PATH}/hardware/board/src/sl_board_control_gpio.c" - "${SDK_PATH}/hardware/board/src/sl_board_init.c" - "${SDK_PATH}/hardware/driver/configuration_over_swo/src/sl_cos.c" - "${SDK_PATH}/platform/bootloader/api/btl_interface.c" - "${SDK_PATH}/platform/bootloader/api/btl_interface_storage.c" - "${SDK_PATH}/platform/bootloader/app_properties/app_properties.c" - "${SDK_PATH}/platform/common/src/sl_assert.c" - "${SDK_PATH}/platform/common/src/sl_slist.c" - "${SDK_PATH}/platform/common/src/sl_string.c" - "${SDK_PATH}/platform/common/src/sl_syscalls.c" - "${SDK_PATH}/platform/common/toolchain/src/sl_memory.c" - "${SDK_PATH}/platform/Device/SiliconLabs/EFR32MG21/Source/startup_efr32mg21.c" - "${SDK_PATH}/platform/Device/SiliconLabs/EFR32MG21/Source/system_efr32mg21.c" - "${SDK_PATH}/platform/driver/debug/src/sl_debug_swo.c" - "${SDK_PATH}/platform/emdrv/dmadrv/src/dmadrv.c" - "${SDK_PATH}/platform/emdrv/nvm3/src/nvm3_default_common_linker.c" - "${SDK_PATH}/platform/emdrv/nvm3/src/nvm3_hal_flash.c" - "${SDK_PATH}/platform/emdrv/nvm3/src/nvm3_lock.c" - "${SDK_PATH}/platform/emlib/src/em_burtc.c" - "${SDK_PATH}/platform/emlib/src/em_cmu.c" - "${SDK_PATH}/platform/emlib/src/em_core.c" - "${SDK_PATH}/platform/emlib/src/em_emu.c" - "${SDK_PATH}/platform/emlib/src/em_gpio.c" - "${SDK_PATH}/platform/emlib/src/em_ldma.c" - "${SDK_PATH}/platform/emlib/src/em_msc.c" - "${SDK_PATH}/platform/emlib/src/em_prs.c" - "${SDK_PATH}/platform/emlib/src/em_rmu.c" - "${SDK_PATH}/platform/emlib/src/em_rtcc.c" - "${SDK_PATH}/platform/emlib/src/em_se.c" - "${SDK_PATH}/platform/emlib/src/em_system.c" - "${SDK_PATH}/platform/emlib/src/em_timer.c" - "${SDK_PATH}/platform/emlib/src/em_usart.c" - "${SDK_PATH}/platform/emlib/src/em_wdog.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/coexistence/protocol/ieee802154_uc/coexistence-802154.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/pa-conversions/pa_conversions_efr32.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/pa-conversions/pa_curves_efr32.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_ant_div/sl_rail_util_ant_div.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_power_manager_init/sl_rail_util_power_manager_init.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_pti/sl_rail_util_pti.c" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_rf_path/sl_rail_util_rf_path.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c" - "${SDK_PATH}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c" - "${SDK_PATH}/platform/security/sl_component/sl_mbedtls_support/src/sl_mbedtls.c" - "${SDK_PATH}/platform/security/sl_component/sl_mbedtls_support/src/sl_psa_crypto.c" - "${SDK_PATH}/platform/security/sl_component/sl_mbedtls_support/src/sli_psa_crypto.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_psa_driver_common.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_psa_driver_init.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_psa_trng.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_builtin_keys.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_signature.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_aead.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/src/sli_se_version_dependencies.c" - "${SDK_PATH}/platform/service/device_init/src/sl_device_init_emu_s2.c" - "${SDK_PATH}/platform/service/device_init/src/sl_device_init_hfrco.c" - "${SDK_PATH}/platform/service/device_init/src/sl_device_init_hfxo_s2.c" - "${SDK_PATH}/platform/service/device_init/src/sl_device_init_lfxo_s2.c" - "${SDK_PATH}/platform/service/device_init/src/sl_device_init_nvic.c" - "${SDK_PATH}/platform/service/iostream/src/sl_iostream.c" - "${SDK_PATH}/platform/service/iostream/src/sl_iostream_debug.c" - "${SDK_PATH}/platform/service/iostream/src/sl_iostream_swo_itm_8.c" - "${SDK_PATH}/platform/service/iostream/src/sl_iostream_uart.c" - "${SDK_PATH}/platform/service/iostream/src/sl_iostream_usart.c" - "${SDK_PATH}/platform/service/iostream/src/sl_iostream_vuart.c" - "${SDK_PATH}/platform/service/legacy_common_ash/src/ash-common.c" - "${SDK_PATH}/platform/service/legacy_hal/src/base-replacement.c" - "${SDK_PATH}/platform/service/legacy_hal/src/bootloader-common.c" - "${SDK_PATH}/platform/service/legacy_hal/src/bootloader-interface-app.c" - "${SDK_PATH}/platform/service/legacy_hal/src/bootloader-interface-standalone.c" - "${SDK_PATH}/platform/service/legacy_hal/src/bootloader-interface.c" - "${SDK_PATH}/platform/service/legacy_hal/src/crc.c" - "${SDK_PATH}/platform/service/legacy_hal/src/diagnostic.c" - "${SDK_PATH}/platform/service/legacy_hal/src/ember-phy.c" - "${SDK_PATH}/platform/service/legacy_hal/src/faults.s" - "${SDK_PATH}/platform/service/legacy_hal/src/random.c" - "${SDK_PATH}/platform/service/legacy_hal/src/token_legacy.c" - "${SDK_PATH}/platform/service/legacy_hal_wdog/src/sl_legacy_hal_wdog.c" - "${SDK_PATH}/platform/service/legacy_ncp_ash/src/ash-ncp.c" - "${SDK_PATH}/platform/service/legacy_printf/src/sl_legacy_printf.c" - "${SDK_PATH}/platform/service/power_manager/src/sl_power_manager.c" - "${SDK_PATH}/platform/service/power_manager/src/sl_power_manager_debug.c" - "${SDK_PATH}/platform/service/power_manager/src/sl_power_manager_hal_s2.c" - "${SDK_PATH}/platform/service/sleeptimer/src/sl_sleeptimer.c" - "${SDK_PATH}/platform/service/sleeptimer/src/sl_sleeptimer_hal_burtc.c" - "${SDK_PATH}/platform/service/sleeptimer/src/sl_sleeptimer_hal_prortc.c" - "${SDK_PATH}/platform/service/sleeptimer/src/sl_sleeptimer_hal_rtcc.c" - "${SDK_PATH}/platform/service/sleeptimer/src/sl_sleeptimer_hal_timer.c" - "${SDK_PATH}/platform/service/system/src/sl_system_init.c" - "${SDK_PATH}/platform/service/system/src/sl_system_process_action.c" - "${SDK_PATH}/platform/service/token_manager/src/sl_token_def.c" - "${SDK_PATH}/platform/service/token_manager/src/sl_token_manager.c" - "${SDK_PATH}/platform/service/token_manager/src/sl_token_manufacturing.c" - "${SDK_PATH}/platform/service/token_manager/src/sl_token_manufacturing_generic.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-binding-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-green-power-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-messaging-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-mfglib-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-networking-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-security-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-token-interface-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-token-interface.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-trust-center-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/command-handlers-zll-generated.c" - "${SDK_PATH}/protocol/zigbee/app/em260/em260-common.c" - "${SDK_PATH}/protocol/zigbee/app/em260/ncp-stack-stub.c" - "${SDK_PATH}/protocol/zigbee/app/em260/serial-interface-uart.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_app_framework_common.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_app_framework_sleep.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_app_framework_stack_cb.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_enhanced_routing.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_ncp_framework_cb.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_token_interface.c" - "${SDK_PATH}/protocol/zigbee/app/framework/common/zigbee_token_interface_stub.c" - "${SDK_PATH}/protocol/zigbee/app/framework/plugin/debug-print/sl_zigbee_debug_print.c" - "${SDK_PATH}/protocol/zigbee/app/util/security/security-address-cache.c" - "${SDK_PATH}/protocol/zigbee/app/xncp/xncp-stubs.c" - "${SDK_PATH}/protocol/zigbee/stack/config/ember-configuration-access.c" - "${SDK_PATH}/protocol/zigbee/stack/config/ember-configuration.c" - "${SDK_PATH}/protocol/zigbee/stack/core/ember-multi-network-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/core/multi-pan-common.c" - "${SDK_PATH}/protocol/zigbee/stack/core/multi-pan-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/framework/aes-ecb.c" - "${SDK_PATH}/protocol/zigbee/stack/framework/strong-random-api.c" - "${SDK_PATH}/protocol/zigbee/stack/framework/zigbee-event-logger-stub-gen.c" - "${SDK_PATH}/protocol/zigbee/stack/security/cbke-crypto-engine-163k1-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/security/cbke-crypto-engine-283k1-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/security/cbke-crypto-engine-dsa-sign-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/security/cbke-crypto-engine-dsa-verify-283k1-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/security/cbke-crypto-engine-dsa-verify-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/security/cbke-crypto-engine-stub.c" - "${SDK_PATH}/protocol/zigbee/stack/security/zigbee-security-manager-no-vault.c" - "${SDK_PATH}/protocol/zigbee/stack/security/zigbee-security-manager.c" - "${SDK_PATH}/protocol/zigbee/stack/stubs/sl_zigbee_dynamic_commissioning_stubs.c" - "${SDK_PATH}/protocol/zigbee/stack/stubs/sl_zigbee_fragmentation_stubs.c" - "${SDK_PATH}/protocol/zigbee/stack/stubs/sl_zigbee_r23_misc_support_stubs.c" - "${SDK_PATH}/protocol/zigbee/stack/zigbee/aps-keys-full.c" - "${SDK_PATH}/protocol/zigbee/stack/zigbee/sli_zigbee_zdo_cluster_filter.c" - "${SDK_PATH}/util/silicon_labs/silabs_core/memory_manager/sl_malloc.c" - "${SDK_PATH}/util/third_party/mbedtls/library/cipher.c" - "${SDK_PATH}/util/third_party/mbedtls/library/cipher_wrap.c" - "${SDK_PATH}/util/third_party/mbedtls/library/constant_time.c" - "${SDK_PATH}/util/third_party/mbedtls/library/platform.c" - "${SDK_PATH}/util/third_party/mbedtls/library/platform_util.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_aead.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_cipher.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_client.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers_no_static.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_ecp.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_ffdh.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_hash.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_mac.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_pake.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_rsa.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_se.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_slot_management.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_crypto_storage.c" - "${SDK_PATH}/util/third_party/mbedtls/library/psa_util.c" - "${SDK_PATH}/util/third_party/mbedtls/library/threading.c" - "${SDK_PATH}/util/third_party/printf/printf.c" - "${SDK_PATH}/util/third_party/printf/src/iostream_printf.c" - "${SDK_PATH}/util/third_party/segger/systemview/SEGGER/SEGGER_RTT.c" - "../app.c" - "../autogen/sl_board_default_init.c" - "../autogen/sl_device_init_clocks.c" - "../autogen/sl_event_handler.c" - "../autogen/sl_iostream_handles.c" - "../autogen/sl_iostream_init_usart_instances.c" - "../autogen/sl_power_manager_handler.c" - "../autogen/sl_rail_util_ieee802154_phy_select.c" - "../autogen/sl_rail_util_ieee802154_stack_event.c" - "../autogen/zigbee_common_callback_dispatcher.c" - "../autogen/zigbee_ncp_callback_dispatcher.c" - "../autogen/zigbee_stack_callback_dispatcher.c" - "../main.c" - "../sl_zigbee_watchdog_periodic_refresh.c" -) - -target_include_directories(slc_ncp-uart-hw PUBLIC - "../config" - "../autogen" - "${SDK_PATH}/platform/Device/SiliconLabs/EFR32MG21/Include" - "${SDK_PATH}/platform/common/inc" - "${SDK_PATH}/hardware/board/inc" - "${SDK_PATH}/platform/bootloader" - "${SDK_PATH}/platform/bootloader/api" - "${SDK_PATH}/platform/CMSIS/Core/Include" - "${SDK_PATH}/hardware/driver/configuration_over_swo/inc" - "${SDK_PATH}/platform/driver/debug/inc" - "${SDK_PATH}/platform/service/device_init/inc" - "${SDK_PATH}/platform/emdrv/dmadrv/inc" - "${SDK_PATH}/platform/emdrv/common/inc" - "${SDK_PATH}/platform/emlib/inc" - "${SDK_PATH}/platform/service/iostream/inc" - "${SDK_PATH}/platform/service/legacy_hal/inc" - "${SDK_PATH}/platform/service/legacy_common_ash/inc" - "${SDK_PATH}/platform/service/legacy_hal_wdog/inc" - "${SDK_PATH}/platform/service/legacy_ncp_ash/inc" - "${SDK_PATH}/platform/service/legacy_printf/inc" - "${SDK_PATH}/platform/security/sl_component/sl_mbedtls_support/config" - "${SDK_PATH}/platform/security/sl_component/sl_mbedtls_support/config/preset" - "${SDK_PATH}/platform/security/sl_component/sl_mbedtls_support/inc" - "${SDK_PATH}/util/third_party/mbedtls/include" - "${SDK_PATH}/util/third_party/mbedtls/library" - "${SDK_PATH}/platform/emdrv/nvm3/inc" - "${SDK_PATH}/platform/service/power_manager/inc" - "${SDK_PATH}/util/third_party/printf" - "${SDK_PATH}/util/third_party/printf/inc" - "${SDK_PATH}/platform/security/sl_component/sl_psa_driver/inc" - "${SDK_PATH}/platform/radio/rail_lib/common" - "${SDK_PATH}/platform/radio/rail_lib/protocol/ble" - "${SDK_PATH}/platform/radio/rail_lib/protocol/ieee802154" - "${SDK_PATH}/platform/radio/rail_lib/protocol/wmbus" - "${SDK_PATH}/platform/radio/rail_lib/protocol/zwave" - "${SDK_PATH}/platform/radio/rail_lib/chip/efr32/efr32xg2x" - "${SDK_PATH}/platform/radio/rail_lib/protocol/sidewalk" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_ieee802154" - "${SDK_PATH}/platform/radio/rail_lib/plugin/pa-conversions" - "${SDK_PATH}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_power_manager_init" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_pti" - "${SDK_PATH}/platform/radio/rail_lib/plugin/rail_util_rf_path" - "${SDK_PATH}/platform/security/sl_component/se_manager/inc" - "${SDK_PATH}/platform/security/sl_component/se_manager/src" - "${SDK_PATH}/util/third_party/segger/systemview/SEGGER" - "${SDK_PATH}/util/silicon_labs/silabs_core/memory_manager" - "${SDK_PATH}/platform/common/toolchain/inc" - "${SDK_PATH}/platform/service/system/inc" - "${SDK_PATH}/platform/service/sleeptimer/inc" - "${SDK_PATH}/platform/service/token_manager/inc" - "${SDK_PATH}/protocol/zigbee/app/framework/common" - "${SDK_PATH}/protocol/zigbee/stack/platform/micro" - "${SDK_PATH}/protocol/zigbee/stack/framework" - "${SDK_PATH}/protocol/zigbee/app/framework/plugin/debug-print" - "${SDK_PATH}/protocol/zigbee/stack/include" - "${SDK_PATH}/protocol/zigbee/stack/gp" - "${SDK_PATH}/protocol/zigbee/app/em260" - "${SDK_PATH}/protocol/zigbee/app/xncp" - "${SDK_PATH}/protocol/zigbee/app/util/ezsp" - "${SDK_PATH}/protocol/zigbee/app/framework/util" - "${SDK_PATH}/protocol/zigbee/app/util/security" - "${SDK_PATH}/protocol/zigbee/stack/zigbee" - "${SDK_PATH}/protocol/zigbee/stack/security" - "${SDK_PATH}/platform/radio/rail_lib/plugin" - "${SDK_PATH}/protocol/zigbee" - "${SDK_PATH}/protocol/zigbee/stack" - "${SDK_PATH}/platform/radio/mac/rail_mux" - "${SDK_PATH}/platform/radio/mac" - "${SDK_PATH}/util/silicon_labs/silabs_core" - "${SDK_PATH}/protocol/zigbee/stack/core" - "${SDK_PATH}/protocol/zigbee/stack/mac" - "${SDK_PATH}/protocol/zigbee/stack/zll" -) - -target_compile_definitions(slc_ncp-uart-hw PUBLIC - "EMBER_CUSTOM_MAC_FILTER_TABLE_SIZE=15" - "EFR32MG21A010F1024IM32=1" - "SL_APP_PROPERTIES=1" - "SL_BOARD_NAME=\"BRD4179B\"" - "SL_BOARD_REV=\"A05\"" - "HARDWARE_BOARD_DEFAULT_RF_BAND_2400=1" - "HARDWARE_BOARD_SUPPORTS_1_RF_BAND=1" - "HARDWARE_BOARD_SUPPORTS_RF_BAND_2400=1" - "HFXO_FREQ=38400000" - "SL_COMPONENT_CATALOG_PRESENT=1" - "SEGGER_RTT_ALIGNMENT=1024" - "EMBER_AF_API_BOOTLOADER_INTERFACE=1" - "CORTEXM3=1" - "CORTEXM3_EFM32_MICRO=1" - "CORTEXM3_EFR32=1" - "PHY_RAIL=1" - "PLATFORM_HEADER=\"platform-header.h\"" - "SL_LEGACY_HAL_ENABLE_WATCHDOG=1" - "MBEDTLS_CONFIG_FILE=" - "SL_LEGACY_LINKER=1" - "MBEDTLS_PSA_CRYPTO_CONFIG_FILE=" - "SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=0" - "SL_RAIL_UTIL_PA_CONFIG_HEADER=" - "RTT_USE_ASM=0" - "SEGGER_RTT_SECTION=\"SEGGER_RTT\"" - "CUSTOM_TOKEN_HEADER=\"sl_token_manager_af_token_header.h\"" - "USE_NVM3=1" - "UC_BUILD=1" - "EMBER_AF_NCP=1" - "EMBER_SERIAL1_RTSCTS=1" - "EZSP_UART=1" - "EMBER_MULTI_NETWORK_STRIPPED=1" - "SL_ZIGBEE_PHY_SELECT_STACK_SUPPORT=1" - "SL_ZIGBEE_STACK_COMPLIANCE_REVISION=22" -) - -target_link_libraries(slc_ncp-uart-hw PUBLIC - "-Wl,--start-group" - "gcc" - "c" - "m" - "nosys" - "${SDK_PATH}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a" - "${SDK_PATH}/platform/radio/rail_lib/autogen/librail_release/librail_efr32xg21_gcc_release.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-debug-basic/release_singlenetwork/libzigbee-debug-basic.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-debug-extended/release_singlenetwork/libzigbee-debug-extended.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/ncp-gp-library/release_singlenetwork/libncp-gp-library.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-gp/release_singlenetwork/libzigbee-gp.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/ncp-mfglib-library/release_singlenetwork/libncp-mfglib-library.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-mfglib/release_singlenetwork/libzigbee-mfglib.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-ncp-uart/release_singlenetwork/libzigbee-ncp-uart.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/ncp-pro-library/release_singlenetwork/libncp-pro-library.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-pro-stack/release_singlenetwork/libzigbee-pro-stack.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-r22-support/release_singlenetwork/libzigbee-r22-support.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/ncp-source-route-library/release_singlenetwork/libncp-source-route-library.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-source-route/release_singlenetwork/libzigbee-source-route.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/ncp-zll-library/release_singlenetwork/libncp-zll-library.a" - "${SDK_PATH}/protocol/zigbee/build/gcc/cortex-m33/zigbee-zll/release_singlenetwork/libzigbee-zll.a" - "-Wl,--end-group" -) -target_compile_options(slc_ncp-uart-hw PUBLIC - $<$:-mcpu=cortex-m33> - $<$:-mthumb> - $<$:-mfpu=fpv5-sp-d16> - $<$:-mfloat-abi=hard> - $<$:-Wall> - $<$:-Wextra> - $<$:-Os> - $<$:-fdata-sections> - $<$:-ffunction-sections> - $<$:-fomit-frame-pointer> - "$<$:SHELL:-imacros sl_gcc_preinclude.h>" - $<$:-mcmse> - $<$:-fno-builtin-printf> - $<$:-fno-builtin-sprintf> - $<$:--specs=nano.specs> - $<$:-Wno-unused-parameter> - $<$:-Wno-missing-field-initializers> - $<$:-Wno-missing-braces> - $<$:-g> - $<$:-mcpu=cortex-m33> - $<$:-mthumb> - $<$:-mfpu=fpv5-sp-d16> - $<$:-mfloat-abi=hard> - $<$:-fno-rtti> - $<$:-fno-exceptions> - $<$:-Wall> - $<$:-Wextra> - $<$:-Os> - $<$:-fdata-sections> - $<$:-ffunction-sections> - $<$:-fomit-frame-pointer> - "$<$:SHELL:-imacros sl_gcc_preinclude.h>" - $<$:-mcmse> - $<$:-fno-builtin-printf> - $<$:-fno-builtin-sprintf> - $<$:--specs=nano.specs> - $<$:-Wno-unused-parameter> - $<$:-Wno-missing-field-initializers> - $<$:-Wno-missing-braces> - $<$:-g> - $<$:-mcpu=cortex-m33> - $<$:-mthumb> - $<$:-mfpu=fpv5-sp-d16> - $<$:-mfloat-abi=hard> - "$<$:SHELL:-imacros sl_gcc_preinclude.h>" - "$<$:SHELL:-x assembler-with-cpp>" -) - -set(post_build_command ) -set_property(TARGET slc_ncp-uart-hw PROPERTY C_STANDARD 99) -set_property(TARGET slc_ncp-uart-hw PROPERTY CXX_STANDARD 11) -set_property(TARGET slc_ncp-uart-hw PROPERTY CXX_EXTENSIONS OFF) - -target_link_options(slc_ncp-uart-hw INTERFACE - -mcpu=cortex-m33 - -mthumb - -mfpu=fpv5-sp-d16 - -mfloat-abi=hard - -T${CMAKE_CURRENT_LIST_DIR}/../autogen/linkerfile_base.ld - --specs=nano.specs - -Xlinker -Map=$/ncp-uart-hw.map - -Wl,--gc-sections - -Wl,--no-warn-rwx-segments -) - -# BEGIN_SIMPLICITY_STUDIO_METADATA=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=END_SIMPLICITY_STUDIO_METADATA diff --git a/src/ncp-uart-hw/ncp-uart-hw_cmake/toolchain.cmake b/src/ncp-uart-hw/ncp-uart-hw_cmake/toolchain.cmake deleted file mode 100644 index 3ba54449..00000000 --- a/src/ncp-uart-hw/ncp-uart-hw_cmake/toolchain.cmake +++ /dev/null @@ -1,72 +0,0 @@ -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) - -if(WIN32) - set(EXE_SUFFIX ".exe") -else() - set(EXE_SUFFIX "") -endif() - -if(DEFINED ENV{ARM_GCC_DIR}) - set(TOOLCHAIN_DIR "$ENV{ARM_GCC_DIR}/bin/") -elseif(WIN32) - set(TOOLCHAIN_DIR "/bin/") -elseif(APPLE) - set(TOOLCHAIN_DIR "/Applications/Simplicity Studio.app/Contents/Eclipse/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin/") -else() - set(TOOLCHAIN_DIR "/bin/") -endif() - -if(DEFINED ENV{POST_BUILD_EXE}) - set(POST_BUILD_EXE "$ENV{POST_BUILD_EXE}") -elseif(WIN32) - set(POST_BUILD_EXE "") -elseif(APPLE) - set(POST_BUILD_EXE "/Applications/Simplicity Studio.app/Contents/Eclipse/developer/adapter_packs/commander/Commander.app/Contents/MacOS/commander") -else() - set(POST_BUILD_EXE "") -endif() - -if(DEFINED ENV{NINJA_EXE_PATH}) - set(CMAKE_MAKE_PROGRAM "$ENV{NINJA_EXE_PATH}" CACHE FILEPATH "" FORCE) -elseif(WIN32) - set(NINJA_RUNTIME_PATH "") -elseif(APPLE) - set(NINJA_RUNTIME_PATH "/Applications/Simplicity Studio.app/Contents/Eclipse/developer/adapter_packs/ninja/ninja") -else() - set(NINJA_RUNTIME_PATH "") -endif() -# Use default lookup mechanisms if the OS specific values are not set above -if (NINJA_RUNTIME_PATH) - set(CMAKE_MAKE_PROGRAM ${NINJA_RUNTIME_PATH} CACHE FILEPATH "" FORCE) -endif() - -set(TARGET_TRIPLET "arm-none-eabi-") -set(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}${TARGET_TRIPLET}gcc${EXE_SUFFIX}) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}${TARGET_TRIPLET}g++${EXE_SUFFIX}) -set(CMAKE_ASM_COMPILER ${TOOLCHAIN_DIR}${TARGET_TRIPLET}gcc${EXE_SUFFIX}) -set(CMAKE_LINKER ${TOOLCHAIN_DIR}${TARGET_TRIPLET}gcc${EXE_SUFFIX}) -set(CMAKE_AR ${TOOLCHAIN_DIR}${TARGET_TRIPLET}ar${EXE_SUFFIX}) -set(CMAKE_SIZE_UTIL ${TOOLCHAIN_DIR}${TARGET_TRIPLET}size${EXE_SUFFIX}) -set(CMAKE_STRIP ${TOOLCHAIN_DIR}${TARGET_TRIPLET}strip${EXE_SUFFIX}) -set(CMAKE_OBJCOPY ${TOOLCHAIN_DIR}${TARGET_TRIPLET}objcopy${EXE_SUFFIX}) -set(CMAKE_OBJDUMP ${TOOLCHAIN_DIR}${TARGET_TRIPLET}objdump${EXE_SUFFIX}) -set(CMAKE_NM_UTIL ${TOOLCHAIN_DIR}${TARGET_TRIPLET}gcc-nm${EXE_SUFFIX}) -set(CMAKE_RANLIB ${TOOLCHAIN_DIR}${TARGET_TRIPLET}gcc-ranlib${EXE_SUFFIX}) -set(CMAKE_GCOV ${TOOLCHAIN_DIR}${TARGET_TRIPLET}gcov${EXE_SUFFIX}) - -set(CMAKE_C_STANDARD_REQUIRED OFF) -set(CMAKE_CXX_STANDARD_REQUIRED OFF) -set(CMAKE_C_EXTENSIONS OFF) - -set(CMAKE_C_FLAGS_RELEASE "" CACHE STRING "") -set(CMAKE_CXX_FLAGS_RELEASE "" CACHE STRING "") - -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -set(CMAKE_EXECUTABLE_SUFFIX .out) -set(CMAKE_EXECUTABLE_SUFFIX_C .out) -set(CMAKE_EXECUTABLE_SUFFIX_CXX .out) diff --git a/src/ncp-uart-hw/readme.html b/src/ncp-uart-hw/readme.html deleted file mode 100644 index 055d0cfc..00000000 --- a/src/ncp-uart-hw/readme.html +++ /dev/null @@ -1,562 +0,0 @@ - - - - -readme - - -

NCP UART Application

-

This network coprocessor (NCP) application supports communication with a host application over a UART interface with hardware flow control. This NCP application can be built as configured, or optionally can be augmented with customizations for target hardware, initialization, main loop processing, event definition/handling, and messaging with the host. - -As configured, this NCP UART application is the basis for building the corresponding binary ncp-uart images delivered with the Silicon Labs Zigbee stack. - -Due to thread safety concerns with EZSP, this application cannot include an RTOS unless CPC (Co-Processor Communication) components are also added. - -Refer to the Silicon Labs Zigbee documentation for more information about NCP customization. -

-
- - \ No newline at end of file diff --git a/src/ncp-uart-hw/sl_zigbee_watchdog_periodic_refresh.c b/src/ncp-uart-hw/sl_zigbee_watchdog_periodic_refresh.c deleted file mode 100644 index e3251c3c..00000000 --- a/src/ncp-uart-hw/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/src/ot-rcp/app.c b/src/openthread_rcp/app.c old mode 100644 new mode 100755 similarity index 100% rename from src/ot-rcp/app.c rename to src/openthread_rcp/app.c diff --git a/src/ot-rcp/app.h b/src/openthread_rcp/app.h old mode 100644 new mode 100755 similarity index 100% rename from src/ot-rcp/app.h rename to src/openthread_rcp/app.h diff --git a/src/ot-rcp/main.c b/src/openthread_rcp/main.c similarity index 100% rename from src/ot-rcp/main.c rename to src/openthread_rcp/main.c diff --git a/src/openthread_rcp/openthread_rcp.slcp b/src/openthread_rcp/openthread_rcp.slcp new file mode 100644 index 00000000..3294e605 --- /dev/null +++ b/src/openthread_rcp/openthread_rcp.slcp @@ -0,0 +1,56 @@ +project_name: openthread_rcp +label: OpenThread - RCP +package: OpenThread +description: > + This is a simple OpenThread RCP application. This is equivalent to the ot-rcp application in the OpenThread GitHub repo. +category: OpenThread Examples +quality: production + +component: + - id: ot_stack_rcp + - id: ot_crash_handler + - id: uartdrv_usart + instance: + - vcom + - id: rail_util_pti + - id: bootloader_interface + +include: + - path: . + file_list: + - path: app.h + - path: reset_util.h # Originally included from `util/third_party/openthread/src/lib/platform` + +source: + - path: main.c + - path: app.c + +define: + - name: OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER + value: 6 + +configuration: + - name: SL_BOARD_ENABLE_VCOM + value: 1 + - name: OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE + value: 0 + - name: OPENTHREAD_CONFIG_LOG_OUTPUT + value: OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED + condition: [ot_rtt_log] + - name: BUFFER_SIZE_UP + value: 768 + condition: [ot_rtt_log] + - name: BUFFER_SIZE_UP + value: 128 + condition: [ot_rtt_log, device_family_efr32mg1] + - name: BUFFER_SIZE_DOWN + value: 0 + condition: [ot_rtt_log] + +filter: + - name: "Wireless Technology" + value: ["Thread"] + - name: "Device Type" + value: ["RCP"] + - name: "Project Difficulty" + value: ["Advanced"] diff --git a/src/ot-rcp/reset_util.h b/src/openthread_rcp/reset_util.h similarity index 100% rename from src/ot-rcp/reset_util.h rename to src/openthread_rcp/reset_util.h diff --git a/src/ot-rcp/.cproject b/src/ot-rcp/.cproject deleted file mode 100644 index f98a010c..00000000 --- a/src/ot-rcp/.cproject +++ /dev/null @@ -1,3059 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ot-rcp/README-OT-RCP.md b/src/ot-rcp/README-OT-RCP.md deleted file mode 100644 index 2263b410..00000000 --- a/src/ot-rcp/README-OT-RCP.md +++ /dev/null @@ -1,15 +0,0 @@ -# Openthread RCP - -This is a Radio Co-Processor (RCP) application that can be used in tandem with an OpenThread POSIX host application, to demonstrate the Co-Processor design of the OpenThread stack. - -In an RCP design, the core of OpenThread lives on the host processor with only a minimal MAC layer "controller" on the device with the Thread radio. The host processor typically doesn’t sleep in this design, in part to ensure reliability of the Thread network. - -Communication between the RCP and the host processor is managed by the OpenThread Daemon through a SPI or UART interface over the Spinel protocol. - -The advantage of this design is that OpenThread can utilize the resources on the more powerful processor. - -This design is useful for devices that are less sensitive to power constraints. For example, the host processor on a video camera is always on to process video. - -OpenThread Border Router supports an RCP design. For more information, refer to *AN1256: Using the Silicon Labs RCP with the OpenThread Border Router*. - -The corresponding host application is located at `util/third_party/ot-br-posix` \ No newline at end of file diff --git a/src/ot-rcp/config/app_properties_config.h b/src/ot-rcp/config/app_properties_config.h deleted file mode 100644 index 6951a569..00000000 --- a/src/ot-rcp/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 \ No newline at end of file diff --git a/src/ot-rcp/config/btl_interface_cfg.h b/src/ot-rcp/config/btl_interface_cfg.h deleted file mode 100644 index 13e09116..00000000 --- a/src/ot-rcp/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 \ No newline at end of file diff --git a/src/ot-rcp/config/btl_interface_cfg_s2c1.h b/src/ot-rcp/config/btl_interface_cfg_s2c1.h deleted file mode 100644 index 7f703143..00000000 --- a/src/ot-rcp/config/btl_interface_cfg_s2c1.h +++ /dev/null @@ -1,281 +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_S2C1_H -#define BTL_INTERFACE_CFG_S2C1_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Bootloader Interface Trust Zone Security State Configuration - -// Disable multi tiered fallback logic -// The fault handling logic as well as the USART auto-detection logic will be disabled. -// The re-configuration of SMU will be handled by querying the running bootloader -// for the peripheral list. Querying the peripheral list is supported from the bootloader -// version 2.0.0. Check for the BOOTLOADER_CAPABILITY_PERIPHERAL_LIST capability to -// see if the running bootloader supports querying the peripheral list. -#define BOOTLOADER_DISABLE_OLD_BOOTLOADER_MITIGATION 0 - -// Disable peripheral access fault handling -// The fault handling triggered by an erroneous access of peripherals will be disabled. -// -// This should be disabled iff all the peripherals that are in use by the bootloader -// have been properly configured by the "Manually override security state of peripherals" option. -#define BOOTLOADER_DISABLE_NVM3_FAULT_HANDLING 0 - -// Manually override the security state of peripherals in use by the bootloader -// Default: 0. -// Manually override the security state of peripherals. Choose the peripherals touched -// by the customized code to have a valid secure access state before interacting with the bootloader -// In practice, this means that the chosen peripherals will be available at the secure address, -// which is accessible by the bootloader. Once the application is entered back the secure access state -// is changed back to the original state. -// -// The USART auto-detection logic that detects which, if any, USART is in use by the bootloader -// will be disabled. Make sure to choose the correct USART used by the bootloader. -#define BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE 0 -// EMU -// Update secure access state of EMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_EMU 0 - -// CMU -// Update secure access state of CMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_CMU 0 - -// HFXO0 -// Update secure access state of HFXO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFXO0 0 - -// HFRCO0 -// Update secure access state of HFRCO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFRCO0 0 - -// FSRCO -// Update secure access state of FSRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_FSRCO 0 - -// DPLL0 -// Update secure access state of DPLL0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_DPLL0 0 - -// LFXO -// Update secure access state of LFXO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFXO 0 - -// LFRCO -// Update secure access state of LFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFRCO 0 - -// ULFRCO -// Update secure access state of ULFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_ULFRCO 0 - -// MSC -// Update secure access state of MSC before calling into bootloader -#define BOOTLOADER_PPUSATD0_MSC 0 - -// ICACHE0 -// Update secure access state of ICACHE0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_ICACHE0 0 - -// PRS -// Update secure access state of PRS before calling into bootloader -#define BOOTLOADER_PPUSATD0_PRS 0 - -// GPIO -// Update secure access state of GPIO before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPIO 0 - -// LDMA -// Update secure access state of LDMA before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMA 0 - -// LDMAXBAR -// Update secure access state of LDMAXBAR before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMAXBAR 0 - -// TIMER0 -// Update secure access state of TIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER0 0 - -// TIMER1 -// Update secure access state of TIMER1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER1 0 - -// TIMER2 -// Update secure access state of TIMER2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER2 0 - -// TIMER3 -// Update secure access state of TIMER3 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER3 0 - -// USART0 -// Update secure access state of USART0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART0 0 - -// USART1 -// Update secure access state of USART1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART1 0 - -// USART2 -// Update secure access state of USART2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART2 0 - -// BURTC -// Update secure access state of BURTC before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURTC 0 - -// I2C1 -// Update secure access state of I2C1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_I2C1 0 - -// CHIPTESTCTRL -// Update secure access state of CHIPTESTCTRL before calling into bootloader -#define BOOTLOADER_PPUSATD0_CHIPTESTCTRL 0 - -// LVGD -// Update secure access state of LVGD before calling into bootloader -#define BOOTLOADER_PPUSATD0_LVGD 0 - -// SYSCFG -// Update secure access state of SYSCFG before calling into bootloader -#define BOOTLOADER_PPUSATD0_SYSCFG 0 - -// BURAM -// Update secure access state of BURAM before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURAM 0 - -// IFADCDEBUG -// Update secure access state of IFADCDEBUG before calling into bootloader -#define BOOTLOADER_PPUSATD0_IFADCDEBUG 0 - -// GPCRC -// Update secure access state of GPCRC before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPCRC 0 - -// RTCC -// Update secure access state of RTCC before calling into bootloader -#define BOOTLOADER_PPUSATD0_RTCC 0 - -// LETIMER0 -// Update secure access state of LETIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_LETIMER0 0 - -// IADC0 -// Update secure access state of IADC0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_IADC0 0 - -// ACMP0 -// Update secure access state of ACMP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP0 0 - -// ACMP1 -// Update secure access state of ACMP1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP1 0 - -// I2C0 -// Update secure access state of I2C0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_I2C0 0 - -// HFRCOEM23 -// Update secure access state of HFRCOEM23 before calling into bootloader -#define BOOTLOADER_PPUSATD1_HFRCOEM23 0 - -// WDOG0 -// Update secure access state of WDOG0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG0 0 - -// WDOG1 -// Update secure access state of WDOG1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG1 0 - -// AMUXCP0 -// Update secure access state of AMUXCP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_AMUXCP0 0 - -// RADIOAES -// Update secure access state of RADIOAES before calling into bootloader -#define BOOTLOADER_PPUSATD1_RADIOAES 0 - -// BUFC -// Update secure access state of BUFC before calling into bootloader -#define BOOTLOADER_PPUSATD1_BUFC 0 - -// SMU -// Update secure access state of SMU before calling into bootloader -#define BOOTLOADER_PPUSATD1_SMU 0 - -// AHBRADIO -// Update secure access state of AHBRADIO before calling into bootloader -#define BOOTLOADER_PPUSATD1_AHBRADIO 0 - -// SEMAILBOX -// Update secure access state of SEMAILBOX before calling into bootloader -#define BOOTLOADER_PPUSATD1_SEMAILBOX 0 -// - -// -// <<< end of configuration section >>> - -#if BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE == 1 -#define BOOTLOADER_PPUSATD0_MASK ((BOOTLOADER_PPUSATD0_EMU << _SMU_PPUSATD0_EMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CMU << _SMU_PPUSATD0_CMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFXO0 << _SMU_PPUSATD0_HFXO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFRCO0 << _SMU_PPUSATD0_HFRCO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_FSRCO << _SMU_PPUSATD0_FSRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_DPLL0 << _SMU_PPUSATD0_DPLL0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFXO << _SMU_PPUSATD0_LFXO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFRCO << _SMU_PPUSATD0_LFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ULFRCO << _SMU_PPUSATD0_ULFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_MSC << _SMU_PPUSATD0_MSC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ICACHE0 << _SMU_PPUSATD0_ICACHE0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_PRS << _SMU_PPUSATD0_PRS_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPIO << _SMU_PPUSATD0_GPIO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMA << _SMU_PPUSATD0_LDMA_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMAXBAR << _SMU_PPUSATD0_LDMAXBAR_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER0 << _SMU_PPUSATD0_TIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER1 << _SMU_PPUSATD0_TIMER1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER2 << _SMU_PPUSATD0_TIMER2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER3 << _SMU_PPUSATD0_TIMER3_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART0 << _SMU_PPUSATD0_USART0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART1 << _SMU_PPUSATD0_USART1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART2 << _SMU_PPUSATD0_USART2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURTC << _SMU_PPUSATD0_BURTC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_I2C1 << _SMU_PPUSATD0_I2C1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CHIPTESTCTRL << _SMU_PPUSATD0_CHIPTESTCTRL_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LVGD << _SMU_PPUSATD0_LVGD_SHIFT) \ - | (BOOTLOADER_PPUSATD0_SYSCFG << _SMU_PPUSATD0_SYSCFG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURAM << _SMU_PPUSATD0_BURAM_SHIFT) \ - | (BOOTLOADER_PPUSATD0_IFADCDEBUG << _SMU_PPUSATD0_IFADCDEBUG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPCRC << _SMU_PPUSATD0_GPCRC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_RTCC << _SMU_PPUSATD0_RTCC_SHIFT)) -#define BOOTLOADER_PPUSATD1_MASK ((BOOTLOADER_PPUSATD1_LETIMER0 << _SMU_PPUSATD1_LETIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_IADC0 << _SMU_PPUSATD1_IADC0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP0 << _SMU_PPUSATD1_ACMP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP1 << _SMU_PPUSATD1_ACMP1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_I2C0 << _SMU_PPUSATD1_I2C0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_HFRCOEM23 << _SMU_PPUSATD1_HFRCOEM23_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG0 << _SMU_PPUSATD1_WDOG0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG1 << _SMU_PPUSATD1_WDOG1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AMUXCP0 << _SMU_PPUSATD1_AMUXCP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_RADIOAES << _SMU_PPUSATD1_RADIOAES_SHIFT) \ - | (BOOTLOADER_PPUSATD1_BUFC << _SMU_PPUSATD1_BUFC_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SMU << _SMU_PPUSATD1_SMU_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AHBRADIO << _SMU_PPUSATD1_AHBRADIO_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SEMAILBOX << _SMU_PPUSATD1_SEMAILBOX_SHIFT)) -#endif // BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE - -#endif // BTL_INTERFACE_CFG_S2C1_H \ No newline at end of file diff --git a/src/ot-rcp/config/dmadrv_config.h b/src/ot-rcp/config/dmadrv_config.h deleted file mode 100644 index be24f49d..00000000 --- a/src/ot-rcp/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-15> -// Priority of the DMA interrupt. Smaller number equals higher priority. -// Default: 8 -#define EMDRV_DMADRV_DMA_IRQ_PRIORITY 8 - -// 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 \ No newline at end of file diff --git a/src/ot-rcp/config/emlib_core_debug_config.h b/src/ot-rcp/config/emlib_core_debug_config.h deleted file mode 100644 index e4a01682..00000000 --- a/src/ot-rcp/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/src/ot-rcp/config/nvm3_default_config.h b/src/ot-rcp/config/nvm3_default_config.h deleted file mode 100644 index 48218391..00000000 --- a/src/ot-rcp/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: 40960 -#define NVM3_DEFAULT_NVM_SIZE 40960 -#endif - -// - -// <<< end of configuration section >>> - -#endif // NVM3_DEFAULT_CONFIG_H \ No newline at end of file diff --git a/src/ot-rcp/config/pin_config.h b/src/ot-rcp/config/pin_config.h deleted file mode 100644 index 552874a5..00000000 --- a/src/ot-rcp/config/pin_config.h +++ /dev/null @@ -1,189 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[CMU] -// [CMU]$ - -// $[LFXO] -// LFXO LFXTAL_I on PD01 -#ifndef LFXO_LFXTAL_I_PORT -#define LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_I_PIN -#define LFXO_LFXTAL_I_PIN 1 -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef LFXO_LFXTAL_O_PORT -#define LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_O_PIN -#define LFXO_LFXTAL_O_PIN 0 -#endif - -// [LFXO]$ - -// $[PRS.ASYNCH0] -// [PRS.ASYNCH0]$ - -// $[PRS.ASYNCH1] -// [PRS.ASYNCH1]$ - -// $[PRS.ASYNCH2] -// [PRS.ASYNCH2]$ - -// $[PRS.ASYNCH3] -// [PRS.ASYNCH3]$ - -// $[PRS.ASYNCH4] -// [PRS.ASYNCH4]$ - -// $[PRS.ASYNCH5] -// [PRS.ASYNCH5]$ - -// $[PRS.ASYNCH6] -// [PRS.ASYNCH6]$ - -// $[PRS.ASYNCH7] -// [PRS.ASYNCH7]$ - -// $[PRS.ASYNCH8] -// [PRS.ASYNCH8]$ - -// $[PRS.ASYNCH9] -// [PRS.ASYNCH9]$ - -// $[PRS.ASYNCH10] -// [PRS.ASYNCH10]$ - -// $[PRS.ASYNCH11] -// [PRS.ASYNCH11]$ - -// $[PRS.SYNCH0] -// [PRS.SYNCH0]$ - -// $[PRS.SYNCH1] -// [PRS.SYNCH1]$ - -// $[PRS.SYNCH2] -// [PRS.SYNCH2]$ - -// $[PRS.SYNCH3] -// [PRS.SYNCH3]$ - -// $[GPIO] -// GPIO SWV on PA03 -#ifndef GPIO_SWV_PORT -#define GPIO_SWV_PORT gpioPortA -#endif -#ifndef GPIO_SWV_PIN -#define GPIO_SWV_PIN 3 -#endif - -// [GPIO]$ - -// $[TIMER0] -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[TIMER2] -// [TIMER2]$ - -// $[TIMER3] -// [TIMER3]$ - -// $[USART0] -// USART0 CTS on PC03 -#ifndef USART0_CTS_PORT -#define USART0_CTS_PORT gpioPortC -#endif -#ifndef USART0_CTS_PIN -#define USART0_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef USART0_RTS_PORT -#define USART0_RTS_PORT gpioPortC -#endif -#ifndef USART0_RTS_PIN -#define USART0_RTS_PIN 2 -#endif - -// USART0 RX on PA06 -#ifndef USART0_RX_PORT -#define USART0_RX_PORT gpioPortA -#endif -#ifndef USART0_RX_PIN -#define USART0_RX_PIN 6 -#endif - -// USART0 TX on PA05 -#ifndef USART0_TX_PORT -#define USART0_TX_PORT gpioPortA -#endif -#ifndef USART0_TX_PIN -#define USART0_TX_PIN 5 -#endif - -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[I2C1] -// [I2C1]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[IADC0] -// [IADC0]$ - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[I2C0] -// [I2C0]$ - -// $[PTI] -// PTI DFRAME on PC05 -#ifndef PTI_DFRAME_PORT -#define PTI_DFRAME_PORT gpioPortC -#endif -#ifndef PTI_DFRAME_PIN -#define PTI_DFRAME_PIN 5 -#endif - -// PTI DOUT on PC04 -#ifndef PTI_DOUT_PORT -#define PTI_DOUT_PORT gpioPortC -#endif -#ifndef PTI_DOUT_PIN -#define PTI_DOUT_PIN 4 -#endif - -// [PTI]$ - -// $[MODEM] -// [MODEM]$ - -// $[CUSTOM_PIN_NAME] -#ifndef _PORT -#define _PORT gpioPortA -#endif -#ifndef _PIN -#define _PIN 0 -#endif - -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - diff --git a/src/ot-rcp/config/psa_crypto_config.h b/src/ot-rcp/config/psa_crypto_config.h deleted file mode 100644 index a17b0efc..00000000 --- a/src/ot-rcp/config/psa_crypto_config.h +++ /dev/null @@ -1,170 +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 - -// - -// Power optimization configuration - -// Store already-generated random bytes before putting the device to sleep -// Using the hardware TRNG (for example through psa_generate_random()) will -// consume a non-negligible amount of power. A start-up routine must pass -// and a relatively large minimum amount of random bytes will be generated. -// Use cases where the device is frequently entering EM2/EM3 and thereafter -// consumes a small amount of data from the TRNG may benefit from buffering -// the existing random bytes before putting the device to sleep. These -// buffered bytes are then consumed until exhaustion before the TRNG needs -// to be initialized and used again. -// -// NOTE: this configuration option is only applicable for devices with a -// Virtual Secure Engine (VSE), and requires the 'Power Manager' component -// to be included in the project. -// -// Default: 0 -#define SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP (0) - -// Number of random words to buffer before putting the device to sleep <1-63> -// This option can be used to decrease the amount of random words that -// (if enabled) are buffered before the device enters EM2/EM3. Lowering this -// number will result in less static RAM usage, but also means that the TRNG -// potentially has to be initialized more times--leading to increased power -// consumption. By default this option in configured to buffer as much TRNG -// data as possible (limited by the depth of the TRNG FIFO). -// -// NOTE: this configuration option is only applicable when -// SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP is enabled. -// -// Default: 63 -#define SL_VSE_MAX_TRNG_WORDS_BUFFERED_DURING_SLEEP (63) -// - -// - -// <<< 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/src/ot-rcp/config/sl_board_control_config.h b/src/ot-rcp/config/sl_board_control_config.h deleted file mode 100644 index f1804587..00000000 --- a/src/ot-rcp/config/sl_board_control_config.h +++ /dev/null @@ -1,56 +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 Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 1 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#ifndef SL_BOARD_ENABLE_VCOM_PORT -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD -#endif -#ifndef SL_BOARD_ENABLE_VCOM_PIN -#define SL_BOARD_ENABLE_VCOM_PIN 4 -#endif -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/src/ot-rcp/config/sl_debug_swo_config.h b/src/ot-rcp/config/sl_debug_swo_config.h deleted file mode 100644 index fee7e65d..00000000 --- a/src/ot-rcp/config/sl_debug_swo_config.h +++ /dev/null @@ -1,106 +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 -// $[GPIO_SL_DEBUG] -#ifndef SL_DEBUG_PERIPHERAL -#define SL_DEBUG_PERIPHERAL GPIO -#endif - -// GPIO SWV on PA03 -#ifndef SL_DEBUG_SWV_PORT -#define SL_DEBUG_SWV_PORT gpioPortA -#endif -#ifndef SL_DEBUG_SWV_PIN -#define SL_DEBUG_SWV_PIN 3 -#endif -// [GPIO_SL_DEBUG]$ -// <<< sl:end pin_tool >>> - -#endif // SL_DEBUG_SWO_CONFIG_H diff --git a/src/ot-rcp/config/sl_device_init_emu_config.h b/src/ot-rcp/config/sl_device_init_emu_config.h deleted file mode 100644 index f23d055b..00000000 --- a/src/ot-rcp/config/sl_device_init_emu_config.h +++ /dev/null @@ -1,53 +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 >>> - -// Allow debugger to remain connected in EM2 -// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. -// Enabling debug connectivity results in an increased power consumption in EM2/EM3. -// Default: 1 -#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 - -// 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 \ No newline at end of file diff --git a/src/ot-rcp/config/sl_device_init_hfrco_config.h b/src/ot-rcp/config/sl_device_init_hfrco_config.h deleted file mode 100644 index 532885ae..00000000 --- a/src/ot-rcp/config/sl_device_init_hfrco_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_HFRCO 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_HFRCO_CONFIG_H -#define SL_DEVICE_INIT_HFRCO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Frequency Band -// RC Oscillator Frequency Band -// 1 MHz -// 2 MHz -// 4 MHz -// 7 MHz -// 13 MHz -// 16 MHz -// 19 MHz -// 26 MHz -// 32 MHz -// 38 MHz -// 48 MHz -// 56 MHz -// 64 MHz -// 80 MHz -// Default: cmuHFRCODPLLFreq_80M0Hz -#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H \ No newline at end of file diff --git a/src/ot-rcp/config/sl_device_init_hfxo_config.h b/src/ot-rcp/config/sl_device_init_hfxo_config.h deleted file mode 100644 index 917e60a6..00000000 --- a/src/ot-rcp/config/sl_device_init_hfxo_config.h +++ /dev/null @@ -1,57 +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 sine wave -// Default: cmuHfxoOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_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-255> -// Default: 140 -#define SL_DEVICE_INIT_HFXO_CTUNE 133 - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H \ No newline at end of file diff --git a/src/ot-rcp/config/sl_device_init_lfxo_config.h b/src/ot-rcp/config/sl_device_init_lfxo_config.h deleted file mode 100644 index d2cd25f5..00000000 --- a/src/ot-rcp/config/sl_device_init_lfxo_config.h +++ /dev/null @@ -1,93 +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: cmuLfxoOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 79 - -// LFXO precision in PPM <0-65535> -// Default: 50 -#define SL_DEVICE_INIT_LFXO_PRECISION 50 - -// Startup Timeout Delay -// -// 2 cycles -// 256 cycles -// 1K cycles -// 2K cycles -// 4K cycles -// 8K cycles -// 16K cycles -// 32K cycles -// Default: cmuLfxoStartupDelay_4KCycles -#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_DEVICE_INIT_LFXO -// $[LFXO_SL_DEVICE_INIT_LFXO] -#ifndef SL_DEVICE_INIT_LFXO_PERIPHERAL -#define SL_DEVICE_INIT_LFXO_PERIPHERAL LFXO -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN 0 -#endif - -// LFXO LFXTAL_I on PD01 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN 1 -#endif - -// [LFXO_SL_DEVICE_INIT_LFXO]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/src/ot-rcp/config/sl_mbedtls_config.h b/src/ot-rcp/config/sl_mbedtls_config.h deleted file mode 100644 index 5ebefc9a..00000000 --- a/src/ot-rcp/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/src/ot-rcp/config/sl_mbedtls_device_config.h b/src/ot-rcp/config/sl_mbedtls_device_config.h deleted file mode 100644 index e286a0d9..00000000 --- a/src/ot-rcp/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 \ No newline at end of file diff --git a/src/ot-rcp/config/sl_memory_config.h b/src/ot-rcp/config/sl_memory_config.h deleted file mode 100644 index 9acd1505..00000000 --- a/src/ot-rcp/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 \ No newline at end of file diff --git a/src/ot-rcp/config/sl_openthread_features_config.h b/src/ot-rcp/config/sl_openthread_features_config.h deleted file mode 100644 index 0bb69678..00000000 --- a/src/ot-rcp/config/sl_openthread_features_config.h +++ /dev/null @@ -1,327 +0,0 @@ -#ifndef _SL_OPENTHREAD_FEATURES_CONFIG_H -#define _SL_OPENTHREAD_FEATURES_CONFIG_H -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Default OpenThread Stack Configuration - -// Thread Stack Protocol Version -// -// Thread 1.1 -// Thread 1.2 -// Thread 1.3 -// Thread 1.2 and Thread 1.3 are compatible with Thread 1.1. -// Current Default: OT_THREAD_VERSION_1_3 -#ifndef OPENTHREAD_CONFIG_THREAD_VERSION -#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_3 -#endif -// - -#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) -// The following features require at least Thread Stack Protocol Version 1.2 -// Backbone Router -#ifndef OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE -#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 0 -#endif -// CSL Auto Synchronization using data polling -#ifndef OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE -#define OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE 1 -#endif -// CSL (Coordinated Sampled Listening) Debug -#ifndef OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE -#define OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE 0 -#endif -// CSL (Coordinated Sampled Listening) Receiver -#ifndef OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE -#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1 -#endif -// CSL Scheduling Uncertainty (±10 us units) <12..999:1> -#ifndef SL_OPENTHREAD_CSL_TX_UNCERTAINTY -#if OPENTHREAD_RADIO - #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 175 -#elif OPENTHREAD_FTD - #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 20 -#else - #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 12 -#endif -#endif -// DUA (Domain Unicast Address) -#ifndef OPENTHREAD_CONFIG_DUA_ENABLE -#define OPENTHREAD_CONFIG_DUA_ENABLE 1 -#endif -// Link Metrics Initiator -#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1 -#endif -// Link Metrics Subject -#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1 -#endif -// Multicast Listener Registration -#ifndef OPENTHREAD_CONFIG_MLR_ENABLE -#define OPENTHREAD_CONFIG_MLR_ENABLE 1 -#endif -// DNS Client (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 -#endif -// DNS-SD Server (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE -#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0 -#endif -// Service Registration Protocol (SRP) Client (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 -#endif -// Service Registration Protocol (SRP) Server (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_SRP_SERVER_ENABLE -#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0 -#endif -// TCPlp (Low power TCP over OpenThread) (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_TCP_ENABLE -#define OPENTHREAD_CONFIG_TCP_ENABLE 0 -#endif -// Thread over Infrastructure (Thread 1.3: NCP only) -#ifndef OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE -#define OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE 0 -#endif -// -#endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 - -// Border Agent -#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE -#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 -#endif -// -// Border Router -#ifndef OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE -#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 -#endif -// -// Channel Manager -#ifndef OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE -#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 0 -#endif -// -// Channel Monitor -#ifndef OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE -#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 0 -#endif -// - -// Commissioner -#ifndef OPENTHREAD_CONFIG_COMMISSIONER_ENABLE -#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 -#endif - -// Max Joiner Entries -// The maximum number of Joiner entries maintained by the Commissioner. -// 2 -#ifndef OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES -#define OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES 2 -#endif -// - -// COAP API -#ifndef OPENTHREAD_CONFIG_COAP_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_API_ENABLE 0 -#endif -// -// COAP Observe (RFC7641) API -#ifndef OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE 0 -#endif -// -// COAP Secure API -#ifndef OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 -#endif -// -// DHCP6 Client -#ifndef OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 -#endif -// -// DHCP6 Server -#ifndef OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE -#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 -#endif -// -// Diagnostic -#ifndef OPENTHREAD_CONFIG_DIAG_ENABLE -#define OPENTHREAD_CONFIG_DIAG_ENABLE 0 -#endif -// -// ECDSA (Elliptic Curve Digital Signature Algorithm) (Required for Matter support) -#ifndef OPENTHREAD_CONFIG_ECDSA_ENABLE -#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 -#endif -// -// External Heap -#ifndef OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE -#define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0 -#endif -// -// IPv6 Fragmentation -#ifndef OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE -#define OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE 0 -#endif -// -// Maximum number of IPv6 unicast addresses allowed to be externally added -#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS -#define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 4 -#endif -// -// Maximum number of IPv6 multicast addresses allowed to be externally added -#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS -#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 4 -#endif -// -// Jam Detection -#ifndef OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE -#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0 -#endif -// -// Joiner -#ifndef OPENTHREAD_CONFIG_JOINER_ENABLE -#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 -#endif -// -// Link Raw Service -#ifndef OPENTHREAD_CONFIG_LINK_RAW_ENABLE -#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 0 -#endif -// -// MAC Filter -#ifndef OPENTHREAD_CONFIG_MAC_FILTER_ENABLE -#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 0 -#endif -// -// MLE Long Routes extension (experimental) -#ifndef OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE -#define OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE 0 -#endif -// -// MultiPAN RCP -#ifndef OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE -#define OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE 0 -#endif -// -// Multiple OpenThread Instances -#ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE -#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0 -#endif -// -// OTNS (OpenThread Network Simulator) -#ifndef OPENTHREAD_CONFIG_OTNS_ENABLE -#define OPENTHREAD_CONFIG_OTNS_ENABLE 0 -#endif -// -// Ping Sender Module -#ifndef OPENTHREAD_CONFIG_PING_SENDER_ENABLE -#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1 -#endif -// -// Platform UDP -#ifndef OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE -#define OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 0 -#endif -// -// Reference Device for Thread Test Harness -#ifndef OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE -#define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0 -#endif -// -// Service Entries in Thread Network Data -#ifndef OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE -#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 0 -#endif -// -// RAM (volatile-only storage) -#ifndef OPENTHREAD_SETTINGS_RAM -#define OPENTHREAD_SETTINGS_RAM 0 -#endif -// -// SLAAC Addresses -#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE -#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 -#endif -// -// SNTP Client -#ifndef OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 0 -#endif -// -// TMF Network Diagnostic client API -#ifndef OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE 1 -#endif -// -// Time Synchronization Service -#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0 -// -// UDP Forward -#ifndef OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE -#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0 -#endif -// -// Enable Mac beacon payload parsing support -#ifndef OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE -#define OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE 1 -#endif -// -// -// Logging -// LOG_OUTPUT -// NONE -// APP -// PLATFORM_DEFINED -// Default: OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED -#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP -#endif - -// DYNAMIC_LOG_LEVEL -#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE -#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0 -#endif - -// Enable Logging -#define OPENTHREAD_FULL_LOGS_ENABLE 0 -#if OPENTHREAD_FULL_LOGS_ENABLE - -// Note: Enabling higher log levels, which include logging packet details, can cause delays which may result in join failures. -// LOG_LEVEL -// NONE -// CRIT -// WARN -// NOTE -// INFO -// DEBG -// Default: OT_LOG_LEVEL_DEBG -#ifndef OPENTHREAD_CONFIG_LOG_LEVEL -#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG -#endif -// CLI -#ifndef OPENTHREAD_CONFIG_LOG_CLI -#define OPENTHREAD_CONFIG_LOG_CLI 1 -#endif -// PKT_DUMP -#ifndef OPENTHREAD_CONFIG_LOG_PKT_DUMP -#define OPENTHREAD_CONFIG_LOG_PKT_DUMP 1 -#endif -// PLATFORM -#ifndef OPENTHREAD_CONFIG_LOG_PLATFORM -#define OPENTHREAD_CONFIG_LOG_PLATFORM 1 -#endif -// PREPEND_LEVEL -#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL -#define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 1 -#endif - -#endif -// -// -// - -// <<< end of configuration section >>> -#endif // _SL_OPENTHREAD_FEATURES_CONFIG_H \ No newline at end of file diff --git a/src/ot-rcp/config/sl_openthread_generic_config.h b/src/ot-rcp/config/sl_openthread_generic_config.h deleted file mode 100644 index 28bbfae1..00000000 --- a/src/ot-rcp/config/sl_openthread_generic_config.h +++ /dev/null @@ -1,148 +0,0 @@ -/* include/openthread-config-generic.h. Generated from openthread-config-generic.h.in by configure. */ -/* include/openthread-config-generic.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to 1 if your C++ compiler doesn't accept -c and -o together. */ -/* #undef CXX_NO_MINUS_C_MINUS_O */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `edit' library (-ledit). */ -/* #undef HAVE_LIBEDIT */ - -/* Define to 1 if you have the `readline' library (-lreadline). */ -/* #undef HAVE_LIBREADLINE */ - -/* Define to 1 if you have the `memcpy' function. */ -/* #undef HAVE_MEMCPY */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Name of package */ -#define PACKAGE "openthread" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "openthread-devel@googlegroups.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "SL-OPENTHREAD" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "SL-OPENTHREAD/2.4.0.0_GitHub-7074a43e4" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "openthread" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://github.com/openthread/openthread" - -/* Define to the version of this package. - * Note: When adding the label below with OpenThread version, please make - * sure it is a valid GitHub version. Avoid merge or local commit hashes. - */ -#define PACKAGE_VERSION "2.4.0.0_GitHub-7074a43e4" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "2.4.0.0_GitHub-7074a43e4" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT32_T */ - -/* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT64_T */ - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to the type of a signed integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int16_t */ - -/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int32_t */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -/* #undef int8_t */ - -/* Define to the type of an unsigned integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint16_t */ - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint32_t */ - -/* Define to the type of an unsigned integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint64_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ \ No newline at end of file diff --git a/src/ot-rcp/config/sl_rail_util_pa_config.h b/src/ot-rcp/config/sl_rail_util_pa_config.h deleted file mode 100644 index 84b836c2..00000000 --- a/src/ot-rcp/config/sl_rail_util_pa_config.h +++ /dev/null @@ -1,81 +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 -// Highest Possible -// High Power (chip-specific) -// Medium Power (chip-specific) -// Low Power -// Disable -// Default: RAIL_TX_POWER_MODE_2P4GIG_HIGHEST -#define SL_RAIL_UTIL_PA_SELECTION_2P4GHZ RAIL_TX_POWER_MODE_2P4GIG_HIGHEST -// Sub-1 GHz PA Selection -// Disable -// Default: RAIL_TX_POWER_MODE_NONE -#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 \ No newline at end of file diff --git a/src/ot-rcp/config/sl_rail_util_pti_config.h b/src/ot-rcp/config/sl_rail_util_pti_config.h deleted file mode 100644 index de9d71ae..00000000 --- a/src/ot-rcp/config/sl_rail_util_pti_config.h +++ /dev/null @@ -1,82 +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 PC04 -#ifndef SL_RAIL_UTIL_PTI_DOUT_PORT -#define SL_RAIL_UTIL_PTI_DOUT_PORT gpioPortC -#endif -#ifndef SL_RAIL_UTIL_PTI_DOUT_PIN -#define SL_RAIL_UTIL_PTI_DOUT_PIN 4 -#endif - -// PTI DFRAME on PC05 -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PORT -#define SL_RAIL_UTIL_PTI_DFRAME_PORT gpioPortC -#endif -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PIN -#define SL_RAIL_UTIL_PTI_DFRAME_PIN 5 -#endif - -// [PTI_SL_RAIL_UTIL_PTI]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_RAIL_UTIL_PTI_CONFIG_H diff --git a/src/ot-rcp/config/sl_rail_util_rf_path_config.h b/src/ot-rcp/config/sl_rail_util_rf_path_config.h deleted file mode 100644 index 464e91c3..00000000 --- a/src/ot-rcp/config/sl_rail_util_rf_path_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @file - * @brief - ******************************************************************************* - * # 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_RF_PATH_CONFIG_H -#define SL_RAIL_UTIL_RF_PATH_CONFIG_H - -#include "rail_types.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// Chip-internal RF Path Configuration -// RF Path Mode -// Path 0 -// Path 1 -// Default: RAIL_ANTENNA_1 -#define SL_RAIL_UTIL_RF_PATH_INT_RF_PATH_MODE RAIL_ANTENNA_1 -// - -// <<< end of configuration section >>> - -#endif // SL_RAIL_UTIL_RF_PATH_CONFIG_H \ No newline at end of file diff --git a/src/ot-rcp/config/sl_rail_util_rssi_config.h b/src/ot-rcp/config/sl_rail_util_rssi_config.h deleted file mode 100644 index 1365e6e5..00000000 --- a/src/ot-rcp/config/sl_rail_util_rssi_config.h +++ /dev/null @@ -1,44 +0,0 @@ -/***************************************************************************//** - * @file - * @brief RSSI configuration header 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_RSSI_CONFIG_H -#define SL_RAIL_UTIL_RSSI_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// RSSI Offset Configuration - -// Software RSSI offset value -// Default: -11 -#define SL_RAIL_UTIL_RSSI_OFFSET -11 - -// -// <<< end of configuration section >>> -#endif // SL_RAIL_UTIL_RSSI_CONFIG_H \ No newline at end of file diff --git a/src/ot-rcp/config/sl_rcp_gp_interface_config.h b/src/ot-rcp/config/sl_rcp_gp_interface_config.h deleted file mode 100644 index cbf00dd5..00000000 --- a/src/ot-rcp/config/sl_rcp_gp_interface_config.h +++ /dev/null @@ -1,14 +0,0 @@ -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- - -// Rx Offset time -// The rx offset time for the bidirectional message. -// -#define GP_RX_OFFSET_IN_MICRO_SECONDS 21000 -// - -// TX Timeout -// Tx timeout after which the gp outgoing packet is invalid. -// -#define GP_TX_MAX_TIMEOUT_IN_MICRO_SECONDS 5000000 -// -// <<< end of configuration section >>> diff --git a/src/ot-rcp/config/sl_sleeptimer_config.h b/src/ot-rcp/config/sl_sleeptimer_config.h deleted file mode 100644 index bba646d6..00000000 --- a/src/ot-rcp/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 >>> \ No newline at end of file diff --git a/src/ot-rcp/config/sl_uartdrv_usart_vcom_config.h b/src/ot-rcp/config/sl_uartdrv_usart_vcom_config.h deleted file mode 100644 index 56faf848..00000000 --- a/src/ot-rcp/config/sl_uartdrv_usart_vcom_config.h +++ /dev/null @@ -1,133 +0,0 @@ -/***************************************************************************//** - * @file - * @brief UARTDRV_USART 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_UARTDRV_USART_VCOM_CONFIG_H -#define SL_UARTDRV_USART_VCOM_CONFIG_H - -#include "em_usart.h" -// <<< Use Configuration Wizard in Context Menu >>> - -// UART settings -// Baud rate -// Default: 115200 -#define SL_UARTDRV_USART_VCOM_BAUDRATE 460800 - -// Parity mode to use -// No Parity -// Even parity -// Odd parity -// Default: usartNoParity -#define SL_UARTDRV_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_UARTDRV_USART_VCOM_STOP_BITS usartStopbits1 - -// Flow control method -// None -// Software XON/XOFF -// nRTS/nCTS hardware handshake -// UART peripheral controls nRTS/nCTS -// Default: uartdrvFlowControlHwUart -#define SL_UARTDRV_USART_VCOM_FLOW_CONTROL_TYPE uartdrvFlowControlHwUart - -// Oversampling selection -// 16x oversampling -// 8x oversampling -// 6x oversampling -// 4x oversampling -// Default: usartOVS16 -#define SL_UARTDRV_USART_VCOM_OVERSAMPLING usartOVS4 - -// Majority vote disable for 16x, 8x and 6x oversampling modes -// True -// False -#define SL_UARTDRV_USART_VCOM_MVDIS false - -// Size of the receive operation queue -// Default: 6 -#define SL_UARTDRV_USART_VCOM_RX_BUFFER_SIZE 6 - -// Size of the transmit operation queue -// Default: 6 -#define SL_UARTDRV_USART_VCOM_TX_BUFFER_SIZE 6 - -// -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_UARTDRV_USART_VCOM -// $[USART_SL_UARTDRV_USART_VCOM] -#ifndef SL_UARTDRV_USART_VCOM_PERIPHERAL -#define SL_UARTDRV_USART_VCOM_PERIPHERAL USART0 -#endif -#ifndef SL_UARTDRV_USART_VCOM_PERIPHERAL_NO -#define SL_UARTDRV_USART_VCOM_PERIPHERAL_NO 0 -#endif - -// USART0 TX on PA05 -#ifndef SL_UARTDRV_USART_VCOM_TX_PORT -#define SL_UARTDRV_USART_VCOM_TX_PORT gpioPortA -#endif -#ifndef SL_UARTDRV_USART_VCOM_TX_PIN -#define SL_UARTDRV_USART_VCOM_TX_PIN 5 -#endif - -// USART0 RX on PA06 -#ifndef SL_UARTDRV_USART_VCOM_RX_PORT -#define SL_UARTDRV_USART_VCOM_RX_PORT gpioPortA -#endif -#ifndef SL_UARTDRV_USART_VCOM_RX_PIN -#define SL_UARTDRV_USART_VCOM_RX_PIN 6 -#endif - -// USART0 CTS on PC03 -#ifndef SL_UARTDRV_USART_VCOM_CTS_PORT -#define SL_UARTDRV_USART_VCOM_CTS_PORT gpioPortC -#endif -#ifndef SL_UARTDRV_USART_VCOM_CTS_PIN -#define SL_UARTDRV_USART_VCOM_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef SL_UARTDRV_USART_VCOM_RTS_PORT -#define SL_UARTDRV_USART_VCOM_RTS_PORT gpioPortC -#endif -#ifndef SL_UARTDRV_USART_VCOM_RTS_PIN -#define SL_UARTDRV_USART_VCOM_RTS_PIN 2 -#endif -// [USART_SL_UARTDRV_USART_VCOM]$ -// <<< sl:end pin_tool >>> - -#endif // SL_UARTDRV_USART_VCOM_CONFIG_H diff --git a/src/ot-rcp/config/uartdrv_config.h b/src/ot-rcp/config/uartdrv_config.h deleted file mode 100644 index e82ed6a4..00000000 --- a/src/ot-rcp/config/uartdrv_config.h +++ /dev/null @@ -1,114 +0,0 @@ -/***************************************************************************//** - * @file - * @brief UARTDRV configuration file. - ******************************************************************************* - * # 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. - * - ******************************************************************************/ -#ifndef __SILICON_LABS_UARTDRV_CONFIG_H__ -#define __SILICON_LABS_UARTDRV_CONFIG_H__ - -/***************************************************************************//** - * @addtogroup uartdrv - * @{ - ******************************************************************************/ -/// Size of the receive operation queue. -/// @details -/// The maximum number of receive operations that can be queued up for one -/// driver instance before @ref UARTDRV_Receive() returns -/// @ref ECODE_EMDRV_UARTDRV_QUEUE_FULL. -/// @note -/// This macro is not used by the UARTDRV itself, but is intended to be used -/// with the @ref DEFINE_BUF_QUEUE macro by the user of the driver to allocate -/// instances of the @ref UARTDRV_Buffer_FifoQueue_t struct. -#if !defined(EMDRV_UARTDRV_MAX_CONCURRENT_RX_BUFS) -#define EMDRV_UARTDRV_MAX_CONCURRENT_RX_BUFS 6 -#endif - -/// Size of the transmit operation queue. -/// @details -/// The maximum number of transmit operations that can be queued up for one -/// driver instance before @ref UARTDRV_Transmit() returns -/// @ref ECODE_EMDRV_UARTDRV_QUEUE_FULL. -/// @note -/// This macro is not used by the UARTDRV itself, but is intended to be used -/// with the @ref DEFINE_BUF_QUEUE macro by the user of the driver to allocate -/// instances of the @ref UARTDRV_Buffer_FifoQueue_t struct. -#if !defined(EMDRV_UARTDRV_MAX_CONCURRENT_TX_BUFS) -#define EMDRV_UARTDRV_MAX_CONCURRENT_TX_BUFS 6 -#endif - -// <<< Use Configuration Wizard in Context Menu >>> -// UARTDRV Settings - -/// Set to 1 to include flow control support -#if !defined(EMDRV_UARTDRV_FLOW_CONTROL_ENABLE) -// Flow control support -// <1=> Enable -// <0=> Disable -// Default: 1 -#define EMDRV_UARTDRV_FLOW_CONTROL_ENABLE 1 -#endif - -/// Maximum number of driver instances. -#if !defined(EMDRV_UARTDRV_MAX_DRIVER_INSTANCES) -// Maximum number of driver instances -// This maximum only applies when UARTDRV_FLOW_CONTROL_ENABLE = 1 -// Default: 4 -#define EMDRV_UARTDRV_MAX_DRIVER_INSTANCES 4 -#endif - -/// UART software flow control code: request peer to start TX -#if !defined(UARTDRV_FC_SW_XON) -// UART software flow control code: request peer to start TX -// Default: 0x11 -#define UARTDRV_FC_SW_XON 0x11 -#endif - -/// UART software flow control code: request peer to stop TX -#if !defined(UARTDRV_FC_SW_XOFF) -// UART software flow control code: request peer to stop TX -// Default: 0x13 -#define UARTDRV_FC_SW_XOFF 0x13 -#endif - -/// UART enable reception when sleeping. -#if !defined(UARTDRV_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION) -// Enable reception when sleeping -// Enable reception when sleeping will use the power manager and add EM1 -// requirement during receive operations that use DMA. -// <1=> Enable -// <0=> Disable -// Default: 1 -#define UARTDRV_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION 1 -#endif - -// - -// <<< end of configuration section >>> - -/** @} (end addtogroup uartdrv) */ - -#endif /* __SILICON_LABS_UARTDRV_CONFIG_H__ */ \ No newline at end of file diff --git a/src/ot-rcp/gbl_metadata.yaml b/src/ot-rcp/gbl_metadata.yaml deleted file mode 100644 index 219ce851..00000000 --- a/src/ot-rcp/gbl_metadata.yaml +++ /dev/null @@ -1,3 +0,0 @@ -baudrate: 460800 -dynamic: [ot_rcp_version] -fw_type: ot-rcp diff --git a/src/ot-rcp/ot-rcp.pintool b/src/ot-rcp/ot-rcp.pintool deleted file mode 100644 index adf96d27..00000000 --- a/src/ot-rcp/ot-rcp.pintool +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ot-rcp/ot-rcp.slcp b/src/ot-rcp/ot-rcp.slcp deleted file mode 100644 index b403f68a..00000000 --- a/src/ot-rcp/ot-rcp.slcp +++ /dev/null @@ -1,59 +0,0 @@ -# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. -project_name: ot-rcp -label: ot-rcp -description: | - This is a simple OpenThread RCP application. This is equivalent to the ot-rcp application in the OpenThread GitHub repo. -category: OpenThread Examples -filter: -- name: Device Type - value: [RCP] -- name: Project Difficulty - value: [Advanced] -- name: Wireless Technology - value: [Thread] -package: OpenThread -quality: production -readme: -- {path: README-OT-RCP.md} -source: -- {path: main.c} -- {path: app.c} -tag: [prebuilt_demo] -include: -- path: . - file_list: - - {path: app.h} - - {path: reset_util.h} -sdk: {id: gecko_sdk, version: 4.4.4} -toolchain_settings: [] -component: -- {id: EFR32MG21A010F1024IM32} -- {id: bootloader_interface} -- {id: brd4001a} -- {id: brd4179b} -- {id: ot_crash_handler} -- {id: ot_stack_rcp} -- {id: rail_util_pti} -- instance: [vcom] - id: uartdrv_usart -define: -- {name: OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER, value: '6'} -configuration: -- {name: SL_BOARD_ENABLE_VCOM, value: '1'} -- {name: OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE, value: '0'} -- condition: [ot_rtt_log] - name: OPENTHREAD_CONFIG_LOG_OUTPUT - value: OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED -- condition: [ot_rtt_log] - name: BUFFER_SIZE_UP - value: '768' -- condition: [ot_rtt_log, device_family_efr32mg1] - name: BUFFER_SIZE_UP - value: '128' -- condition: [ot_rtt_log] - name: BUFFER_SIZE_DOWN - value: '0' -ui_hints: - highlight: - - {path: ./README-OT-RCP.md, focus: true} - diff --git a/src/ot-rcp/ot-rcp.slps b/src/ot-rcp/ot-rcp.slps deleted file mode 100644 index 2a408275..00000000 --- a/src/ot-rcp/ot-rcp.slps +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/rcp-uart-802154/.cproject b/src/rcp-uart-802154/.cproject deleted file mode 100644 index 45c20e6d..00000000 --- a/src/rcp-uart-802154/.cproject +++ /dev/null @@ -1,3284 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/rcp-uart-802154/README-MP-RCP.md b/src/rcp-uart-802154/README-MP-RCP.md deleted file mode 100644 index 6cfaa080..00000000 --- a/src/rcp-uart-802154/README-MP-RCP.md +++ /dev/null @@ -1,8 +0,0 @@ -# Multiprotocol (OpenThread+Zigbee) RCP - -This multiprotocol radio co-processor (RCP) application supports running OpenThread and Zigbee stacks simultaneously on a host processor. It uses concurrent multiprotocol (CMP) / multi-PAN functionality to run the 802.15.4 networks simultaneously on the same channel. - -The host stacks and the RCP communicate using the Co-Processor Communication protocol (CPC), which acts as a protocol multiplexer and serial transport layer. The host applications connect to the CPC daemon, which in turn connects to the EFR via a SPI or UART link. - -Refer to *AN1333: Running Zigbee, OpenThread, and Bluetooth Concurrently on a Linux Host with a Multiprotocol Co-processor* for more information on running the multiprotocol RCP with different host applications. - diff --git a/src/rcp-uart-802154/app.c b/src/rcp-uart-802154/app.c deleted file mode 100644 index e0d57863..00000000 --- a/src/rcp-uart-802154/app.c +++ /dev/null @@ -1,123 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Core application logic. - ******************************************************************************* - * # 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. - * - ******************************************************************************/ -#include -#include -#include - -#include -#include -#include -#include - -#include "openthread-system.h" -#include "app.h" - -#include "reset_util.h" - -#include "sl_gsdk_version.h" -#include "config/internal_app_config.h" - -void otPlatAssertFail(const char *aFilename, int aLineNumber) -{ -#if OPENTHREAD_CONFIG_LOG_PLATFORM && OPENTHREAD_CONFIG_LOG_LEVEL < OT_LOG_LEVEL_CRIT - OT_UNUSED_VARIABLE(aFilename); - OT_UNUSED_VARIABLE(aLineNumber); -#else - otLogCritPlat("assert failed at %s:%d", aFilename, aLineNumber); -#endif - // For debug build, use assert to generate a core dump - assert(false); -} - -const char* sl_cpc_secondary_app_version(void) -{ - return ( - SL_GSDK_VERSION_STR - CPC_SECONDARY_APP_VERSION_SUFFIX - ); -} - -/** - * This function initializes the NCP app. - * - * @param[in] aInstance The OpenThread instance structure. - * - */ -extern void otAppNcpInit(otInstance *aInstance); - -static otInstance* sInstance = NULL; - -otInstance *otGetInstance(void) -{ - return sInstance; -} - -void sl_ot_create_instance(void) -{ -#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE - size_t otInstanceBufferLength = 0; - uint8_t *otInstanceBuffer = NULL; - - // Call to query the buffer size - (void)otInstanceInit(NULL, &otInstanceBufferLength); - - // Call to allocate the buffer - otInstanceBuffer = (uint8_t *)malloc(otInstanceBufferLength); - assert(otInstanceBuffer); - - // Initialize OpenThread with the buffer - sInstance = otInstanceInit(otInstanceBuffer, &otInstanceBufferLength); -#else - sInstance = otInstanceInitSingle(); -#endif - assert(sInstance); -} - -void sl_ot_ncp_init(void) -{ - otAppNcpInit(sInstance); -} - -/**************************************************************************//** - * Application Init. - *****************************************************************************/ - -void app_init(void) -{ - OT_SETUP_RESET_JUMP(argv); -} - -/**************************************************************************//** - * Application Process Action. - *****************************************************************************/ -void app_process_action(void) -{ - otTaskletsProcess(sInstance); - otSysProcessDrivers(sInstance); -} - -/**************************************************************************//** - * Application Exit. - *****************************************************************************/ -void app_exit(void) -{ - otInstanceFinalize(sInstance); -#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE - free(otInstanceBuffer); -#endif - // TO DO : pseudo reset? -} diff --git a/src/rcp-uart-802154/app.h b/src/rcp-uart-802154/app.h deleted file mode 100644 index 4a8493a9..00000000 --- a/src/rcp-uart-802154/app.h +++ /dev/null @@ -1,36 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Application interface provided to main(). - ******************************************************************************* - * # 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 APP_H -#define APP_H - -/**************************************************************************//** - * Application Init. - *****************************************************************************/ -void app_init(void); - -/**************************************************************************//** - * Application Exit. - *****************************************************************************/ -void app_exit(void); - -/**************************************************************************//** - * Application Process Action. - *****************************************************************************/ -void app_process_action(void); - -#endif \ No newline at end of file diff --git a/src/rcp-uart-802154/config/app_properties_config.h b/src/rcp-uart-802154/config/app_properties_config.h deleted file mode 100644 index 6951a569..00000000 --- a/src/rcp-uart-802154/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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/btl_interface_cfg.h b/src/rcp-uart-802154/config/btl_interface_cfg.h deleted file mode 100644 index 13e09116..00000000 --- a/src/rcp-uart-802154/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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/btl_interface_cfg_s2c1.h b/src/rcp-uart-802154/config/btl_interface_cfg_s2c1.h deleted file mode 100644 index 7f703143..00000000 --- a/src/rcp-uart-802154/config/btl_interface_cfg_s2c1.h +++ /dev/null @@ -1,281 +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_S2C1_H -#define BTL_INTERFACE_CFG_S2C1_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Bootloader Interface Trust Zone Security State Configuration - -// Disable multi tiered fallback logic -// The fault handling logic as well as the USART auto-detection logic will be disabled. -// The re-configuration of SMU will be handled by querying the running bootloader -// for the peripheral list. Querying the peripheral list is supported from the bootloader -// version 2.0.0. Check for the BOOTLOADER_CAPABILITY_PERIPHERAL_LIST capability to -// see if the running bootloader supports querying the peripheral list. -#define BOOTLOADER_DISABLE_OLD_BOOTLOADER_MITIGATION 0 - -// Disable peripheral access fault handling -// The fault handling triggered by an erroneous access of peripherals will be disabled. -// -// This should be disabled iff all the peripherals that are in use by the bootloader -// have been properly configured by the "Manually override security state of peripherals" option. -#define BOOTLOADER_DISABLE_NVM3_FAULT_HANDLING 0 - -// Manually override the security state of peripherals in use by the bootloader -// Default: 0. -// Manually override the security state of peripherals. Choose the peripherals touched -// by the customized code to have a valid secure access state before interacting with the bootloader -// In practice, this means that the chosen peripherals will be available at the secure address, -// which is accessible by the bootloader. Once the application is entered back the secure access state -// is changed back to the original state. -// -// The USART auto-detection logic that detects which, if any, USART is in use by the bootloader -// will be disabled. Make sure to choose the correct USART used by the bootloader. -#define BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE 0 -// EMU -// Update secure access state of EMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_EMU 0 - -// CMU -// Update secure access state of CMU before calling into bootloader -#define BOOTLOADER_PPUSATD0_CMU 0 - -// HFXO0 -// Update secure access state of HFXO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFXO0 0 - -// HFRCO0 -// Update secure access state of HFRCO0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_HFRCO0 0 - -// FSRCO -// Update secure access state of FSRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_FSRCO 0 - -// DPLL0 -// Update secure access state of DPLL0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_DPLL0 0 - -// LFXO -// Update secure access state of LFXO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFXO 0 - -// LFRCO -// Update secure access state of LFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_LFRCO 0 - -// ULFRCO -// Update secure access state of ULFRCO before calling into bootloader -#define BOOTLOADER_PPUSATD0_ULFRCO 0 - -// MSC -// Update secure access state of MSC before calling into bootloader -#define BOOTLOADER_PPUSATD0_MSC 0 - -// ICACHE0 -// Update secure access state of ICACHE0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_ICACHE0 0 - -// PRS -// Update secure access state of PRS before calling into bootloader -#define BOOTLOADER_PPUSATD0_PRS 0 - -// GPIO -// Update secure access state of GPIO before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPIO 0 - -// LDMA -// Update secure access state of LDMA before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMA 0 - -// LDMAXBAR -// Update secure access state of LDMAXBAR before calling into bootloader -#define BOOTLOADER_PPUSATD0_LDMAXBAR 0 - -// TIMER0 -// Update secure access state of TIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER0 0 - -// TIMER1 -// Update secure access state of TIMER1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER1 0 - -// TIMER2 -// Update secure access state of TIMER2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER2 0 - -// TIMER3 -// Update secure access state of TIMER3 before calling into bootloader -#define BOOTLOADER_PPUSATD0_TIMER3 0 - -// USART0 -// Update secure access state of USART0 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART0 0 - -// USART1 -// Update secure access state of USART1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART1 0 - -// USART2 -// Update secure access state of USART2 before calling into bootloader -#define BOOTLOADER_PPUSATD0_USART2 0 - -// BURTC -// Update secure access state of BURTC before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURTC 0 - -// I2C1 -// Update secure access state of I2C1 before calling into bootloader -#define BOOTLOADER_PPUSATD0_I2C1 0 - -// CHIPTESTCTRL -// Update secure access state of CHIPTESTCTRL before calling into bootloader -#define BOOTLOADER_PPUSATD0_CHIPTESTCTRL 0 - -// LVGD -// Update secure access state of LVGD before calling into bootloader -#define BOOTLOADER_PPUSATD0_LVGD 0 - -// SYSCFG -// Update secure access state of SYSCFG before calling into bootloader -#define BOOTLOADER_PPUSATD0_SYSCFG 0 - -// BURAM -// Update secure access state of BURAM before calling into bootloader -#define BOOTLOADER_PPUSATD0_BURAM 0 - -// IFADCDEBUG -// Update secure access state of IFADCDEBUG before calling into bootloader -#define BOOTLOADER_PPUSATD0_IFADCDEBUG 0 - -// GPCRC -// Update secure access state of GPCRC before calling into bootloader -#define BOOTLOADER_PPUSATD0_GPCRC 0 - -// RTCC -// Update secure access state of RTCC before calling into bootloader -#define BOOTLOADER_PPUSATD0_RTCC 0 - -// LETIMER0 -// Update secure access state of LETIMER0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_LETIMER0 0 - -// IADC0 -// Update secure access state of IADC0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_IADC0 0 - -// ACMP0 -// Update secure access state of ACMP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP0 0 - -// ACMP1 -// Update secure access state of ACMP1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_ACMP1 0 - -// I2C0 -// Update secure access state of I2C0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_I2C0 0 - -// HFRCOEM23 -// Update secure access state of HFRCOEM23 before calling into bootloader -#define BOOTLOADER_PPUSATD1_HFRCOEM23 0 - -// WDOG0 -// Update secure access state of WDOG0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG0 0 - -// WDOG1 -// Update secure access state of WDOG1 before calling into bootloader -#define BOOTLOADER_PPUSATD1_WDOG1 0 - -// AMUXCP0 -// Update secure access state of AMUXCP0 before calling into bootloader -#define BOOTLOADER_PPUSATD1_AMUXCP0 0 - -// RADIOAES -// Update secure access state of RADIOAES before calling into bootloader -#define BOOTLOADER_PPUSATD1_RADIOAES 0 - -// BUFC -// Update secure access state of BUFC before calling into bootloader -#define BOOTLOADER_PPUSATD1_BUFC 0 - -// SMU -// Update secure access state of SMU before calling into bootloader -#define BOOTLOADER_PPUSATD1_SMU 0 - -// AHBRADIO -// Update secure access state of AHBRADIO before calling into bootloader -#define BOOTLOADER_PPUSATD1_AHBRADIO 0 - -// SEMAILBOX -// Update secure access state of SEMAILBOX before calling into bootloader -#define BOOTLOADER_PPUSATD1_SEMAILBOX 0 -// - -// -// <<< end of configuration section >>> - -#if BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE == 1 -#define BOOTLOADER_PPUSATD0_MASK ((BOOTLOADER_PPUSATD0_EMU << _SMU_PPUSATD0_EMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CMU << _SMU_PPUSATD0_CMU_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFXO0 << _SMU_PPUSATD0_HFXO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_HFRCO0 << _SMU_PPUSATD0_HFRCO0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_FSRCO << _SMU_PPUSATD0_FSRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_DPLL0 << _SMU_PPUSATD0_DPLL0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFXO << _SMU_PPUSATD0_LFXO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LFRCO << _SMU_PPUSATD0_LFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ULFRCO << _SMU_PPUSATD0_ULFRCO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_MSC << _SMU_PPUSATD0_MSC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_ICACHE0 << _SMU_PPUSATD0_ICACHE0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_PRS << _SMU_PPUSATD0_PRS_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPIO << _SMU_PPUSATD0_GPIO_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMA << _SMU_PPUSATD0_LDMA_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LDMAXBAR << _SMU_PPUSATD0_LDMAXBAR_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER0 << _SMU_PPUSATD0_TIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER1 << _SMU_PPUSATD0_TIMER1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER2 << _SMU_PPUSATD0_TIMER2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_TIMER3 << _SMU_PPUSATD0_TIMER3_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART0 << _SMU_PPUSATD0_USART0_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART1 << _SMU_PPUSATD0_USART1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_USART2 << _SMU_PPUSATD0_USART2_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURTC << _SMU_PPUSATD0_BURTC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_I2C1 << _SMU_PPUSATD0_I2C1_SHIFT) \ - | (BOOTLOADER_PPUSATD0_CHIPTESTCTRL << _SMU_PPUSATD0_CHIPTESTCTRL_SHIFT) \ - | (BOOTLOADER_PPUSATD0_LVGD << _SMU_PPUSATD0_LVGD_SHIFT) \ - | (BOOTLOADER_PPUSATD0_SYSCFG << _SMU_PPUSATD0_SYSCFG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_BURAM << _SMU_PPUSATD0_BURAM_SHIFT) \ - | (BOOTLOADER_PPUSATD0_IFADCDEBUG << _SMU_PPUSATD0_IFADCDEBUG_SHIFT) \ - | (BOOTLOADER_PPUSATD0_GPCRC << _SMU_PPUSATD0_GPCRC_SHIFT) \ - | (BOOTLOADER_PPUSATD0_RTCC << _SMU_PPUSATD0_RTCC_SHIFT)) -#define BOOTLOADER_PPUSATD1_MASK ((BOOTLOADER_PPUSATD1_LETIMER0 << _SMU_PPUSATD1_LETIMER0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_IADC0 << _SMU_PPUSATD1_IADC0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP0 << _SMU_PPUSATD1_ACMP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_ACMP1 << _SMU_PPUSATD1_ACMP1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_I2C0 << _SMU_PPUSATD1_I2C0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_HFRCOEM23 << _SMU_PPUSATD1_HFRCOEM23_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG0 << _SMU_PPUSATD1_WDOG0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_WDOG1 << _SMU_PPUSATD1_WDOG1_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AMUXCP0 << _SMU_PPUSATD1_AMUXCP0_SHIFT) \ - | (BOOTLOADER_PPUSATD1_RADIOAES << _SMU_PPUSATD1_RADIOAES_SHIFT) \ - | (BOOTLOADER_PPUSATD1_BUFC << _SMU_PPUSATD1_BUFC_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SMU << _SMU_PPUSATD1_SMU_SHIFT) \ - | (BOOTLOADER_PPUSATD1_AHBRADIO << _SMU_PPUSATD1_AHBRADIO_SHIFT) \ - | (BOOTLOADER_PPUSATD1_SEMAILBOX << _SMU_PPUSATD1_SEMAILBOX_SHIFT)) -#endif // BOOTLOADER_MANUAL_OVERRIDE_SECURITY_STATE - -#endif // BTL_INTERFACE_CFG_S2C1_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/dmadrv_config.h b/src/rcp-uart-802154/config/dmadrv_config.h deleted file mode 100644 index be24f49d..00000000 --- a/src/rcp-uart-802154/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-15> -// Priority of the DMA interrupt. Smaller number equals higher priority. -// Default: 8 -#define EMDRV_DMADRV_DMA_IRQ_PRIORITY 8 - -// 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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/emlib_core_debug_config.h b/src/rcp-uart-802154/config/emlib_core_debug_config.h deleted file mode 100644 index e4a01682..00000000 --- a/src/rcp-uart-802154/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/src/rcp-uart-802154/config/internal_app_config.h b/src/rcp-uart-802154/config/internal_app_config.h deleted file mode 100644 index 327b57c8..00000000 --- a/src/rcp-uart-802154/config/internal_app_config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CONFIG_INTERNAL_APP_CONFIG_H_ -#define CONFIG_INTERNAL_APP_CONFIG_H_ - -#ifndef CPC_SECONDARY_APP_VERSION_SUFFIX -#define CPC_SECONDARY_APP_VERSION_SUFFIX "" -#endif - -#endif /* CONFIG_INTERNAL_APP_CONFIG_H_ */ diff --git a/src/rcp-uart-802154/config/nvm3_default_config.h b/src/rcp-uart-802154/config/nvm3_default_config.h deleted file mode 100644 index 48218391..00000000 --- a/src/rcp-uart-802154/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: 40960 -#define NVM3_DEFAULT_NVM_SIZE 40960 -#endif - -// - -// <<< end of configuration section >>> - -#endif // NVM3_DEFAULT_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/pin_config.h b/src/rcp-uart-802154/config/pin_config.h deleted file mode 100644 index 552874a5..00000000 --- a/src/rcp-uart-802154/config/pin_config.h +++ /dev/null @@ -1,189 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[CMU] -// [CMU]$ - -// $[LFXO] -// LFXO LFXTAL_I on PD01 -#ifndef LFXO_LFXTAL_I_PORT -#define LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_I_PIN -#define LFXO_LFXTAL_I_PIN 1 -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef LFXO_LFXTAL_O_PORT -#define LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef LFXO_LFXTAL_O_PIN -#define LFXO_LFXTAL_O_PIN 0 -#endif - -// [LFXO]$ - -// $[PRS.ASYNCH0] -// [PRS.ASYNCH0]$ - -// $[PRS.ASYNCH1] -// [PRS.ASYNCH1]$ - -// $[PRS.ASYNCH2] -// [PRS.ASYNCH2]$ - -// $[PRS.ASYNCH3] -// [PRS.ASYNCH3]$ - -// $[PRS.ASYNCH4] -// [PRS.ASYNCH4]$ - -// $[PRS.ASYNCH5] -// [PRS.ASYNCH5]$ - -// $[PRS.ASYNCH6] -// [PRS.ASYNCH6]$ - -// $[PRS.ASYNCH7] -// [PRS.ASYNCH7]$ - -// $[PRS.ASYNCH8] -// [PRS.ASYNCH8]$ - -// $[PRS.ASYNCH9] -// [PRS.ASYNCH9]$ - -// $[PRS.ASYNCH10] -// [PRS.ASYNCH10]$ - -// $[PRS.ASYNCH11] -// [PRS.ASYNCH11]$ - -// $[PRS.SYNCH0] -// [PRS.SYNCH0]$ - -// $[PRS.SYNCH1] -// [PRS.SYNCH1]$ - -// $[PRS.SYNCH2] -// [PRS.SYNCH2]$ - -// $[PRS.SYNCH3] -// [PRS.SYNCH3]$ - -// $[GPIO] -// GPIO SWV on PA03 -#ifndef GPIO_SWV_PORT -#define GPIO_SWV_PORT gpioPortA -#endif -#ifndef GPIO_SWV_PIN -#define GPIO_SWV_PIN 3 -#endif - -// [GPIO]$ - -// $[TIMER0] -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[TIMER2] -// [TIMER2]$ - -// $[TIMER3] -// [TIMER3]$ - -// $[USART0] -// USART0 CTS on PC03 -#ifndef USART0_CTS_PORT -#define USART0_CTS_PORT gpioPortC -#endif -#ifndef USART0_CTS_PIN -#define USART0_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef USART0_RTS_PORT -#define USART0_RTS_PORT gpioPortC -#endif -#ifndef USART0_RTS_PIN -#define USART0_RTS_PIN 2 -#endif - -// USART0 RX on PA06 -#ifndef USART0_RX_PORT -#define USART0_RX_PORT gpioPortA -#endif -#ifndef USART0_RX_PIN -#define USART0_RX_PIN 6 -#endif - -// USART0 TX on PA05 -#ifndef USART0_TX_PORT -#define USART0_TX_PORT gpioPortA -#endif -#ifndef USART0_TX_PIN -#define USART0_TX_PIN 5 -#endif - -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[I2C1] -// [I2C1]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[IADC0] -// [IADC0]$ - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[I2C0] -// [I2C0]$ - -// $[PTI] -// PTI DFRAME on PC05 -#ifndef PTI_DFRAME_PORT -#define PTI_DFRAME_PORT gpioPortC -#endif -#ifndef PTI_DFRAME_PIN -#define PTI_DFRAME_PIN 5 -#endif - -// PTI DOUT on PC04 -#ifndef PTI_DOUT_PORT -#define PTI_DOUT_PORT gpioPortC -#endif -#ifndef PTI_DOUT_PIN -#define PTI_DOUT_PIN 4 -#endif - -// [PTI]$ - -// $[MODEM] -// [MODEM]$ - -// $[CUSTOM_PIN_NAME] -#ifndef _PORT -#define _PORT gpioPortA -#endif -#ifndef _PIN -#define _PIN 0 -#endif - -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - diff --git a/src/rcp-uart-802154/config/psa_crypto_config.h b/src/rcp-uart-802154/config/psa_crypto_config.h deleted file mode 100644 index a17b0efc..00000000 --- a/src/rcp-uart-802154/config/psa_crypto_config.h +++ /dev/null @@ -1,170 +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 - -// - -// Power optimization configuration - -// Store already-generated random bytes before putting the device to sleep -// Using the hardware TRNG (for example through psa_generate_random()) will -// consume a non-negligible amount of power. A start-up routine must pass -// and a relatively large minimum amount of random bytes will be generated. -// Use cases where the device is frequently entering EM2/EM3 and thereafter -// consumes a small amount of data from the TRNG may benefit from buffering -// the existing random bytes before putting the device to sleep. These -// buffered bytes are then consumed until exhaustion before the TRNG needs -// to be initialized and used again. -// -// NOTE: this configuration option is only applicable for devices with a -// Virtual Secure Engine (VSE), and requires the 'Power Manager' component -// to be included in the project. -// -// Default: 0 -#define SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP (0) - -// Number of random words to buffer before putting the device to sleep <1-63> -// This option can be used to decrease the amount of random words that -// (if enabled) are buffered before the device enters EM2/EM3. Lowering this -// number will result in less static RAM usage, but also means that the TRNG -// potentially has to be initialized more times--leading to increased power -// consumption. By default this option in configured to buffer as much TRNG -// data as possible (limited by the depth of the TRNG FIFO). -// -// NOTE: this configuration option is only applicable when -// SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP is enabled. -// -// Default: 63 -#define SL_VSE_MAX_TRNG_WORDS_BUFFERED_DURING_SLEEP (63) -// - -// - -// <<< 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/src/rcp-uart-802154/config/sl_board_control_config.h b/src/rcp-uart-802154/config/sl_board_control_config.h deleted file mode 100644 index f1804587..00000000 --- a/src/rcp-uart-802154/config/sl_board_control_config.h +++ /dev/null @@ -1,56 +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 Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 1 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#ifndef SL_BOARD_ENABLE_VCOM_PORT -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD -#endif -#ifndef SL_BOARD_ENABLE_VCOM_PIN -#define SL_BOARD_ENABLE_VCOM_PIN 4 -#endif -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/src/rcp-uart-802154/config/sl_cpc_config.h b/src/rcp-uart-802154/config/sl_cpc_config.h deleted file mode 100644 index 26c6fca0..00000000 --- a/src/rcp-uart-802154/config/sl_cpc_config.h +++ /dev/null @@ -1,83 +0,0 @@ -/***************************************************************************//** - * @file - * @brief CPC 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_CPC_CONFIG_H -#define SL_CPC_CONFIG_H - -// CPC Configuration - -// Max Rx Payload Length<1-4087> -// Default: 256 -// Maximum size of the payload in bytes of each RX buffer -#define SL_CPC_RX_PAYLOAD_MAX_LENGTH (256) - -// Tx Queue Size -// Default: 20 -// The maximum number of outgoing messages capable of being queued for transmission. -#define SL_CPC_TX_QUEUE_ITEM_MAX_COUNT 15 - -// Total Number of Rx Buffers -// Default: 20 -// Total number of CPC RX buffers available across all endpoints -// Multiple RX buffers can be associated with a single endpoint -#define SL_CPC_RX_BUFFER_MAX_COUNT 15 - -// Max Number of User Endpoints<0-10> -// Default: 1 -// Maximum number of CPC user endpoints that can be opened at once. -#define SL_CPC_USER_ENDPOINT_MAX_COUNT 0 - -// Enable debug core tracing with system view -// Default: 0 -#define SL_CPC_DEBUG_SYSTEM_VIEW_LOG_CORE_EVENT 0 - -// Enable debug endpoint tracing with system view -// Default: 0 -#define SL_CPC_DEBUG_SYSTEM_VIEW_LOG_ENDPOINT_EVENT 0 - -// Enable debug counters for core events -// Default: 0 -#define SL_CPC_DEBUG_CORE_EVENT_COUNTERS 0 - -// Enable debug counters for endpoint events -// Default: 0 -#define SL_CPC_DEBUG_ENDPOINT_EVENT_COUNTERS 0 - -// Enable debug counters for memory allocation -// Default: 0 -#define SL_CPC_DEBUG_MEMORY_ALLOCATOR_COUNTERS 0 - -// - -// <<< end of configuration section >>> - -#endif /* SL_CPC_CONFIG_H */ \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_cpc_drv_uart_usart_vcom_config.h b/src/rcp-uart-802154/config/sl_cpc_drv_uart_usart_vcom_config.h deleted file mode 100644 index 381b2e02..00000000 --- a/src/rcp-uart-802154/config/sl_cpc_drv_uart_usart_vcom_config.h +++ /dev/null @@ -1,102 +0,0 @@ -/***************************************************************************//** - * @file - * @brief CPC UART driver configuration file. - ******************************************************************************* - * # License - * Copyright 2023 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_CPC_DRV_UART_USART_VCOM_CONFIG_H -#define SL_CPC_DRV_UART_USART_VCOM_CONFIG_H - -// CPC - UART Driver Configuration - -// Number of frame that can be queued in the driver receive queue -// Default: 10 -#define SL_CPC_DRV_UART_VCOM_RX_QUEUE_SIZE 10 - -// Number of frame that can be queued in the driver transmit queue -// Default: 10 -#define SL_CPC_DRV_UART_VCOM_TX_QUEUE_SIZE 10 - -// UART Baudrate -// Default: 115200 -#define SL_CPC_DRV_UART_VCOM_BAUDRATE 460800 - -// Flow control -// None -// CTS/RTS -// Default: usartHwFlowControlCtsAndRts -#define SL_CPC_DRV_UART_VCOM_FLOW_CONTROL_TYPE usartHwFlowControlCtsAndRts -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_CPC_DRV_UART_VCOM -// $[USART_SL_CPC_DRV_UART_VCOM] -#ifndef SL_CPC_DRV_UART_VCOM_PERIPHERAL -#define SL_CPC_DRV_UART_VCOM_PERIPHERAL USART0 -#endif -#ifndef SL_CPC_DRV_UART_VCOM_PERIPHERAL_NO -#define SL_CPC_DRV_UART_VCOM_PERIPHERAL_NO 0 -#endif - -// USART0 TX on PA05 -#ifndef SL_CPC_DRV_UART_VCOM_TX_PORT -#define SL_CPC_DRV_UART_VCOM_TX_PORT gpioPortA -#endif -#ifndef SL_CPC_DRV_UART_VCOM_TX_PIN -#define SL_CPC_DRV_UART_VCOM_TX_PIN 5 -#endif - -// USART0 RX on PA06 -#ifndef SL_CPC_DRV_UART_VCOM_RX_PORT -#define SL_CPC_DRV_UART_VCOM_RX_PORT gpioPortA -#endif -#ifndef SL_CPC_DRV_UART_VCOM_RX_PIN -#define SL_CPC_DRV_UART_VCOM_RX_PIN 6 -#endif - -// USART0 CTS on PC03 -#ifndef SL_CPC_DRV_UART_VCOM_CTS_PORT -#define SL_CPC_DRV_UART_VCOM_CTS_PORT gpioPortC -#endif -#ifndef SL_CPC_DRV_UART_VCOM_CTS_PIN -#define SL_CPC_DRV_UART_VCOM_CTS_PIN 3 -#endif - -// USART0 RTS on PC02 -#ifndef SL_CPC_DRV_UART_VCOM_RTS_PORT -#define SL_CPC_DRV_UART_VCOM_RTS_PORT gpioPortC -#endif -#ifndef SL_CPC_DRV_UART_VCOM_RTS_PIN -#define SL_CPC_DRV_UART_VCOM_RTS_PIN 2 -#endif -// [USART_SL_CPC_DRV_UART_VCOM]$ -// <<< sl:end pin_tool >>> - -#endif /* SL_CPC_DRV_UART_VCOM_CONFIG_H */ diff --git a/src/rcp-uart-802154/config/sl_debug_swo_config.h b/src/rcp-uart-802154/config/sl_debug_swo_config.h deleted file mode 100644 index fee7e65d..00000000 --- a/src/rcp-uart-802154/config/sl_debug_swo_config.h +++ /dev/null @@ -1,106 +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 -// $[GPIO_SL_DEBUG] -#ifndef SL_DEBUG_PERIPHERAL -#define SL_DEBUG_PERIPHERAL GPIO -#endif - -// GPIO SWV on PA03 -#ifndef SL_DEBUG_SWV_PORT -#define SL_DEBUG_SWV_PORT gpioPortA -#endif -#ifndef SL_DEBUG_SWV_PIN -#define SL_DEBUG_SWV_PIN 3 -#endif -// [GPIO_SL_DEBUG]$ -// <<< sl:end pin_tool >>> - -#endif // SL_DEBUG_SWO_CONFIG_H diff --git a/src/rcp-uart-802154/config/sl_device_init_emu_config.h b/src/rcp-uart-802154/config/sl_device_init_emu_config.h deleted file mode 100644 index f23d055b..00000000 --- a/src/rcp-uart-802154/config/sl_device_init_emu_config.h +++ /dev/null @@ -1,53 +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 >>> - -// Allow debugger to remain connected in EM2 -// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. -// Enabling debug connectivity results in an increased power consumption in EM2/EM3. -// Default: 1 -#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 - -// 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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_device_init_hfrco_config.h b/src/rcp-uart-802154/config/sl_device_init_hfrco_config.h deleted file mode 100644 index 532885ae..00000000 --- a/src/rcp-uart-802154/config/sl_device_init_hfrco_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************//** - * @file - * @brief DEVICE_INIT_HFRCO 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_HFRCO_CONFIG_H -#define SL_DEVICE_INIT_HFRCO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Frequency Band -// RC Oscillator Frequency Band -// 1 MHz -// 2 MHz -// 4 MHz -// 7 MHz -// 13 MHz -// 16 MHz -// 19 MHz -// 26 MHz -// 32 MHz -// 38 MHz -// 48 MHz -// 56 MHz -// 64 MHz -// 80 MHz -// Default: cmuHFRCODPLLFreq_80M0Hz -#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_device_init_hfxo_config.h b/src/rcp-uart-802154/config/sl_device_init_hfxo_config.h deleted file mode 100644 index 917e60a6..00000000 --- a/src/rcp-uart-802154/config/sl_device_init_hfxo_config.h +++ /dev/null @@ -1,57 +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 sine wave -// Default: cmuHfxoOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_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-255> -// Default: 140 -#define SL_DEVICE_INIT_HFXO_CTUNE 133 - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_device_init_lfxo_config.h b/src/rcp-uart-802154/config/sl_device_init_lfxo_config.h deleted file mode 100644 index d2cd25f5..00000000 --- a/src/rcp-uart-802154/config/sl_device_init_lfxo_config.h +++ /dev/null @@ -1,93 +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: cmuLfxoOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 79 - -// LFXO precision in PPM <0-65535> -// Default: 50 -#define SL_DEVICE_INIT_LFXO_PRECISION 50 - -// Startup Timeout Delay -// -// 2 cycles -// 256 cycles -// 1K cycles -// 2K cycles -// 4K cycles -// 8K cycles -// 16K cycles -// 32K cycles -// Default: cmuLfxoStartupDelay_4KCycles -#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_DEVICE_INIT_LFXO -// $[LFXO_SL_DEVICE_INIT_LFXO] -#ifndef SL_DEVICE_INIT_LFXO_PERIPHERAL -#define SL_DEVICE_INIT_LFXO_PERIPHERAL LFXO -#endif - -// LFXO LFXTAL_O on PD00 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_O_PIN 0 -#endif - -// LFXO LFXTAL_I on PD01 -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PORT gpioPortD -#endif -#ifndef SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN -#define SL_DEVICE_INIT_LFXO_LFXTAL_I_PIN 1 -#endif - -// [LFXO_SL_DEVICE_INIT_LFXO]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/src/rcp-uart-802154/config/sl_mbedtls_config.h b/src/rcp-uart-802154/config/sl_mbedtls_config.h deleted file mode 100644 index 5ebefc9a..00000000 --- a/src/rcp-uart-802154/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/src/rcp-uart-802154/config/sl_mbedtls_device_config.h b/src/rcp-uart-802154/config/sl_mbedtls_device_config.h deleted file mode 100644 index e286a0d9..00000000 --- a/src/rcp-uart-802154/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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_memory_config.h b/src/rcp-uart-802154/config/sl_memory_config.h deleted file mode 100644 index b75d56fb..00000000 --- a/src/rcp-uart-802154/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 2752 -#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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_openthread_coex_config.h b/src/rcp-uart-802154/config/sl_openthread_coex_config.h deleted file mode 100644 index c43e95b9..00000000 --- a/src/rcp-uart-802154/config/sl_openthread_coex_config.h +++ /dev/null @@ -1,11 +0,0 @@ -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Coexistence Configurations -// Synch MAC to GRANT (MAC holdoff) -#define SL_OPENTHREAD_COEX_MAC_HOLDOFF_ENABLE 0 - -// Counters -#define SL_OPENTHREAD_COEX_COUNTER_ENABLE 1 - -// -// <<< end of configuration section >>> \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_openthread_features_config.h b/src/rcp-uart-802154/config/sl_openthread_features_config.h deleted file mode 100644 index bc8d7e41..00000000 --- a/src/rcp-uart-802154/config/sl_openthread_features_config.h +++ /dev/null @@ -1,327 +0,0 @@ -#ifndef _SL_OPENTHREAD_FEATURES_CONFIG_H -#define _SL_OPENTHREAD_FEATURES_CONFIG_H -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Default OpenThread Stack Configuration - -// Thread Stack Protocol Version -// -// Thread 1.1 -// Thread 1.2 -// Thread 1.3 -// Thread 1.2 and Thread 1.3 are compatible with Thread 1.1. -// Current Default: OT_THREAD_VERSION_1_3 -#ifndef OPENTHREAD_CONFIG_THREAD_VERSION -#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_3 -#endif -// - -#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) -// The following features require at least Thread Stack Protocol Version 1.2 -// Backbone Router -#ifndef OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE -#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 0 -#endif -// CSL Auto Synchronization using data polling -#ifndef OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE -#define OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE 0 -#endif -// CSL (Coordinated Sampled Listening) Debug -#ifndef OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE -#define OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE 0 -#endif -// CSL (Coordinated Sampled Listening) Receiver -#ifndef OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE -#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 0 -#endif -// CSL Scheduling Uncertainty (±10 us units) <12..999:1> -#ifndef SL_OPENTHREAD_CSL_TX_UNCERTAINTY -#if OPENTHREAD_RADIO - #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 175 -#elif OPENTHREAD_FTD - #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 20 -#else - #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 12 -#endif -#endif -// DUA (Domain Unicast Address) -#ifndef OPENTHREAD_CONFIG_DUA_ENABLE -#define OPENTHREAD_CONFIG_DUA_ENABLE 1 -#endif -// Link Metrics Initiator -#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1 -#endif -// Link Metrics Subject -#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1 -#endif -// Multicast Listener Registration -#ifndef OPENTHREAD_CONFIG_MLR_ENABLE -#define OPENTHREAD_CONFIG_MLR_ENABLE 1 -#endif -// DNS Client (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 -#endif -// DNS-SD Server (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE -#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0 -#endif -// Service Registration Protocol (SRP) Client (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 -#endif -// Service Registration Protocol (SRP) Server (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_SRP_SERVER_ENABLE -#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0 -#endif -// TCPlp (Low power TCP over OpenThread) (Thread 1.3) -#ifndef OPENTHREAD_CONFIG_TCP_ENABLE -#define OPENTHREAD_CONFIG_TCP_ENABLE 0 -#endif -// Thread over Infrastructure (Thread 1.3: NCP only) -#ifndef OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE -#define OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE 0 -#endif -// -#endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 - -// Border Agent -#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE -#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 -#endif -// -// Border Router -#ifndef OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE -#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 -#endif -// -// Channel Manager -#ifndef OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE -#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 0 -#endif -// -// Channel Monitor -#ifndef OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE -#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 0 -#endif -// - -// Commissioner -#ifndef OPENTHREAD_CONFIG_COMMISSIONER_ENABLE -#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 -#endif - -// Max Joiner Entries -// The maximum number of Joiner entries maintained by the Commissioner. -// 2 -#ifndef OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES -#define OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES 2 -#endif -// - -// COAP API -#ifndef OPENTHREAD_CONFIG_COAP_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_API_ENABLE 0 -#endif -// -// COAP Observe (RFC7641) API -#ifndef OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE 0 -#endif -// -// COAP Secure API -#ifndef OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 -#endif -// -// DHCP6 Client -#ifndef OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 -#endif -// -// DHCP6 Server -#ifndef OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE -#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 -#endif -// -// Diagnostic -#ifndef OPENTHREAD_CONFIG_DIAG_ENABLE -#define OPENTHREAD_CONFIG_DIAG_ENABLE 1 -#endif -// -// ECDSA (Elliptic Curve Digital Signature Algorithm) (Required for Matter support) -#ifndef OPENTHREAD_CONFIG_ECDSA_ENABLE -#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 -#endif -// -// External Heap -#ifndef OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE -#define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0 -#endif -// -// IPv6 Fragmentation -#ifndef OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE -#define OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE 0 -#endif -// -// Maximum number of IPv6 unicast addresses allowed to be externally added -#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS -#define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 4 -#endif -// -// Maximum number of IPv6 multicast addresses allowed to be externally added -#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS -#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 4 -#endif -// -// Jam Detection -#ifndef OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE -#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0 -#endif -// -// Joiner -#ifndef OPENTHREAD_CONFIG_JOINER_ENABLE -#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 -#endif -// -// Link Raw Service -#ifndef OPENTHREAD_CONFIG_LINK_RAW_ENABLE -#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 0 -#endif -// -// MAC Filter -#ifndef OPENTHREAD_CONFIG_MAC_FILTER_ENABLE -#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 0 -#endif -// -// MLE Long Routes extension (experimental) -#ifndef OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE -#define OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE 0 -#endif -// -// MultiPAN RCP -#ifndef OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE -#define OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE 1 -#endif -// -// Multiple OpenThread Instances -#ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE -#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0 -#endif -// -// OTNS (OpenThread Network Simulator) -#ifndef OPENTHREAD_CONFIG_OTNS_ENABLE -#define OPENTHREAD_CONFIG_OTNS_ENABLE 0 -#endif -// -// Ping Sender Module -#ifndef OPENTHREAD_CONFIG_PING_SENDER_ENABLE -#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1 -#endif -// -// Platform UDP -#ifndef OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE -#define OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 0 -#endif -// -// Reference Device for Thread Test Harness -#ifndef OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE -#define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0 -#endif -// -// Service Entries in Thread Network Data -#ifndef OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE -#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 0 -#endif -// -// RAM (volatile-only storage) -#ifndef OPENTHREAD_SETTINGS_RAM -#define OPENTHREAD_SETTINGS_RAM 0 -#endif -// -// SLAAC Addresses -#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE -#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 -#endif -// -// SNTP Client -#ifndef OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 0 -#endif -// -// TMF Network Diagnostic client API -#ifndef OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE 1 -#endif -// -// Time Synchronization Service -#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0 -// -// UDP Forward -#ifndef OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE -#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0 -#endif -// -// Enable Mac beacon payload parsing support -#ifndef OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE -#define OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE 1 -#endif -// -// -// Logging -// LOG_OUTPUT -// NONE -// APP -// PLATFORM_DEFINED -// Default: OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED -#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_NONE -#endif - -// DYNAMIC_LOG_LEVEL -#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE -#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0 -#endif - -// Enable Logging -#define OPENTHREAD_FULL_LOGS_ENABLE 0 -#if OPENTHREAD_FULL_LOGS_ENABLE - -// Note: Enabling higher log levels, which include logging packet details, can cause delays which may result in join failures. -// LOG_LEVEL -// NONE -// CRIT -// WARN -// NOTE -// INFO -// DEBG -// Default: OT_LOG_LEVEL_DEBG -#ifndef OPENTHREAD_CONFIG_LOG_LEVEL -#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG -#endif -// CLI -#ifndef OPENTHREAD_CONFIG_LOG_CLI -#define OPENTHREAD_CONFIG_LOG_CLI 1 -#endif -// PKT_DUMP -#ifndef OPENTHREAD_CONFIG_LOG_PKT_DUMP -#define OPENTHREAD_CONFIG_LOG_PKT_DUMP 1 -#endif -// PLATFORM -#ifndef OPENTHREAD_CONFIG_LOG_PLATFORM -#define OPENTHREAD_CONFIG_LOG_PLATFORM 1 -#endif -// PREPEND_LEVEL -#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL -#define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 1 -#endif - -#endif -// -// -// - -// <<< end of configuration section >>> -#endif // _SL_OPENTHREAD_FEATURES_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_openthread_generic_config.h b/src/rcp-uart-802154/config/sl_openthread_generic_config.h deleted file mode 100644 index 28bbfae1..00000000 --- a/src/rcp-uart-802154/config/sl_openthread_generic_config.h +++ /dev/null @@ -1,148 +0,0 @@ -/* include/openthread-config-generic.h. Generated from openthread-config-generic.h.in by configure. */ -/* include/openthread-config-generic.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to 1 if your C++ compiler doesn't accept -c and -o together. */ -/* #undef CXX_NO_MINUS_C_MINUS_O */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `edit' library (-ledit). */ -/* #undef HAVE_LIBEDIT */ - -/* Define to 1 if you have the `readline' library (-lreadline). */ -/* #undef HAVE_LIBREADLINE */ - -/* Define to 1 if you have the `memcpy' function. */ -/* #undef HAVE_MEMCPY */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Name of package */ -#define PACKAGE "openthread" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "openthread-devel@googlegroups.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "SL-OPENTHREAD" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "SL-OPENTHREAD/2.4.0.0_GitHub-7074a43e4" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "openthread" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://github.com/openthread/openthread" - -/* Define to the version of this package. - * Note: When adding the label below with OpenThread version, please make - * sure it is a valid GitHub version. Avoid merge or local commit hashes. - */ -#define PACKAGE_VERSION "2.4.0.0_GitHub-7074a43e4" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "2.4.0.0_GitHub-7074a43e4" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT32_T */ - -/* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT64_T */ - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to the type of a signed integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int16_t */ - -/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int32_t */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -/* #undef int8_t */ - -/* Define to the type of an unsigned integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint16_t */ - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint32_t */ - -/* Define to the type of an unsigned integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint64_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_coex_common_config.h b/src/rcp-uart-802154/config/sl_rail_util_coex_common_config.h deleted file mode 100644 index edf563dd..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_coex_common_config.h +++ /dev/null @@ -1,254 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Common coexistence configuration header 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_COEX_COMMON_CONFIG_H -#define SL_RAIL_UTIL_COEX_COMMON_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Coexistence Configuration - -// IEEE802.15.4 Only Configuration -// Disable ACKing when GRANT deasserted, RHO asserted, or REQUEST deasserted -// Disable ACKing when GNT deasserted, RHO asserted, or REQ not secured (shared REQ only) -// Default: 1 -#define SL_RAIL_UTIL_COEX_ACKHOLDOFF 1 - -// Abort transmission mid-packet if Grant when GRANT deasserted, RHO asserted, or REQUEST not secured (shared REQUEST only) -// Abort transmission mid-packet if Grant when GRANT deasserted, RHO asserted, or REQUEST not secured (shared REQUEST only) -// Default: 0 -#define SL_RAIL_UTIL_COEX_IEEE802154_TX_ABORT 0 -// - -// BLE Only Configuration -// Abort transmission mid-packet if Grant when GRANT deasserted, RHO asserted, or REQUEST not secured (shared REQUEST only) -// Abort transmission mid-packet if Grant when GRANT deasserted, RHO asserted, or REQUEST not secured (shared REQUEST only) -// Default: 0 -#define SL_RAIL_UTIL_COEX_BLE_TX_ABORT 0 -// - -// REQUEST -// Enable REQUEST signal -// Default: 0 -#define SL_RAIL_UTIL_COEX_REQ_ENABLED 0 - -// REQUEST assert signal level -// <1=> High -// <0=> Low -// Polarity of REQUEST signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_REQ_ASSERT_LEVEL 1 - -// Enable REQUEST shared mode -// Configure the REQUEST signal for shared mode -// Default: 0 -#define SL_RAIL_UTIL_COEX_REQ_SHARED 0 - -// Max REQUEST backoff mask [0-255] -// <0-255:1> -// Maximum backoff time in microseconds after REQUEST was deasserted -// Default: 15 -#define SL_RAIL_UTIL_COEX_REQ_BACKOFF 15 - -// BLE Only Request Configuration -// Specify the number of microseconds between asserting Request and starting RX/TX -// <0-5000:1> -// Specify the number of microseconds between asserting REQUEST and starting RX/TX (BLE only) -// Default: 500 -#define SL_RAIL_UTIL_COEX_REQ_WINDOW 500 -// - -// IEEE802.15.4 Only Request Configuration -// Enable REQUEST receive retry -// Enable the receive retry -// Default: 0 -#define SL_RAIL_UTIL_COEX_RETRYRX_ENABLE 0 - -// REQUEST receive retry timeout(ms) -// <0-255:1> -// Receive retry REQ timeout in milliseconds -// Default: 16 -#define SL_RAIL_UTIL_COEX_RETRYRX_TIMEOUT 16 - -// REQUEST receive retry assert PRIORITY -// Enable the receive retry high priority -// Default: 0 -#define SL_RAIL_UTIL_COEX_RETRYRX_HIPRI 0 -// -// -// - -// GRANT -// Enable GRANT signal -// Default: 0 -#define SL_RAIL_UTIL_COEX_GNT_ENABLED 0 - -// GRANT assert signal level -// <1=> High -// <0=> Low -// Polarity of grant (GNT) signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_GNT_ASSERT_LEVEL 1 -// - -// PRIORITY -// Enable PRIORITY signal -// Default: 0 -#define SL_RAIL_UTIL_COEX_PRI_ENABLED 0 - -// PRIORITY assert signal level -// <1=> High -// <0=> Low -// Polarity of priority(PRI) signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_PRI_ASSERT_LEVEL 1 - -// Enable PRIORITY shared mode -// Configure the PRIORITY signal for shared mode -// Default: 0 -#define SL_RAIL_UTIL_COEX_PRI_SHARED 0 - -// BLE Only Priority Configuration -// Default Enabled/Disabled -// Enable/Disable BLE PRIORITY by default -// Default: 0 -#define SL_RAIL_UTIL_COEX_PRIORITY_DEFAULT 0 -// - -// IEEE802.15.4 Only Priority Configuration -// Assert PRIORITY when transmitting packet -// Assert a high priority when the local device is transmitting a packet -// Default: 0 -#define SL_RAIL_UTIL_COEX_TX_HIPRI 0 - -// Assert PRIORITY when receiving packet -// Assert a high priority when the local device is receiving a packet -// Default: 0 -#define SL_RAIL_UTIL_COEX_RX_HIPRI 0 - -// Include TX PRIORITY escalation -// Compile-time include TX PRIORITY escalation feature -// Default: 0 -#define SL_RAIL_UTIL_COEX_PRIORITY_ESCALATION_ENABLE 0 - -// CCA/GRANT TX PRIORITY escalation threshold -// <0-255:1> -// Sets the threshold for escalating TX PRIORITY to high priority due to MAC failures from CCA/GRANT denials (five consecutive CCA/GRANT denials is one MAC failure) -// Default: 4 -#define SL_RAIL_UTIL_COEX_CCA_THRESHOLD 4 - -// MAC Fail TX PRIORITY escalation threshold -// <0-3:1> -// Sets the threshold for escalating TX PRIORITY to high priority due to MAC failures from CCA/GRANT denials (five consecutive CCA/GRANT denials is one MAC failure) or no RX_ACK received (four consecutive RX_ACK failures is one MAC failure) -// Default: 0 -#define SL_RAIL_UTIL_COEX_MAC_FAIL_THRESHOLD 0 -// -// - -// PWM REQUEST -// Enable PWM REQUEST signal -// Default: 0 -#define SL_RAIL_UTIL_COEX_PWM_REQ_ENABLED 0 - -// PWM REQUEST signal level (shared REQUEST only) -// <1=> High -// <0=> Low -// Polarity of PWM request (PWM_REQ) signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_PWM_REQ_ASSERT_LEVEL 1 - -// Enable PWM REQUEST at startup -// Enable PWM REQUEST at startup (also run-time controllable) -// Default: 1 -#define SL_RAIL_UTIL_COEX_PWM_DEFAULT_ENABLED 1 - -// PWM Request Period (0.5ms steps) -// <5-109> -// PWM REQUEST Period (5ms to 109ms in 0.5ms steps) -// Default: 78 -#define SL_RAIL_UTIL_COEX_PWM_REQ_PERIOD 78 - -// PWM Request Duty-Cycle (%) -// <1-95:1> -// PWM REQUEST Duty-Cycle (1% to 95% in 1% steps) -// Default: 20 -#define SL_RAIL_UTIL_COEX_PWM_REQ_DUTYCYCLE 20 - -// Assert priority when PWM REQUEST asserted -// Assert a high priority when local device is asserting PWM -// Default: 0 -#define SL_RAIL_UTIL_COEX_PWM_PRIORITY 0 - -// BLE Only PWM Configuration -// Enable PWM only when local device is scanning -// Enable PWM only when local device is scanning -// Default: 0 -#define SL_RAIL_UTIL_COEX_SCANPWM_DEFAULT_ENABLED 0 -// -// - -// Radio Hold-off -// Default: 0 -#define SL_RAIL_UTIL_COEX_RHO_ENABLED 0 -// RHO assert signal level -// <1=> High -// <0=> Low -// Polarity of radio hold-off (RHO) signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_RHO_ASSERT_LEVEL 1 -// - -// Directional PRIORITY -// Enable Directional PRIORITY signal -// Default: 0 -#define SL_RAIL_UTIL_COEX_DP_ENABLED 0 -// Directional PRIORITY pulse width -// <0-255:1> -// Microseconds to hold Directional PRIORITY priority pulse -// Default: 20 -#define SL_RAIL_UTIL_COEX_DP_PULSE_WIDTH_US 20 -// - -// RX active -// Enable RX active signal -// Default: 0 -#define SL_RAIL_UTIL_COEX_RX_ACTIVE_ENABLED 0 - -// RX active assert signal level -// <1=> High -// <0=> Low -// Polarity of RX active signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_RX_ACTIVE_ASSERT_LEVEL 1 -// - -// -// <<< end of configuration section >>> - -#endif // SL_RAIL_UTIL_COEX_COMMON_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_coex_config.h b/src/rcp-uart-802154/config/sl_rail_util_coex_config.h deleted file mode 100644 index 65c1522c..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_coex_config.h +++ /dev/null @@ -1,190 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Coexistence configuration header 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_COEX_CONFIG_H -#define SL_RAIL_UTIL_COEX_CONFIG_H - -#include "sl_rail_util_coex_common_config.h" - -// <<< Use Configuration Wizard in Context Menu >>> -// Coexistence signal identifier configuration -// IEEE802.15.4 only configuration -// Enable coexistence IEEE802.15.4 signal identifier -// Default: 0 -#define SL_RAIL_UTIL_COEX_IEEE802154_SIGNAL_IDENTIFIER_ENABLED 0 -// -// BLE only Configuration -// Enable coexistence BLE signal identifier -// Default: 0 -#define SL_RAIL_UTIL_COEX_BLE_SIGNAL_IDENTIFIER_ENABLED 0 -// BLE signal identifier mode -// <1=> BLE 1Mbps -// <2=> BLE 2Mbps -// 1: Signal identifier detects BLE 1Mbps signals 2: Signal identifier detects BLE 2Mbps signals -// Default: 1 -#define SL_RAIL_UTIL_COEX_BLE_SIGNAL_IDENTIFIER_MODE 1 -// Minimum number of microseconds that should be available in the scanning window for hopping to next channel when signal identifier is enabled -// <300-2000:1> -// Default: 300 -#define SL_RAIL_UTIL_COEX_BLE_MIN_TIME_FOR_HOPPING 300 -// -// Polarity of Wifi Tx signal -// <1=> High -// <0=> Low -// Polarity of WiFi Tx signal -// Default: 1 -#define SL_RAIL_UTIL_COEX_WIFI_TX_ASSERT_LEVEL 1 -// -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -#if SL_RAIL_UTIL_COEX_GNT_ENABLED -// Pin used for grant (GNT) signal -// SL_RAIL_UTIL_COEX_GNT -// $[GPIO_SL_RAIL_UTIL_COEX_GNT] -// #define SL_RAIL_UTIL_COEX_GNT_PORT gpioPortC -// #define SL_RAIL_UTIL_COEX_GNT_PIN 9 -// [GPIO_SL_RAIL_UTIL_COEX_GNT]$ -#ifndef SL_RAIL_UTIL_COEX_GNT_PORT -#error "SL_RAIL_UTIL_COEX_GNT undefined" -#endif //SL_RAIL_UTIL_COEX_GNT_PORT -#endif //SL_RAIL_UTIL_COEX_GNT_ENABLED - -#if SL_RAIL_UTIL_COEX_PRI_ENABLED -// Pin used for PRIORITY signal -// SL_RAIL_UTIL_COEX_PRI -// $[GPIO_SL_RAIL_UTIL_COEX_PRI] -// #define SL_RAIL_UTIL_COEX_PRI_PORT gpioPortD -// #define SL_RAIL_UTIL_COEX_PRI_PIN 13 -// [GPIO_SL_RAIL_UTIL_COEX_PRI]$ -#if !defined(SL_RAIL_UTIL_COEX_PRI_PORT) && !SL_RAIL_UTIL_COEX_DP_ENABLED -#error "SL_RAIL_UTIL_COEX_PRI undefined" -#endif //!defined(SL_RAIL_UTIL_COEX_PRI_PORT) && !SL_RAIL_UTIL_COEX_DP_ENABLED -#endif //SL_RAIL_UTIL_COEX_PRI_ENABLED - -#if SL_RAIL_UTIL_COEX_REQ_ENABLED -// Pin used for Request signal -// SL_RAIL_UTIL_COEX_REQ -// $[GPIO_SL_RAIL_UTIL_COEX_REQ] -// #define SL_RAIL_UTIL_COEX_REQ_PORT gpioPortC -// #define SL_RAIL_UTIL_COEX_REQ_PIN 10 -// [GPIO_SL_RAIL_UTIL_COEX_REQ]$ -#ifndef SL_RAIL_UTIL_COEX_REQ_PORT -#error "SL_RAIL_UTIL_COEX_REQ undefined" -#endif //SL_RAIL_UTIL_COEX_REQ_PORT -#endif //SL_RAIL_UTIL_COEX_REQ_ENABLED - -#if SL_RAIL_UTIL_COEX_PWM_REQ_ENABLED && SL_RAIL_UTIL_COEX_REQ_SHARED -// Pin used for PWM Request signal -// SL_RAIL_UTIL_COEX_PWM_REQ -// $[GPIO_SL_RAIL_UTIL_COEX_PWM_REQ] -// #define SL_RAIL_UTIL_COEX_PWM_REQ_PORT gpioPortC -// #define SL_RAIL_UTIL_COEX_PWM_REQ_PIN 11 -// [GPIO_SL_RAIL_UTIL_COEX_PWM_REQ]$ -#ifndef SL_RAIL_UTIL_COEX_PWM_REQ_PORT -#error "SL_RAIL_UTIL_COEX_PWM_REQ undefined" -#endif //SL_RAIL_UTIL_COEX_PWM_REQ_PORT -#endif //SL_RAIL_UTIL_COEX_PWM_REQ_ENABLED && SL_RAIL_UTIL_COEX_REQ_SHARED - -#if SL_RAIL_UTIL_COEX_RHO_ENABLED -// Pin used for Radio Holdoff signal -// SL_RAIL_UTIL_COEX_RHO -// $[GPIO_SL_RAIL_UTIL_COEX_RHO] -// #define SL_RAIL_UTIL_COEX_RHO_PORT gpioPortC -// #define SL_RAIL_UTIL_COEX_RHO_PIN 8 -// [GPIO_SL_RAIL_UTIL_COEX_RHO]$ -#ifndef SL_RAIL_UTIL_COEX_RHO_PORT -#error "SL_RAIL_UTIL_COEX_RHO undefined" -#endif //SL_RAIL_UTIL_COEX_RHO_PORT -#endif //SL_RAIL_UTIL_COEX_RHO_ENABLED - -#if SL_RAIL_UTIL_COEX_DP_ENABLED -// Pin used for Directional Priority signal -// SL_RAIL_UTIL_COEX_DP_OUT -// $[PRS_SL_RAIL_UTIL_COEX_DP_OUT] -// #define SL_RAIL_UTIL_COEX_DP_OUT_CHANNEL 3 - -// PRS CH3 on PD12 -// #define SL_RAIL_UTIL_COEX_DP_OUT_PORT gpioPortD -// #define SL_RAIL_UTIL_COEX_DP_OUT_PIN 12 -// [PRS_SL_RAIL_UTIL_COEX_DP_OUT]$ - -// Directional Priority timer module -// SL_RAIL_UTIL_COEX_DP_TIMER -// $[TIMER_SL_RAIL_UTIL_COEX_DP_TIMER] -// #define SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL TIMER1 -// #define SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL_NO 1 -#ifndef SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL -#error "SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL undefined" -#endif //SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL - -// #define SL_RAIL_UTIL_COEX_DP_TIMER_CC0_CHANNEL 1 -// [TIMER_SL_RAIL_UTIL_COEX_DP_TIMER]$ -#ifndef SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL -#error "SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL undefined" -#endif //SL_RAIL_UTIL_COEX_DP_TIMER_PERIPHERAL -#endif //SL_RAIL_UTIL_COEX_DP_ENABLED - -#if SL_RAIL_UTIL_COEX_RX_ACTIVE_ENABLED -// Pin used for RX active signal -// SL_RAIL_UTIL_COEX_RX_ACTIVE -// $[PRS_SL_RAIL_UTIL_COEX_RX_ACTIVE] -// #define SL_RAIL_UTIL_COEX_RX_ACTIVE_CHANNEL 8 - -// PRS CH8 on PD13 -// #define SL_RAIL_UTIL_COEX_RX_ACTIVE_PORT gpioPortD -// #define SL_RAIL_UTIL_COEX_RX_ACTIVE_PIN 13 -// [PRS_SL_RAIL_UTIL_COEX_RX_ACTIVE]$ -#ifndef SL_RAIL_UTIL_COEX_RX_ACTIVE_PORT -#error "SL_RAIL_UTIL_COEX_RX_ACTIVE_PORT undefined" -#endif //SL_RAIL_UTIL_COEX_RX_ACTIVE_PORT -#ifndef SL_RAIL_UTIL_COEX_RX_ACTIVE_CHANNEL -#error "SL_RAIL_UTIL_COEX_RX_ACTIVE_CHANNEL undefined" -#endif //SL_RAIL_UTIL_COEX_RX_ACTIVE_CHANNEL -#endif //SL_RAIL_UTIL_COEX_RX_ACTIVE_ENABLED - -#if (SL_RAIL_UTIL_COEX_IEEE802154_SIGNAL_IDENTIFIER_ENABLED || SL_RAIL_UTIL_COEX_BLE_SIGNAL_IDENTIFIER_ENABLED) -// Pin used for WiFi Tx -// SL_RAIL_UTIL_COEX_WIFI_TX -// $[PRS_SL_RAIL_UTIL_COEX_WIFI_TX] -// #define SL_RAIL_UTIL_COEX_WIFI_TX_CHANNEL 4 - -// #define SL_RAIL_UTIL_COEX_WIFI_TX_PORT gpioPortC -// #define SL_RAIL_UTIL_COEX_WIFI_TX_PIN 9 -// [PRS_SL_RAIL_UTIL_COEX_WIFI_TX]$ -#ifndef SL_RAIL_UTIL_COEX_WIFI_TX_PORT -#error "SL_RAIL_UTIL_COEX_WIFI_TX_PORT undefined" -#endif // SL_RAIL_UTIL_COEX_WIFI_TX_PORT -#endif // SL_RAIL_UTIL_COEX_IEEE802154_SIGNAL_IDENTIFIER_ENABLED || SL_RAIL_UTIL_COEX_BLE_SIGNAL_IDENTIFIER_ENABLED - -// <<< sl:end pin_tool >>> - -#endif // SL_RAIL_UTIL_COEX_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_dma_config.h b/src/rcp-uart-802154/config/sl_rail_util_dma_config.h deleted file mode 100644 index 7f97acfc..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_dma_config.h +++ /dev/null @@ -1,52 +0,0 @@ -/***************************************************************************//** - * @file - * @brief - ******************************************************************************* - * # 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_DMA_CONFIG_H -#define SL_RAIL_UTIL_DMA_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// DMA Configuration -// Allocate DMA channel to RAIL (to decrease channel config switching time) -// Default: 1 -#define SL_RAIL_UTIL_DMA_ENABLE 1 -// Use DMA Driver (i.e., auto-select DMA channel) -// Default: 1 -#define SL_RAIL_UTIL_DMA_DMADRV_ENABLE 1 -// Use Specific DMA Channel (if DMA driver not used) -// <0-16:1> -// Default: 0 -#define SL_RAIL_UTIL_DMA_CHANNEL 0 -// -// - -// <<< end of configuration section >>> - -#endif // SL_RAIL_UTIL_DMA_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_ieee802154_fast_channel_switching_config.h b/src/rcp-uart-802154/config/sl_rail_util_ieee802154_fast_channel_switching_config.h deleted file mode 100644 index 374a5b66..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_ieee802154_fast_channel_switching_config.h +++ /dev/null @@ -1,49 +0,0 @@ -/***************************************************************************//** - * @file - * @brief IEEE802.15.4 fast channel switching configuration file. - ******************************************************************************* - * # License - * Copyright 2023 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_UITL_IEEE802154_FAST_CHANNEL_SWITCHING_CONFIG_H -#define SL_RAIL_UITL_IEEE802154_FAST_CHANNEL_SWITCHING_CONFIG_H - -#include "rail_features.h" - -#if RAIL_IEEE802154_SUPPORTS_RX_CHANNEL_SWITCHING == 0 -#error "IEEE.802.15.4 RX channel switching unsupported on this platform!" -#endif //RAIL_IEEE802154_SUPPORTS_RX_CHANNEL_SWITCHING - -#define sl_rail_util_ieee802154_is_fast_channel_switching_phy_selected() SL_RAIL_UTIL_IEEE802154_FAST_CHANNEL_SWITCHING_ENABLED - -// <<< Use Configuration Wizard in Context Menu >>> -// IEEE802.15.4 Fast Channel Switching Configuration -// Enable fast channel switching -// Default: 1 -#define SL_RAIL_UTIL_IEEE802154_FAST_CHANNEL_SWITCHING_ENABLED 1 -// -// <<< end of configuration section >>> -#endif //SL_RAIL_UITL_IEEE802154_FAST_CHANNEL_SWITCHING_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_pa_config.h b/src/rcp-uart-802154/config/sl_rail_util_pa_config.h deleted file mode 100644 index 84b836c2..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_pa_config.h +++ /dev/null @@ -1,81 +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 -// Highest Possible -// High Power (chip-specific) -// Medium Power (chip-specific) -// Low Power -// Disable -// Default: RAIL_TX_POWER_MODE_2P4GIG_HIGHEST -#define SL_RAIL_UTIL_PA_SELECTION_2P4GHZ RAIL_TX_POWER_MODE_2P4GIG_HIGHEST -// Sub-1 GHz PA Selection -// Disable -// Default: RAIL_TX_POWER_MODE_NONE -#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 \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_pti_config.h b/src/rcp-uart-802154/config/sl_rail_util_pti_config.h deleted file mode 100644 index de9d71ae..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_pti_config.h +++ /dev/null @@ -1,82 +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 PC04 -#ifndef SL_RAIL_UTIL_PTI_DOUT_PORT -#define SL_RAIL_UTIL_PTI_DOUT_PORT gpioPortC -#endif -#ifndef SL_RAIL_UTIL_PTI_DOUT_PIN -#define SL_RAIL_UTIL_PTI_DOUT_PIN 4 -#endif - -// PTI DFRAME on PC05 -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PORT -#define SL_RAIL_UTIL_PTI_DFRAME_PORT gpioPortC -#endif -#ifndef SL_RAIL_UTIL_PTI_DFRAME_PIN -#define SL_RAIL_UTIL_PTI_DFRAME_PIN 5 -#endif - -// [PTI_SL_RAIL_UTIL_PTI]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_RAIL_UTIL_PTI_CONFIG_H diff --git a/src/rcp-uart-802154/config/sl_rail_util_rf_path_config.h b/src/rcp-uart-802154/config/sl_rail_util_rf_path_config.h deleted file mode 100644 index 464e91c3..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_rf_path_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @file - * @brief - ******************************************************************************* - * # 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_RF_PATH_CONFIG_H -#define SL_RAIL_UTIL_RF_PATH_CONFIG_H - -#include "rail_types.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// Chip-internal RF Path Configuration -// RF Path Mode -// Path 0 -// Path 1 -// Default: RAIL_ANTENNA_1 -#define SL_RAIL_UTIL_RF_PATH_INT_RF_PATH_MODE RAIL_ANTENNA_1 -// - -// <<< end of configuration section >>> - -#endif // SL_RAIL_UTIL_RF_PATH_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rail_util_rssi_config.h b/src/rcp-uart-802154/config/sl_rail_util_rssi_config.h deleted file mode 100644 index 1365e6e5..00000000 --- a/src/rcp-uart-802154/config/sl_rail_util_rssi_config.h +++ /dev/null @@ -1,44 +0,0 @@ -/***************************************************************************//** - * @file - * @brief RSSI configuration header 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_RSSI_CONFIG_H -#define SL_RAIL_UTIL_RSSI_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// RSSI Offset Configuration - -// Software RSSI offset value -// Default: -11 -#define SL_RAIL_UTIL_RSSI_OFFSET -11 - -// -// <<< end of configuration section >>> -#endif // SL_RAIL_UTIL_RSSI_CONFIG_H \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_rcp_gp_interface_config.h b/src/rcp-uart-802154/config/sl_rcp_gp_interface_config.h deleted file mode 100644 index db54b80d..00000000 --- a/src/rcp-uart-802154/config/sl_rcp_gp_interface_config.h +++ /dev/null @@ -1,14 +0,0 @@ -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- - -// Rx Offset time -// The rx offset time for the bidirectional message. -// -#define GP_RX_OFFSET_IN_MICRO_SECONDS 21000 -// - -// TX Timeout -// Tx timeout after which the gp outgoing packet is invalid. -// -#define GP_TX_MAX_TIMEOUT_IN_MICRO_SECONDS 5000000 -// -// <<< end of configuration section >>> \ No newline at end of file diff --git a/src/rcp-uart-802154/config/sl_sleeptimer_config.h b/src/rcp-uart-802154/config/sl_sleeptimer_config.h deleted file mode 100644 index bba646d6..00000000 --- a/src/rcp-uart-802154/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 >>> \ No newline at end of file diff --git a/src/rcp-uart-802154/config/ustimer_config.h b/src/rcp-uart-802154/config/ustimer_config.h deleted file mode 100644 index b50a57f7..00000000 --- a/src/rcp-uart-802154/config/ustimer_config.h +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************//** - * @file - * @brief USTIMER configuration file. - ******************************************************************************* - * # 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. - * - ******************************************************************************/ -#ifndef __SILICON_LABS_USTIMER_CONFIG_H__ -#define __SILICON_LABS_USTIMER_CONFIG_H__ - -/***************************************************************************//** - * @addtogroup ustimer - * @{ - ******************************************************************************/ - -// <<< sl:start pin_tool >>> -// USTIMER -// $[TIMER_USTIMER] -#ifndef USTIMER_PERIPHERAL -#define USTIMER_PERIPHERAL TIMER0 -#endif -#ifndef USTIMER_PERIPHERAL_NO -#define USTIMER_PERIPHERAL_NO 0 -#endif -// [TIMER_USTIMER]$ - -// <<< sl:end pin_tool >>> - -#define USTIMER_TIMER USTIMER_PERIPHERAL_NO - -/** @} (end addtogroup ustimer) */ - -#endif /* __SILICON_LABS_USTIMER_CONFIG_H__ */ diff --git a/src/rcp-uart-802154/gbl_metadata.yaml b/src/rcp-uart-802154/gbl_metadata.yaml deleted file mode 100644 index 3ece2e36..00000000 --- a/src/rcp-uart-802154/gbl_metadata.yaml +++ /dev/null @@ -1,3 +0,0 @@ -baudrate: 460800 -dynamic: [ezsp_version, ot_rcp_version, cpc_version] -fw_type: rcp-uart-802154 diff --git a/src/rcp-uart-802154/main.c b/src/rcp-uart-802154/main.c deleted file mode 100644 index 143e4cdf..00000000 --- a/src/rcp-uart-802154/main.c +++ /dev/null @@ -1,60 +0,0 @@ -/***************************************************************************//** - * @file - * @brief main() function. - ******************************************************************************* - * # 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. - * - ******************************************************************************/ -#include "sl_component_catalog.h" -#include "sl_system_init.h" -#include "app.h" -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#include "sl_power_manager.h" -#endif // SL_CATALOG_POWER_MANAGER_PRESENT -#if defined(SL_CATALOG_KERNEL_PRESENT) -#include "sl_system_kernel.h" -#else // !SL_CATALOG_KERNEL_PRESENT -#include "sl_system_process_action.h" -#endif // SL_CATALOG_KERNEL_PRESENT - -int main(void) -{ - // Initialize Silicon Labs device, system, service(s) and protocol stack(s). - // Note that if the kernel is present, processing task(s) will be created by - // this call. - sl_system_init(); - - // Initialize the application. For example, create periodic timer(s) or - // task(s) if the kernel is present. - app_init(); - -#if defined(SL_CATALOG_KERNEL_PRESENT) - // Start the kernel. Task(s) created in app_init() will start running. - sl_system_kernel_start(); -#else // SL_CATALOG_KERNEL_PRESENT - while (1) { - // Do not remove this call: Silicon Labs components process action routine - // must be called from the super loop. - sl_system_process_action(); - - // Application process. - app_process_action(); - -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - // Let the CPU go to sleep if the system allows it. - sl_power_manager_sleep(); -#endif - } - // Clean-up when exiting the application. - app_exit(); -#endif // SL_CATALOG_KERNEL_PRESENT -} \ No newline at end of file diff --git a/src/rcp-uart-802154/rcp-uart-802154.pintool b/src/rcp-uart-802154/rcp-uart-802154.pintool deleted file mode 100644 index e975562e..00000000 --- a/src/rcp-uart-802154/rcp-uart-802154.pintool +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/rcp-uart-802154/rcp-uart-802154.slcp b/src/rcp-uart-802154/rcp-uart-802154.slcp deleted file mode 100644 index 023c9721..00000000 --- a/src/rcp-uart-802154/rcp-uart-802154.slcp +++ /dev/null @@ -1,67 +0,0 @@ -# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. -project_name: rcp-uart-802154 -label: rcp-uart-802154 -description: | - This multiprotocol radio co-processor (RCP) application supports running OpenThread and Zigbee stacks simultaneously on a host processor. It uses concurrent multiprotocol (CMP) / multi-PAN functionality to run the 802.15.4 networks simultaneously on the same channel. The host stacks and the RCP communicate using the Co-Processor Communication protocol (CPC), which acts as a protocol multiplexer and serial transport layer. The host applications connect to the CPC daemon, which in turn connects to the EFR via a UART link. Refer to *AN1333: Running Zigbee, OpenThread, and Bluetooth Concurrently on a Linux Host with a Multiprotocol Co-processor* for more information on running the multiprotocol RCP with different host applications. -category: OpenThread Examples -filter: -- name: Capability - value: [Multiprotocol] -- name: Device Type - value: [RCP] -- name: Project Difficulty - value: [Advanced] -- name: Wireless Technology - value: [Thread, Zigbee] -package: OpenThread -quality: production -readme: -- {path: README-MP-RCP.md} -source: -- {path: main.c} -- {path: app.c} -tag: [prebuilt_demo] -include: -- path: . - file_list: - - {path: app.h} - - {path: reset_util.h} -sdk: {id: gecko_sdk, version: 4.4.4} -toolchain_settings: [] -component: -- {from: nc_efr32_watchdog, id: nc_efr32_watchdog} -- {id: EFR32MG21A010F1024IM32} -- {id: bootloader_interface} -- {id: brd4001a} -- {id: brd4179b} -- instance: [vcom] - id: cpc_secondary_driver_uart_usart -- {id: cpc_security_secondary_none} -- {id: ot_crash_handler} -- {id: ot_ncp_cpc} -- {id: ot_rcp_gp_interface} -- {id: ot_stack_rcp} -- {id: rail_util_pti} -define: -- {name: OPENTHREAD_CONFIG_PLATFORM_ASSERT_MANAGEMENT, value: '1'} -configuration: -- {name: SL_STACK_SIZE, value: '2752'} -- {name: SL_BOARD_ENABLE_VCOM, value: '1'} -- {name: SL_CPC_DRV_UART_VCOM_BAUDRATE, value: '460800'} -- {name: SL_CPC_DRV_UART_VCOM_FLOW_CONTROL_TYPE, value: usartHwFlowControlCtsAndRts} -- {name: OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE, value: '0'} -- {name: OPENTHREAD_CONFIG_DIAG_ENABLE, value: '1'} -- {name: OPENTHREAD_CONFIG_LOG_OUTPUT, value: OPENTHREAD_CONFIG_LOG_OUTPUT_NONE} -- {name: OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE, value: '1'} -- {name: OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE, value: '0'} -- {name: OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE, value: '0'} -- {name: OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE, value: '0'} -- {name: SL_CPC_RX_BUFFER_MAX_COUNT, value: '15'} -- {name: SL_CPC_TX_QUEUE_ITEM_MAX_COUNT, value: '15'} -- {name: SL_CPC_USER_ENDPOINT_MAX_COUNT, value: '0'} -ui_hints: - highlight: - - {path: ./README-MP-RCP.md, focus: true} -sdk_extension: -- {id: nc_efr32_watchdog, version: 1.0.0} - diff --git a/src/rcp-uart-802154/rcp-uart-802154.slps b/src/rcp-uart-802154/rcp-uart-802154.slps deleted file mode 100644 index ff7fd91b..00000000 --- a/src/rcp-uart-802154/rcp-uart-802154.slps +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/rcp-uart-802154/reset_util.h b/src/rcp-uart-802154/reset_util.h deleted file mode 100644 index 52f56813..00000000 --- a/src/rcp-uart-802154/reset_util.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2022, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef OT_LIB_PLATFORM_RESET_UTIL_H_ -#define OT_LIB_PLATFORM_RESET_UTIL_H_ - -#if defined(OPENTHREAD_ENABLE_COVERAGE) && OPENTHREAD_ENABLE_COVERAGE && defined(__GNUC__) -#if __GNUC__ >= 11 || (defined(__clang__) && (defined(__APPLE__) && (__clang_major__ >= 13)) || \ - (!defined(__APPLE__) && (__clang_major__ >= 12))) -void __gcov_dump(); -void __gcov_reset(); - -static void flush_gcov(void) -{ - __gcov_dump(); - __gcov_reset(); -} -#else -void __gcov_flush(void); -#define flush_gcov __gcov_flush -#endif /* __GNUC__ >= 11 || (defined(__clang__) && (defined(__APPLE__) && (__clang_major__ >= 13)) || \ - (!defined(__APPLE__) && (__clang_major__ >= 12))) */ -#else -#define flush_gcov() -#endif // defined(OPENTHREAD_ENABLE_COVERAGE) && OPENTHREAD_ENABLE_COVERAGE && defined(__GNUC__) - -#if defined(__linux__) || defined(__APPLE__) -#include -#include -jmp_buf gResetJump; - -#define OT_SETUP_RESET_JUMP(kArgv) \ - if (setjmp(gResetJump)) \ - { \ - alarm(0); \ - flush_gcov(); \ - execvp(kArgv[0], kArgv); \ - } - -#else -#define OT_SETUP_RESET_JUMP(ARGV) -#endif // defined(__linux__) || defined(__APPLE__) - -#endif // OT_LIB_PLATFORM_RESET_UTIL_H_ diff --git a/src/ncp-uart-hw/app.c b/src/zigbee_ncp/app.c similarity index 100% rename from src/ncp-uart-hw/app.c rename to src/zigbee_ncp/app.c diff --git a/src/ncp-uart-hw/main.c b/src/zigbee_ncp/main.c similarity index 100% rename from src/ncp-uart-hw/main.c rename to src/zigbee_ncp/main.c diff --git a/src/zigbee_ncp/zigbee_ncp.slcp b/src/zigbee_ncp/zigbee_ncp.slcp new file mode 100644 index 00000000..8885e521 --- /dev/null +++ b/src/zigbee_ncp/zigbee_ncp.slcp @@ -0,0 +1,71 @@ +project_name: zigbee_ncp +label: Zigbee - NCP +package: Zigbee +category: Zigbee Application +quality: production +description: Zigbee NCP firmware. Derived from the `ncp-uart-hw` example Gecko SDK project. +author: Nabu Casa + +component: + - id: iostream_usart + instance: + - vcom + - id: zigbee_debug_print + - id: iostream_vuart + - id: token_manager + - id: zigbee_token_interface + - id: zigbee_mfglib + - id: zigbee_pro_stack + - id: zigbee_source_route + - id: zigbee_gp + - id: zigbee_r22_support + - id: zigbee_security_link_keys + - id: zigbee_zll + - id: zigbee_app_framework_common + - id: zigbee_ncp_uart_hardware + - id: zigbee_debug_basic + - id: zigbee_debug_extended + - id: rail_util_rssi + +define: + - name: EMBER_CUSTOM_MAC_FILTER_TABLE_SIZE + value: 15 + +configuration: + - name: SL_CLI_MAX_INPUT_ARGUMENTS + value: 16 + - name: SL_BOARD_ENABLE_VCOM + value: 1 + - name: SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE + value: usartHwFlowControlCtsAndRts + - name: SL_CLI_EXAMPLE_IOSTREAM_HANDLE + value: sl_iostream_vuart_handle + - name: NVM3_DEFAULT_NVM_SIZE + value: 36864 + condition: + - device_series_1 + - name: NVM3_DEFAULT_NVM_SIZE + value: 32768 + condition: + - device_series_2 + # If using zigbee_secure_key_storage we do not need to support backwards + # compatibility because we have never deployed images with keys in PSA + # As a result, these lines end up saving some code space + - 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 + +source: + - path: main.c + - path: app.c + +filter: + - name: Wireless Technology + value: [Zigbee] + - name: Device Type + value: [NCP] + - name: Project Difficulty + value: [Advanced] diff --git a/src/zwave_ncp/SerialAPI.h b/src/zwave_ncp/SerialAPI.h new file mode 100644 index 00000000..be9476a6 --- /dev/null +++ b/src/zwave_ncp/SerialAPI.h @@ -0,0 +1,387 @@ +/** + * @file + * @copyright 2019 Silicon Laboratories Inc. + */ +#ifndef _ZW_SERIALAPI_H_ +#define _ZW_SERIALAPI_H_ + + +/** + * @addtogroup ZWaveAPI + * @{ + * @addtogroup ZWSerialAPI Z-Wave Serial API + * @{ + */ + +#define SOF 0x01 ///< Start Of Frame +#define ACK 0x06 ///< Acknowledge successful frame reception +#define NAK 0x15 ///< Not Acknowledge successful frame reception - please retransmit... +#define CAN 0x18 ///< Frame received (from host) was dropped - waiting for ACK + +///@addtogroup FT Frame Types +/// @{ +#define REQUEST 0x00 +#define RESPONSE 0x01 +///@} + +///@addtogroup GET_INIT_DATA_FLAG +/// Flags used in FUNC_ID_SERIAL_API_GET_INIT_DATA functionality +/// @{ +#define GET_INIT_DATA_FLAG_SLAVE_API 0x01 +#define GET_INIT_DATA_FLAG_TIMER_SUPPORT 0x02 +#define GET_INIT_DATA_FLAG_CONTROLLER_STATUS 0x04 /* Obsolete. USE next */ +#define GET_INIT_DATA_FLAG_SECONDARY_CTRL 0x04 +#define GET_INIT_DATA_FLAG_IS_SUC 0x08 +///@} + +/** + * Firmware update functionality specifics + * Enum definitions for Firmware Update functionality selector; firmwareUpdateFunction + */ +typedef enum +{ + FIRMWARE_UPDATE_NVM_INIT = 0, + FIRMWARE_UPDATE_NVM_SET_NEW_IMAGE = 1, + FIRMWARE_UPDATE_NVM_GET_NEW_IMAGE = 2, + FIRMWARE_UPDATE_NVM_UPDATE_CRC16 = 3, + FIRMWARE_UPDATE_NVM_IS_VALID_CRC16 = 4, + FIRMWARE_UPDATE_NVM_WRITE = 5, + FIRMWARE_UPDATE_NVM_UNKNOWN = 0xFF +} FIRMWARE_UPDATE_NVM_T; + +/** + * @addtogroup FUNC_ID + * Function IDs + * @{ + */ +#define FUNC_ID_SERIAL_API_GET_INIT_DATA 0x02 +#define FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION 0x03 +#define FUNC_ID_APPLICATION_COMMAND_HANDLER 0x04 +#define FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES 0x05 + +/* SERIAL API ver 4 added - START */ +#define FUNC_ID_SERIAL_API_SET_TIMEOUTS 0x06 +#define FUNC_ID_SERIAL_API_GET_CAPABILITIES 0x07 +#define FUNC_ID_SERIAL_API_SOFT_RESET 0x08 +/* SERIAL API ver 4 added - END */ + +#define FUNC_ID_ZW_GET_PROTOCOL_VERSION 0x09 + +/* Function ID for startup message */ +#define FUNC_ID_SERIAL_API_STARTED 0x0A +#define FUNC_ID_SERIAL_API_SETUP 0x0B + +#define FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 0x0C + +#define FUNC_ID_ZW_SEND_DATA_EX 0x0E +#define FUNC_ID_ZW_SEND_DATA_MULTI_EX 0x0F + +#define FUNC_ID_ZW_SET_RF_RECEIVE_MODE 0x10 +#define FUNC_ID_ZW_SET_SLEEP_MODE 0x11 +#define FUNC_ID_ZW_SEND_NODE_INFORMATION 0x12 +#define FUNC_ID_ZW_SEND_DATA 0x13 +#define FUNC_ID_ZW_SEND_DATA_MULTI 0x14 +#define FUNC_ID_ZW_GET_VERSION 0x15 + +/* SERIAL API ver 4 added - START */ +#define FUNC_ID_ZW_SEND_DATA_ABORT 0x16 +// FUNC_ID_ZW_RF_POWER_LEVEL_SET is no longer supported +#define FUNC_ID_ZW_RF_POWER_LEVEL_SET 0x17 +#define FUNC_ID_ZW_SEND_DATA_META 0x18 +/* SERIAL API ver 4 added - END */ + +#define FUNC_ID_ZW_RESERVED_SD 0x19 +#define FUNC_ID_ZW_RESERVED_SDM 0x1A +#define FUNC_ID_ZW_RESERVED_SRI 0x1B + +#define FUNC_ID_ZW_SET_ROUTING_INFO 0x1B + +#define FUNC_ID_ZW_GET_RANDOM 0x1C +#define FUNC_ID_ZW_RANDOM 0x1D +#define FUNC_ID_ZW_RF_POWER_LEVEL_REDISCOVERY_SET 0x1E + +#define FUNC_ID_MEMORY_GET_ID 0x20 +#define FUNC_ID_MEMORY_GET_BYTE 0x21 +#define FUNC_ID_MEMORY_PUT_BYTE 0x22 +#define FUNC_ID_MEMORY_GET_BUFFER 0x23 +#define FUNC_ID_MEMORY_PUT_BUFFER 0x24 +/* Unimplemented - START */ +#define FUNC_ID_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0x25 +#define FUNC_ID_DEBUG_OUTPUT 0x26 +/* Unimplemented - END */ + +#define FUNC_ID_AUTO_PROGRAMMING 0x27 + +#define FUNC_ID_NVR_GET_VALUE 0x28 + +#define FUNC_ID_NVM_GET_ID 0x29 +#define FUNC_ID_NVM_EXT_READ_LONG_BUFFER 0x2A +#define FUNC_ID_NVM_EXT_WRITE_LONG_BUFFER 0x2B +#define FUNC_ID_NVM_EXT_READ_LONG_BYTE 0x2C +#define FUNC_ID_NVM_EXT_WRITE_LONG_BYTE 0x2D +#define FUNC_ID_NVM_BACKUP_RESTORE 0x2E + +#define FUNC_ID_ZW_NVR_GET_APP_VALUE 0x2F + +#define FUNC_ID_CLOCK_SET 0x30 +#define FUNC_ID_CLOCK_GET 0x31 +#define FUNC_ID_CLOCK_CMP 0x32 +#define FUNC_ID_RTC_TIMER_CREATE 0x33 +#define FUNC_ID_RTC_TIMER_READ 0x34 +#define FUNC_ID_RTC_TIMER_DELETE 0x35 +#define FUNC_ID_RTC_TIMER_CALL 0x36 + +#define FUNC_ID_CLEAR_TX_TIMERS 0x37 +#define FUNC_ID_GET_TX_TIMERS 0x38 + +#define FUNC_ID_ZW_CLEAR_NETWORK_STATS 0x39 +#define FUNC_ID_ZW_GET_NETWORK_STATS 0x3A +#define FUNC_ID_ZW_GET_BACKGROUND_RSSI 0x3B +#define FUNC_ID_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD 0x3C +#define FUNC_ID_NVM_EXT_BACKUP_RESTORE 0x3D +#define FUNC_ID_ZW_REMOVE_NODE_ID_FROM_NETWORK 0x3F + +#define FUNC_ID_ZW_SET_LEARN_NODE_STATE 0x40 +#define FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO 0x41 +#define FUNC_ID_ZW_SET_DEFAULT 0x42 +#define FUNC_ID_ZW_NEW_CONTROLLER 0x43 +// +#define FUNC_ID_ZW_REPLICATION_COMMAND_COMPLETE 0x44 +#define FUNC_ID_ZW_REPLICATION_SEND_DATA 0x45 +// +#define FUNC_ID_ZW_ASSIGN_RETURN_ROUTE 0x46 +#define FUNC_ID_ZW_DELETE_RETURN_ROUTE 0x47 +#define FUNC_ID_ZW_REQUEST_NODE_NEIGHBOR_UPDATE 0x48 +#define FUNC_ID_ZW_REQUEST_NODETYPE_NEIGHBOR_UPDATE 0x68 +#define FUNC_ID_ZW_APPLICATION_UPDATE 0x49 + +/** @deprecated Use ZW_APPLICATION_UPDATE */ +#define FUNC_ID_ZW_APPLICATION_CONTROLLER_UPDATE 0x49 + +#define FUNC_ID_ZW_ADD_NODE_TO_NETWORK 0x4A +#define FUNC_ID_ZW_REMOVE_NODE_FROM_NETWORK 0x4B +#define FUNC_ID_ZW_CREATE_NEW_PRIMARY 0x4C +#define FUNC_ID_ZW_CONTROLLER_CHANGE 0x4D + +#define FUNC_ID_ZW_RESERVED_FN 0x4E + +/* Devkit 6.6x */ +#define FUNC_ID_ZW_ASSIGN_PRIORITY_RETURN_ROUTE 0x4F + +/* Slave only */ +#define FUNC_ID_ZW_SET_LEARN_MODE 0x50 +/* Slave only end */ + +#define FUNC_ID_ZW_ASSIGN_SUC_RETURN_ROUTE 0x51 +#define FUNC_ID_ZW_ENABLE_SUC 0x52 +#define FUNC_ID_ZW_REQUEST_NETWORK_UPDATE 0x53 +#define FUNC_ID_ZW_SET_SUC_NODE_ID 0x54 +#define FUNC_ID_ZW_DELETE_SUC_RETURN_ROUTE 0x55 +#define FUNC_ID_ZW_GET_SUC_NODE_ID 0x56 +#define FUNC_ID_ZW_SEND_SUC_ID 0x57 + +/* Devkit 6.6x */ +#define FUNC_ID_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE 0x58 + +/* Obsolete - Not available in devkit 6.6x+ */ +#define FUNC_ID_ZW_REDISCOVERY_NEEDED 0x59 + +#define FUNC_ID_ZW_REQUEST_NODE_NEIGHBOR_UPDATE_OPTION 0x5A + +/* Slave only */ +#define FUNC_ID_ZW_SUPPORT9600_ONLY 0x5B +/* Slave only end */ + +/* Enhanced/Routing Slave only */ +#define FUNC_ID_ZW_REQUEST_NEW_ROUTE_DESTINATIONS 0x5C +#define FUNC_ID_ZW_IS_NODE_WITHIN_DIRECT_RANGE 0x5D +/* Enhanced/Routing Slave only end */ + +#define FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION 0x5E +#define FUNC_ID_ZW_EXPLORE_REQUEST_EXCLUSION 0x5F + +#define FUNC_ID_ZW_REQUEST_NODE_INFO 0x60 +#define FUNC_ID_ZW_REMOVE_FAILED_NODE_ID 0x61 +#define FUNC_ID_ZW_IS_FAILED_NODE_ID 0x62 +#define FUNC_ID_ZW_REPLACE_FAILED_NODE 0x63 + +/* In 6.0x the function id was wrong so we need to support this wrong function id as well in the future */ +#define FUNC_ID_ZW_SET_ROUTING_MAX_6_00 0x65 +/* */ + +#define FUNC_ID_ZW_IS_PRIMARY_CTRL 0x66 + +#define FUNC_ID_ZW_AES_ECB 0x67 + +#define FUNC_ID_TIMER_START 0x70 +#define FUNC_ID_TIMER_RESTART 0x71 +#define FUNC_ID_TIMER_CANCEL 0x72 +#define FUNC_ID_TIMER_CALL 0x73 + +/* Firmware Update API */ +#define FUNC_ID_ZW_FIRMWARE_UPDATE_NVM 0x78 + +/* Installer API */ +#define FUNC_ID_GET_ROUTING_TABLE_LINE 0x80 +#define FUNC_ID_GET_TX_COUNTER 0x81 +#define FUNC_ID_RESET_TX_COUNTER 0x82 +#define FUNC_ID_STORE_NODEINFO 0x83 +#define FUNC_ID_STORE_HOMEID 0x84 +/* Installer API only end */ + +#define FUNC_ID_LOCK_ROUTE_RESPONSE 0x90 +#ifdef ZW_ROUTING_DEMO +/* Max hops in route */ +#define TRANSMIT_ROUTED_ATTEMPT 0x08 +#define FUNC_ID_ZW_SEND_DATA_ROUTE_DEMO 0x91 +#endif + +/* ZW_SetPriorityRoute/ZW_GetPriorityRoute replaces ZW_SetLastWorkingRoute/ZW_GetLastWorkingRoute */ +#define FUNC_ID_ZW_GET_PRIORITY_ROUTE 0x92 +#define FUNC_ID_ZW_SET_PRIORITY_ROUTE 0x93 +/* NOTE: Obsoleted - BEGIN */ +#define FUNC_ID_ZW_GET_LAST_WORKING_ROUTE 0x92 +#define FUNC_ID_ZW_SET_LAST_WORKING_ROUTE 0x93 +/* NOTE: Obsoleted - END */ + +#define FUNC_ID_SERIAL_API_TEST 0x95 + +#define FUNC_ID_SERIAL_API_EXT 0x98 + +/* DevKit 6.7x introduced - slave_enhanced_232 and slave_routing only */ +#define FUNC_ID_ZW_SECURITY_SETUP 0x9C +#define FUNC_ID_APPLICATION_SECURITY_EVENT 0x9D + +/* ZW_CONTROLLER_BRIDGE only START */ +#define FUNC_ID_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0xA0 + +/** @deprecated OBSOLETE: In DevKit 4.5x/6.0x Controller Bridge applications, this is obsoleted + * by the FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE + */ +#define FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER 0xA1 +#define FUNC_ID_ZW_SEND_SLAVE_NODE_INFORMATION 0xA2 +#define FUNC_ID_ZW_SEND_SLAVE_DATA 0xA3 +#define FUNC_ID_ZW_SET_SLAVE_LEARN_MODE 0xA4 +#define FUNC_ID_ZW_GET_VIRTUAL_NODES 0xA5 +#define FUNC_ID_ZW_IS_VIRTUAL_NODE 0xA6 +#define FUNC_ID_ZW_RESERVED_SSD 0xA7 +/* DevKit 4.5x/6.0x added - obsoletes FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER and */ +/* FUNC_ID_APPLICATION_COMMAND_HANDLER for the Controller Bridge applications as */ +/* this handles both cases - only for 4.5x/6.0x based Controller Bridge applications */ +#define FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE 0xA8 +/* DevKit 4.5x/6.0x added - Adds sourceNodeID to the parameter list */ +#define FUNC_ID_ZW_SEND_DATA_BRIDGE 0xA9 +/* Obsolete */ +#define FUNC_ID_ZW_SEND_DATA_META_BRIDGE 0xAA +#define FUNC_ID_ZW_SEND_DATA_MULTI_BRIDGE 0xAB +/* ZW_CONTROLLER_BRIDGE only END */ + +#define FUNC_ID_PWR_SETSTOPMODE 0xB0 // ZW102 only +#define FUNC_ID_PWR_CLK_PD 0xB1 // ZW102 only +#define FUNC_ID_PWR_CLK_PUP 0xB2 // ZW102 only +#define FUNC_ID_PWR_SELECT_CLK 0xB3 // ZW102 only +#define FUNC_ID_ZW_SET_WUT_TIMEOUT 0xB4 +#define FUNC_ID_ZW_IS_WUT_KICKED 0xB5 // ZW201 only + +#define FUNC_ID_ZW_WATCHDOG_ENABLE 0xB6 +#define FUNC_ID_ZW_WATCHDOG_DISABLE 0xB7 +#define FUNC_ID_ZW_WATCHDOG_KICK 0xB8 +/** @deprecated Use FUNC_ID_ZW_INT_EXT_LEVEL_SET */ +#define FUNC_ID_ZW_SET_EXT_INT_LEVEL 0xB9 // ZW201 only +#define FUNC_ID_ZW_INT_EXT_LEVEL_SET 0xB9 + +// FUNC_ID_ZW_RF_POWER_LEVEL_GET is no longer supported +#define FUNC_ID_ZW_RF_POWER_LEVEL_GET 0xBA +#define FUNC_ID_ZW_GET_NEIGHBOR_COUNT 0xBB +#define FUNC_ID_ZW_ARE_NODES_NEIGHBOURS 0xBC + +#define FUNC_ID_ZW_TYPE_LIBRARY 0xBD +#define FUNC_ID_ZW_SEND_TEST_FRAME 0xBE +#define FUNC_ID_ZW_GET_PROTOCOL_STATUS 0xBF + +#define FUNC_ID_ZW_SET_PROMISCUOUS_MODE 0xD0 +/* SERIAL API ver 5 added - START */ +#define FUNC_ID_PROMISCUOUS_APPLICATION_COMMAND_HANDLER 0xD1 +/* SERIAL API ver 5 added - END */ + +#define FUNC_ID_ZW_WATCHDOG_START 0xD2 +#define FUNC_ID_ZW_WATCHDOG_STOP 0xD3 + +#define FUNC_ID_ZW_SET_ROUTING_MAX 0xD4 +/* Unimplemented - START */ +/* Obsoleted */ +#define FUNC_ID_ZW_GET_ROUTING_MAX 0xD5 + +#define FUNC_ID_PM_STAY_AWAKE 0xD7 +#define FUNC_ID_PM_CANCEL 0xD8 +/* Unimplemented - END */ + +/* Allocated for setting the maximum number of 128sec ticks inbetween SmartStart inclusion requests. */ +#define FUNC_ID_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS 0xD6 + +#define FUNC_ID_ZW_INITIATE_SHUTDOWN 0xD9 + +#define FUNC_ID_SERIAL_API_GET_LR_NODES 0xDA + +#define FUNC_ID_GET_LR_CHANNEL 0xDB +#define FUNC_ID_SET_LR_CHANNEL 0xDC + +#define FUNC_ID_ZW_SET_LR_VIRTUAL_IDS 0xDD + +#define FUNC_ID_GET_DCDC_CONFIG 0xDE +#define FUNC_ID_SET_DCDC_CONFIG 0xDF + +/* Allocated for NUNIT test */ +#define FUNC_ID_ZW_NUNIT_CMD 0xE0 // DEPRECATED +#define FUNC_ID_ZW_NUNIT_INIT 0xE1 // DEPRECATED +#define FUNC_ID_ZW_NUNIT_LIST 0xE2 // DEPRECATED +#define FUNC_ID_ZW_NUNIT_RUN 0xE3 // DEPRECATED +#define FUNC_ID_ZW_NUNIT_END 0xE4 // DEPRECATED + +#define FUNC_ID_ENABLE_RADIO_PTI 0xE7 +#define FUNC_ID_GET_RADIO_PTI 0xE8 + +#define FUNC_ID_SEND_NOP 0xE9 //Reserved. Command to be implemented in future. + +/* Allocated for Power Management */ +#define FUNC_ID_SERIAL_API_POWER_MANAGEMENT 0xEE +#define FUNC_ID_SERIAL_API_READY 0xEF + +/* Allocated for proprietary serial API commands */ +#define FUNC_ID_PROPRIETARY_0 0xF0 +#define FUNC_ID_PROPRIETARY_1 0xF1 +#define FUNC_ID_PROPRIETARY_2 0xF2 +#define FUNC_ID_PROPRIETARY_3 0xF3 +#define FUNC_ID_PROPRIETARY_4 0xF4 +#define FUNC_ID_PROPRIETARY_5 0xF5 +#define FUNC_ID_PROPRIETARY_6 0xF6 +#define FUNC_ID_PROPRIETARY_7 0xF7 +#define FUNC_ID_PROPRIETARY_8 0xF8 +#define FUNC_ID_PROPRIETARY_9 0xF9 +#define FUNC_ID_PROPRIETARY_A 0xFA +#define FUNC_ID_PROPRIETARY_B 0xFB +#define FUNC_ID_PROPRIETARY_C 0xFC +#define FUNC_ID_PROPRIETARY_D 0xFD +#define FUNC_ID_PROPRIETARY_E 0xFE + + +/* Illegal function ID */ +#define FUNC_ID_UNKNOWN 0xFF +///@} + +/**size of the address field of NVM_BACKUP_RESTORE or NVM_EXT_BACKUP_RESTORE frames. +Item value is the size in byte of the address field. +*/ +typedef enum +{ + NVM_BACKUP_RESTORE_ADDR_SIZE = 2, ///< 2 bytes for the legacy NVM backup & restore command + NVM_EXT_BACKUP_RESTORE_ADDR_SIZE = 4, ///< 4 bytes for the extended NVM backup & restore command +} nvm_backup_restore_addr_size_t; + + +///@} +///@} + + + +#endif /*_ZW_SERIALAPI_H_*/ diff --git a/src/zwave_ncp/SerialAPI_hw.h b/src/zwave_ncp/SerialAPI_hw.h new file mode 100644 index 00000000..596c9aef --- /dev/null +++ b/src/zwave_ncp/SerialAPI_hw.h @@ -0,0 +1,33 @@ +/** + * @file + * Platform abstraction for Serial API application + * + * @copyright 2022 Silicon Laboratories Inc. + */ +#ifndef SERIALAPI_HW_H_ +#define SERIALAPI_HW_H_ + +/** + * Get zpal-uart config extension. + */ +const void* SerialAPI_get_uart_config_ext(void); + +#ifdef USB_SUSPEND_SUPPORT + +typedef void (*SerialAPI_hw_usb_suspend_callback_t)(void); + +/** + * Set USB suspend callback. + * + * @param[in] callback USB suspend callback. + */ +void SerialAPI_set_usb_supend_callback(SerialAPI_hw_usb_suspend_callback_t callback); + +/** + * USB suspend handler. + */ +void SerialAPI_hw_usb_suspend_handler(void); + +#endif /* USB_SUSPEND_SUPPORT */ + +#endif /* SERIALAPI_HW_H_ */ diff --git a/src/zwave_ncp_serial_api_controller/app.c b/src/zwave_ncp/app.c similarity index 87% rename from src/zwave_ncp_serial_api_controller/app.c rename to src/zwave_ncp/app.c index 460d7469..2d7c8b6d 100644 --- a/src/zwave_ncp_serial_api_controller/app.c +++ b/src/zwave_ncp/app.c @@ -7,7 +7,7 @@ #include #include -#include "Assert.h" +#include #include "SyncEvent.h" #ifdef ZW_CONTROLLER #include "ZW_controller_api.h" @@ -27,19 +27,15 @@ //#define DEBUGPRINT #include "DebugPrint.h" #include "app_node_info.h" -#include "virtual_slave_node_info.h" #include "serialapi_file.h" #include "cmd_handlers.h" #include "cmds_management.h" #include "ZAF_Common_interface.h" #include "utils.h" -#include "zpal_watchdog.h" #include "app_hw.h" #include "SerialAPI_hw.h" -#include "board_indicator.h" #include "zaf_event_distributor_ncp.h" #include "zpal_misc.h" -#include "zw_build_no.h" #include "zaf_protocol_config.h" #ifdef DEBUGPRINT #include "ZAF_PrintAppInfo.h" @@ -55,11 +51,6 @@ #define TX_POWER_LR_20_DBM 200 #define TX_POWER_LR_14_DBM 140 -#ifdef JP_DK -/* Define RSSI threshold so JP can be tested in DK */ -#define JP_DK_RSSI_THRESHOLD 52 -#endif - #ifdef ZW_SECURITY_PROTOCOL #define REQUESTED_SECURITY_KEYS ( SECURITY_KEY_S0_BIT | SECURITY_KEY_S2_UNAUTHENTICATED_BIT | SECURITY_KEY_S2_AUTHENTICATED_BIT | SECURITY_KEY_S2_ACCESS_BIT) #else @@ -132,24 +123,7 @@ extern uint8_t bWatchdogStarted; #endif /* Last system wakeup reason - is set in ApplicationInit */ -EResetReason_t g_eApplResetReason; - -#ifdef APPL_PROD_TEST -#define PRODTEST_NR_1 1 -#define PRODTEST_NR_2 2 -#define PRODTEST_NR_3 3 -#define PRODTEST_NR_4 4 -#define PRODTEST_NR_5 5 -#define PRODTEST_NR_6 6 -#define PRODTEST_NR_7 7 - -#define POWERON_MAGIC_VALUE 0x4242 -extern uint8_t bProdtestState; -/* Production test pin definition */ -static uint8_t testRun; -#define SET_PRODUCTIONTEST_PIN PIN_IN(P21, 1) -#define IN_PRODUCTIONTEST (!PIN_GET(P21)) -#endif /* APPL_PROD_TEST */ +zpal_reset_reason_t g_eApplResetReason; zpal_pm_handle_t radio_power_lock; zpal_pm_handle_t io_power_lock; @@ -167,10 +141,6 @@ void ApplicationCommandHandler(void *pSubscriberContext, SZwaveReceivePackage* p void ApplicationNodeUpdate(uint8_t bStatus, uint16_t nodeID, uint8_t *pCmd, uint8_t bLen); -#if SUPPORT_ZW_SET_PROMISCUOUS_MODE -static void SetPromiscuousMode(uint8_t mode); -#endif - #if SUPPORT_ZW_REMOVE_FAILED_NODE_ID extern void ZCB_ComplHandler_ZW_RemoveFailedNodeID(uint8_t bStatus); #endif @@ -187,47 +157,6 @@ extern void ZCB_ComplHandler_ZW_SetSlaveLearnMode(uint8_t bStatus, uint8_t orgID extern uint8_t SetRFReceiveMode(uint8_t mode); #endif -#ifdef UZB - -#if 1 // 0 - test UZB on ZDP03A, 1 - normal mode (UZB on UZB :) -#define LEDxPort P0 -#define LEDxSHADOW P0Shadow -#define LEDxSHADOWDIR P0ShadowDIR -#define LEDxDIR P0DIR -#define LEDxDIR_PAGE P0DIR_PAGE -#define LEDx 4 -#else // 0 - test UZB on ZDP03A, 1 - normal mode (UZB on UZB :) -#define LEDxPort P0 -#define LEDxSHADOW P0Shadow -#define LEDxSHADOWDIR P0ShadowDIR -#define LEDxDIR P0DIR -#define LEDxDIR_PAGE P0DIR_PAGE -#define LEDx 7 -#endif // 0 - test UZB on ZDP03A, 1 - normal mode (UZB on UZB :) - -void /*RET Nothing */ -set_state_and_notify(uint8_t st) -{ - - if (state != st) - { - xTaskNotify(g_AppTaskHandle, - 1< (uint8_t)BUF_SIZE_TX) { - ASSERT((uint8_t)BUF_SIZE_TX >= len); + assert((uint8_t)BUF_SIZE_TX >= len); len = (uint8_t)BUF_SIZE_TX; } callbackQueue.requestQueue[callbackQueue.requestIn].wLen = len; @@ -310,7 +236,7 @@ RequestUnsolicited( commandQueue.requestQueue[commandQueue.requestIn].wCmd = cmd; if (len > (uint8_t)BUF_SIZE_TX) { - ASSERT((uint8_t)BUF_SIZE_TX >= len); + assert((uint8_t)BUF_SIZE_TX >= len); len = (uint8_t)BUF_SIZE_TX; } commandQueue.requestQueue[commandQueue.requestIn].wLen = len; @@ -474,9 +400,6 @@ appFileSystemInit(void) AppNodeInfo = zaf_get_app_node_info(); RadioConfig = zaf_get_radio_config(); - // enable the watchdog at init of application - zpal_enable_watchdog(true); - /* * Handle file system init inside Application Task * This reduces the default stack needed during initialization @@ -502,12 +425,11 @@ appFileSystemInit(void) * We end up here on the first boot after initializing the flash file system */ - zpal_radio_region_t mfgRegionConfig; - // Check for a valid RF Region value in the manufacturing user data configuration + zpal_radio_region_t mfgRegionConfig = REGION_UNDEFINED; + // In case of valid MfgToken, override the app default settings. ZW_GetMfgTokenDataCountryFreq(&mfgRegionConfig); - if ( (mfgRegionConfig <= REGION_US_LR) || (mfgRegionConfig == REGION_JP) || (mfgRegionConfig == REGION_KR) ) + if (true == isRfRegionValid(mfgRegionConfig)) { - // Valid RF Region configuration found. Use instead of the app default setting RadioConfig->eRegion = mfgRegionConfig; } @@ -903,7 +825,10 @@ ApplicationInitSW(void) compl_workbuf[6 + i] = apCCLists[0]->pCommandClasses[i]; } } - eSerialAPIStartedCapabilities capabilities = (RadioConfig->eRegion == REGION_US_LR) ? SERIAL_API_STARTED_CAPABILITIES_L0NG_RANGE : 0; + + eSerialAPIStartedCapabilities capabilities = 0; + if (ZAF_isLongRangeRegion(RadioConfig->eRegion)) + capabilities = SERIAL_API_STARTED_CAPABILITIES_L0NG_RANGE; compl_workbuf[6 + i] = capabilities; uint32_t zpal_reset_info = 0; @@ -939,7 +864,7 @@ void UsbSuspendCallback(void) **--------------------------------------------------------------------------*/ ZW_APPLICATION_STATUS ApplicationInit( - EResetReason_t eResetReason) + zpal_reset_reason_t eResetReason) { // Serial API can control hardware with information // set in the file system therefore it should be the first @@ -953,14 +878,14 @@ ApplicationInit( #endif #if SUPPORT_SERIAL_API_READY - if (ERESETREASON_SLEEP == eResetReason) + if (ZPAL_RESET_REASON_SLEEP == eResetReason) { /* We have been waken from sleep by timer or external pin event - we must assume we are connected. */ serialLinkState = SERIAL_LINK_CONNECTED; } else { - /* We have been waken either by ERESETREASON_POWER_ON or ERESETREASON_PIN or similar. Initially we are DETACHED */ + /* We have been waken either by ZPAL_RESET_REASON_POWER_ON or ZPAL_RESET_REASON_PIN or similar. Initially we are DETACHED */ serialLinkState = SERIAL_LINK_CONNECTED; } #endif @@ -969,7 +894,6 @@ ApplicationInit( #ifdef DEBUGPRINT static uint8_t m_aDebugPrintBuffer[96]; - zpal_debug_init(); DebugPrintConfig(m_aDebugPrintBuffer, sizeof(m_aDebugPrintBuffer), zpal_debug_output); DebugPrintf("ApplicationInit eResetReason = %d\n", eResetReason); ZAF_PrintAppInfo(); @@ -989,13 +913,13 @@ ApplicationInit( * ZW_UserTask_CreateTask() can be used to create additional tasks. * @see zwave_soc_sensor_pir example for more info. *************************************************************************************/ - bool bWasTaskCreated = ZW_ApplicationRegisterTask( + __attribute__((unused)) bool bWasTaskCreated = ZW_ApplicationRegisterTask( ApplicationTask, EAPPLICATIONEVENT_ZWRX, EAPPLICATIONEVENT_ZWCOMMANDSTATUS, zaf_get_protocol_config() ); - ASSERT(bWasTaskCreated); + assert(bWasTaskCreated); return (APPLICATION_RUNNING); /*Return false to enter production test mode*/ } @@ -1086,7 +1010,6 @@ typedef struct SMultiCastNodeMaskHeaderSerial static void /*RET Nothing */ ApplicationCommandHandler_Bridge(SReceiveMulti* pReceiveMulti) { -#if SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE /* ZW->HOST: REQ | 0xA8 | rxStatus | destNode | sourceNode | cmdLength * | pCmd[] | multiDestsOffset_NodeMaskLen | multiDestsNodeMask[] | rssiVal * | securityKey | bSourceTxPower | bSourceNoiseFloor */ @@ -1168,67 +1091,6 @@ ApplicationCommandHandler_Bridge(SReceiveMulti* pReceiveMulti) } /* Unified Application Command Handler for Bridge and Virtual nodes */ RequestUnsolicited(FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE, compl_workbuf, (uint8_t)(offset + 1 + i)); -#else - /* Simulate old split Application Command Handlers */ - uint8_t offset = 0; - if (!IsNodeVirtual(destNode)) - { - /* ZW->PC: REQ | 0x04 | rxStatus | sourceNode | cmdLength | Payload */ - BYTE_IN_AR(compl_workbuf, 0) = pReceiveMulti->RxOptions.rxStatus; - if (SERIAL_API_SETUP_NODEID_BASE_TYPE_16_BIT == nodeIdBaseType) - { - BYTE_IN_AR(compl_workbuf, offset + 1) = (uint8_t)(pReceiveMulti->RxOptions.sourceNode >> 8); // MSB - BYTE_IN_AR(compl_workbuf, offset + 2) = (uint8_t)(pReceiveMulti->RxOptions.sourceNode & 0xFF); // LSB - offset = 4; // 16 bit nodeID means the command fields that follow are offset by one byte - } - else - { - BYTE_IN_AR(compl_workbuf, 1) = (uint8_t)pReceiveMulti->RxOptions.sourceNode; // Legacy 8 bit - offset = 3; - } - if (cmdLength > (uint8_t)(BUF_SIZE_TX - offset) ) - { - cmdLength = (uint8_t)(BUF_SIZE_TX - offset) ; - } - BYTE_IN_AR(compl_workbuf, offset - 1 ) = (uint8_t)cmdLength; - for (i = 0; i < cmdLength; i++) - { - BYTE_IN_AR(compl_workbuf, offset + i) = *((uint8_t*)&pReceiveMulti->Payload + i); - } - RequestUnsolicited(FUNC_ID_APPLICATION_COMMAND_HANDLER, compl_workbuf, offset + cmdLength); - } - else - { - /* ZW->PC: REQ | 0xA1 | rxStatus | destNode | sourceNode | cmdLength | Payload */ - BYTE_IN_AR(compl_workbuf, 0) = pReceiveMulti->RxOptions.rxStatus; - if (SERIAL_API_SETUP_NODEID_BASE_TYPE_16_BIT == nodeIdBaseType) - { - BYTE_IN_AR(compl_workbuf, 1) = (uint8_t)(pReceiveMulti->RxOptions.destNode >> 8); // MSB - BYTE_IN_AR(compl_workbuf, 2) = (uint8_t)(pReceiveMulti->RxOptions.destNode & 0xFF); // LSB - BYTE_IN_AR(compl_workbuf, 3) = (uint8_t)(pReceiveMulti->RxOptions.sourceNode >> 8); // MSB - BYTE_IN_AR(compl_workbuf, 4) = (uint8_t)(pReceiveMulti->RxOptions.sourceNode & 0xFF); // LSB - offset = 6; // 16 bit nodeIDs means the command fields that follow are offset by two bytes - } - else - { - // Legacy 8 bit nodeIDs - BYTE_IN_AR(compl_workbuf, 1) = (uint8_t)pReceiveMulti->RxOptions.destNode; - BYTE_IN_AR(compl_workbuf, 2) = (uint8_t)pReceiveMulti->RxOptions.sourceNode; - offset = 4; - } - if (cmdLength > (uint8_t)(BUF_SIZE_TX - offset)) - { - cmdLength = (uint8_t)(BUF_SIZE_TX - offset) ; - } - BYTE_IN_AR(compl_workbuf, offset - 1) = cmdLength; - for (i = 0; i < cmdLength; i++) - { - BYTE_IN_AR(compl_workbuf, offset + i) = *((uint8_t*)&pReceiveMulti->Payload + i); - } - - RequestUnsolicited(FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER, compl_workbuf, offset + cmdLength); - } -#endif } #endif @@ -1259,14 +1121,16 @@ ApplicationNodeUpdate( } /* - Buffer boundary check */ - if (bLen > (uint8_t)(BUF_SIZE_TX - (offset + 3))) - { - bLen = (uint8_t)(BUF_SIZE_TX - (offset + 3)); - } + bLen = (bLen > MAX_NODE_INFO_LENGTH) ? MAX_NODE_INFO_LENGTH : bLen; + bLen = (bLen > (uint8_t)(BUF_SIZE_TX - (offset + 3))) ? (uint8_t)(BUF_SIZE_TX - (offset + 3)) : bLen; + BYTE_IN_AR(compl_workbuf, offset + 2) = bLen; - for (uint8_t i = 0; i < bLen; i++) + if(bLen > 0 && pCmd) { - BYTE_IN_AR(compl_workbuf, offset + 3 + i) = *(pCmd + i); + for (uint8_t i = 0; i < bLen; i++) + { + BYTE_IN_AR(compl_workbuf, offset + 3 + i) = *(pCmd + i); + } } RequestUnsolicited(FUNC_ID_ZW_APPLICATION_UPDATE, compl_workbuf, (uint8_t)(offset + bLen + 3)); } diff --git a/src/zwave_ncp/app.h b/src/zwave_ncp/app.h new file mode 100644 index 00000000..3eb3acc2 --- /dev/null +++ b/src/zwave_ncp/app.h @@ -0,0 +1,321 @@ +/** + * @file + * Header file for Serial API implementation. + * + * Contains various application definitions and SerialAPI + * functionality support definitions. + * + * @copyright 2019 Silicon Laboratories Inc. + */ +#ifndef _SERIALAPPL_H_ +#define _SERIALAPPL_H_ +#include + +#ifndef UNIT_TEST +/* Z-Wave library functionality support definitions */ +#ifdef ZW_SLAVE +#include +#else +#include +#endif +#endif /*#ifndef UNIT_TEST*/ + +#include + +#include + +#ifdef ZW_SLAVE +#include +#endif +#ifdef ZW_SECURITY_PROTOCOL +#include +#endif + +#ifdef ZW_CONTROLLER +#include +#endif + +/* Serial API version */ +#define SERIAL_API_VER 10 + +/* Max number of times a frame will be transmitted to PC */ +#define MAX_SERIAL_RETRY 3 + +/* Number of bytes in a homeID */ +#define HOMEID_LENGTH 4 + +/* Max number of nodes in a multi cast (group) */ +#define MAX_GROUP_NODES 64 + +/* Macro for accessing the byte in byte_array at the index indx */ +#define BYTE_IN_AR(byte_array, indx) (*(byte_array + indx)) + +/* Macro for getting HIGH uint8_t in wVar uint16_t variable */ +#define BYTE_GET_HIGH_BYTE_IN_WORD(wVar) *((uint8_t*)&wVar) + +/* Macro for getting LOW uint8_t in wVar uint16_t variable */ +#define BYTE_GET_LOW_BYTE_IN_WORD(wVar) *((uint8_t*)&wVar + 1) + +/* Macro for setting HIGH uint8_t and LOW uint8_t in wVar uint16_t variable */ +#define WORD_SET_HIGH_LOW_BYTES(wVar, bHIGHByte, bLOWByte) BYTE_GET_HIGH_BYTE_IN_WORD(wVar) = bHIGHByte; \ + BYTE_GET_LOW_BYTE_IN_WORD(wVar) = bLOWByte + +/* States for ApplicationPoll function */ +enum +{ + stateStartup, + stateIdle, + stateTxSerial, + stateFrameParse, + stateCallbackTxSerial, + stateCommandTxSerial, + stateAppSuspend +}; + +/* States for FUNC_ID_NVM_BACKUP_RESTORE operation */ +typedef enum +{ + NVMBackupRestoreOperationOpen, + NVMBackupRestoreOperationRead, + NVMBackupRestoreOperationWrite, + NVMBackupRestoreOperationClose +} eNVMBackupRestoreOperation; + +/* Return values for FUNC_ID_NVM_BACKUP_RESTORE operation */ +typedef enum +{ + NVMBackupRestoreReturnValueOK = false, /* Everything is OK, so far */ + NVMBackupRestoreReturnValueError = true, /* Non specific error */ + NVMBackupRestoreReturnValueOperationMismatch, /* Error mixing read and write */ + NVMBackupRestoreReturnValueOperationDisturbed, /* Error read operation disturbed by other write */ + NVMBackupRestoreReturnValueEOF = EOF /* Not really an error. Just an indication of EndOfFile */ +} eNVMBackupRestoreReturnValue; + +#ifndef ZW_SECURITY_PROTOCOL +/* params used by ApplicationNodeInformation */ +#define APPL_NODEPARM_MAX 35 +#endif +#define APPL_SLAVENODEPARM_MAX APPL_NODEPARM_MAX + + +typedef enum _E_SERIALAPI_SET_LEARN_MODE_ +{ + SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_DISABLE = ZW_SET_LEARN_MODE_DISABLE, + SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_CLASSIC = ZW_SET_LEARN_MODE_CLASSIC, + SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_NWI = ZW_SET_LEARN_MODE_NWI, + SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_NWE = ZW_SET_LEARN_MODE_NWE, + SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_MAX = SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_NWE, + + /* slave_learn_plus/ctrl_learn extensions */ + SERIALPI_SET_LEARN_MODE_LEARN_PLUS_OFFSET = 0x80, + +} E_SERIALAPI_SET_LEARN_MODE; + +#ifdef ZW_SLAVE_ROUTING +/* SerialAPI only used state - used when ZW_RequestNodeInfo transmit fails */ +/* It is then assumed that the destination node did not receive the request. */ +#define UPDATE_STATE_NODE_INFO_REQ_FAILED 0x81 +#endif + +/* SerialAPI functionality support definitions */ +#define SUPPORT_SEND_DATA_TIMING 1 +/* Definitions for SerialAPI startup */ +typedef enum +{ + SERIALAPI_CONFIG_STARTUP_NOTIFICATION_ENABLED = 1, + SERIALAPI_CONFIG_UNDEFINED = 0xFE +} SERIALAPI_CONFIG_T; + +#ifdef PORT_STATUS +#define SUPPORT_ZW_PORT_STATUS 1 +#else +#define SUPPORT_ZW_PORT_STATUS 0 +#endif +#define SUPPORT_ZW_SET_SECURITY_S0_NETWORK_KEY 0 /*deprecated*/ +/* Enable support for SerialAPI Startup Notification */ +#define SUPPORT_SERIAL_API_STARTUP_NOTIFICATION 1 + +/* Security in Protocol SerialAPI functionality support definitions */ +#ifdef ZW_SECURITY_PROTOCOL +#define SUPPORT_APPLICATION_SECURITY_EVENT 0 +#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 1 +#if (SUPPORT_ZW_GET_SECURITY_KEYS | \ + SUPPORT_ZW_SET_SECURITY_S0_NETWORK_KEY | \ + SUPPORT_ZW_GET_SECURITY_S2_PUBLIC_DSK | \ + SUPPORT_ZW_SET_SECURITY_S2_CRITICAL_NODE_ID) +#define SUPPORT_ZW_SECURITY_SETUP 1 +#else +#define SUPPORT_ZW_SECURITY_SETUP 0 +#endif +#else /*#ifdef ZW_SECURITY_PROTOCOL*/ +#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 0 +#define SUPPORT_ZW_SECURITY_SETUP 0 +#define SUPPORT_APPLICATION_SECURITY_EVENT 0 +#endif + +/* Common SerialAPI functionality support definitions */ +#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION 1 + +#define SUPPORT_SERIAL_API_GET_CAPABILITIES 1 +#define SUPPORT_SERIAL_API_SOFT_RESET 1 + +#define SUPPORT_SERIAL_API_POWER_MANAGEMENT 0 +#define SUPPORT_SERIAL_API_READY 0 + +#define SUPPORT_SERIAL_API_EXT 1 +#ifdef ZW_SECURITY_PROTOCOL +/* Only libraries with SECURITY buildin should supports this (slave_enhanced_232) */ +#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 1 +#else +#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 0 +#endif + +#ifdef ZW_ENABLE_RTC +#define SUPPORT_CLOCK_SET 1 +#define SUPPORT_CLOCK_GET 1 +#define SUPPORT_CLOCK_CMP 1 +#define SUPPORT_RTC_TIMER_CREATE 1 +#define SUPPORT_RTC_TIMER_READ 1 +#define SUPPORT_RTC_TIMER_DELETE 1 +#define SUPPORT_RTC_TIMER_CALL 1 +#else +#define SUPPORT_CLOCK_SET 0 +#define SUPPORT_CLOCK_GET 0 +#define SUPPORT_CLOCK_CMP 0 +#define SUPPORT_RTC_TIMER_CREATE 0 +#define SUPPORT_RTC_TIMER_READ 0 +#define SUPPORT_RTC_TIMER_DELETE 0 +#define SUPPORT_RTC_TIMER_CALL 0 +#endif + +#define SUPPORT_ZW_AUTO_PROGRAMMING 1 + +#ifdef TIMER_SUPPORT +#define SUPPORT_TIMER_START 1 +#define SUPPORT_TIMER_RESTART 1 +#define SUPPORT_TIMER_CANCEL 1 +#define SUPPORT_TIMER_CALL 1 +#else +#define SUPPORT_TIMER_START 0 +#define SUPPORT_TIMER_RESTART 0 +#define SUPPORT_TIMER_CANCEL 0 +#define SUPPORT_TIMER_CALL 0 +#endif + +#ifdef PORT_STATUS +#define SUPPORT_ZW_PORT_STATUS 1 +#else +#define SUPPORT_ZW_PORT_STATUS 0 +#endif +/* ZW_EnableSUC() no longer exists in the library */ + +/* */ +#define SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0 + +#if SUPPORT_SERIAL_API_READY +enum +{ + /* SERIAL_LINK_IDLE = Ready for incomming Serial communication, but */ + /* do not transmit anything via the serial link even if application */ + /* frames is received on the RF, which normally should be transmitted */ + /* to the HOST. */ + SERIAL_LINK_DETACHED = 0, + /* SERIAL_LINK_CONNECTED = There exists a HOST so transmit on serial */ + /* link if needed. */ + SERIAL_LINK_CONNECTED = 1 +}; + +extern uint8_t serialLinkState; +#endif /* SUPPORT_SERIAL_API_READY */ + +extern void DoRespond_workbuf( + uint8_t cnt); + +extern void set_state_and_notify( + uint8_t st +); + +extern void set_state( + uint8_t st +); + +extern bool Request( + uint8_t cmd, /*IN Command */ + uint8_t *pData, /*IN pointer to data */ + uint8_t len /*IN Length of data */ +); + +extern bool RequestUnsolicited( + uint8_t cmd, /*IN Command */ + uint8_t *pData, /*IN pointer to data */ + uint8_t len /*IN Length of data */ +); + +extern void Respond( + uint8_t cmd, /*IN Command */ + uint8_t const * pData, /*IN pointer to data */ + uint8_t len /*IN Length of data */ +); +extern void DoRespond(uint8_t retVal); + +extern void PopCallBackQueue(void); + +extern void PopCommandQueue(void); + +extern uint8_t GetCallbackCnt(void); + +extern void ZW_GetMfgTokenDataCountryFreq(void *data); + +#if SUPPORT_SERIAL_API_POWER_MANAGEMENT +extern void +ZCB_PowerManagementWakeUpOnExternalActive(void); + +extern void +ZCB_PowerManagementWakeUpOnTimerHandler(void); + +extern void +ZCB_powerManagementPoweredUpPinActive(void); + +extern void +PowerManagementSetPowerDown(void); + +extern void +PowerManagementSetPowerUp(void); + +extern void +PowerManagementCheck(void); + +extern void +PurgeCallbackQueue(void); + +extern void +PurgeCommandQueue(void); +#endif /* SUPPORT_SERIAL_API_POWER_MANAGEMENT */ + +// Prioritized events that can wakeup protocol thread. +typedef enum EApplicationEvent +{ + EAPPLICATIONEVENT_ZWRX = 0, + EAPPLICATIONEVENT_ZWCOMMANDSTATUS, + EAPPLICATIONEVENT_STATECHANGE, + EAPPLICATIONEVENT_SERIALDATARX, + EAPPLICATIONEVENT_SERIALTIMEOUT, + EAPPLICATIONEVENT_TIMER +} EApplicationEvent; + +/* FUNC_ID_SERIAL_API_STARTED Capabilities bit field definitions */ +typedef enum +{ + SERIAL_API_STARTED_CAPABILITIES_L0NG_RANGE = 1<<0 // Controller is Z-Wave Long Range capable + /* Can be extended with future capability bits here */ +} eSerialAPIStartedCapabilities; + +extern void ApplicationNodeUpdate(uint8_t bStatus, uint16_t nodeID, uint8_t *pCmd, uint8_t bLen); + +/* Should be enough */ +#define BUF_SIZE_RX 168 +#define BUF_SIZE_TX 168 + +extern uint8_t compl_workbuf[BUF_SIZE_TX]; + +#endif /* _SERIALAPPL_H_ */ diff --git a/src/zwave_ncp_serial_api_controller/app_node_info.c b/src/zwave_ncp/app_node_info.c similarity index 100% rename from src/zwave_ncp_serial_api_controller/app_node_info.c rename to src/zwave_ncp/app_node_info.c diff --git a/src/zwave_ncp_serial_api_controller/app_node_info.h b/src/zwave_ncp/app_node_info.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/app_node_info.h rename to src/zwave_ncp/app_node_info.h diff --git a/src/zwave_ncp_serial_api_controller/cmd_get_capabilities.c b/src/zwave_ncp/cmd_get_capabilities.c similarity index 76% rename from src/zwave_ncp_serial_api_controller/cmd_get_capabilities.c rename to src/zwave_ncp/cmd_get_capabilities.c index 4ce912c9..8dceb3e6 100644 --- a/src/zwave_ncp_serial_api_controller/cmd_get_capabilities.c +++ b/src/zwave_ncp/cmd_get_capabilities.c @@ -3,10 +3,14 @@ * @copyright 2022 Silicon Laboratories Inc. */ #include + +#include + #include "cmd_handlers.h" #include "app.h" #include "zaf_config.h" #include "zw_version_config.h" +#include "nvm_backup_restore.h" #define CAPABILITIES_SIZE (8 + 32) // Info + supported commands @@ -40,6 +44,18 @@ static bool add_cmd_to_capabilities(cmd_handler_map_t const * const p_cmd_entry, ZW_ADD_CMD(FUNC_ID_SERIAL_API_GET_CAPABILITIES) { cmd_foreach(add_cmd_to_capabilities, &SERIALAPI_CAPABILITIES[8]); + +#if SUPPORT_NVM_BACKUP_RESTORE + //If the legacy NVM backup & restore command cannot be used, it must be removed from available command. + if (false == NvmBackupLegacyCmdAvailable()) + { + /*SUPPORT_NVM_BACKUP_RESTORE cannot be set depending on the NVM size, because it is define in + the application. However the NVM_SIZE is defined inside the ZPAL. It is available to the + application only through the function zpal_nvm_backup_get_size(). + So this configuration must be done dynamically. */ + ZW_NodeMaskClearBit(&SERIALAPI_CAPABILITIES[8], FUNC_ID_NVM_BACKUP_RESTORE); + } +#endif /* HOST->ZW: no params defined */ /* ZW->HOST: RES | 0x07 | */ /* SERIAL_APPL_VERSION | SERIAL_APPL_REVISION | SERIALAPI_MANUFACTURER_ID1 | SERIALAPI_MANUFACTURER_ID2 | */ diff --git a/src/zwave_ncp_serial_api_controller/cmd_handlers.c b/src/zwave_ncp/cmd_handlers.c similarity index 85% rename from src/zwave_ncp_serial_api_controller/cmd_handlers.c rename to src/zwave_ncp/cmd_handlers.c index abd2ec50..1586617a 100644 --- a/src/zwave_ncp_serial_api_controller/cmd_handlers.c +++ b/src/zwave_ncp/cmd_handlers.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -22,7 +23,7 @@ #include "cmds_management.h" #include "cmds_security.h" #include "cmds_rf.h" -#include "ZW_SerialAPI.h" +#include "SerialAPI.h" #include "app.h" #include "serialapi_file.h" #include "utils.h" @@ -33,6 +34,10 @@ #include #endif +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + extern bool bTxStatusReportEnabled; SSyncEventArg1 LearnModeStatusCb = {.uFunctor.pFunction = 0}; // Ensure function pointer is initialized @@ -158,15 +163,15 @@ ZW_ADD_CMD(FUNC_ID_GET_TX_TIMERS) static void GetBackgroundRSSI(RSSI_LEVELS *noise_levels) { SZwaveCommandPackage cmdPackage = {.eCommandType = EZWAVECOMMANDTYPE_GET_BACKGROUND_RSSI}; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_GET_BACKGROUND_RSSI)) { memcpy((uint8_t *)noise_levels, cmdStatus.Content.GetBackgroundRssiStatus.rssi, sizeof(RSSI_LEVELS)); return; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. } ZW_ADD_CMD(FUNC_ID_ZW_GET_BACKGROUND_RSSI) @@ -184,8 +189,8 @@ static void ClearNetworkStats(void) { SZwaveCommandPackage CommandPackage = {.eCommandType = EZWAVECOMMANDTYPE_CLEAR_NETWORK_STATISTICS}; // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&CommandPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&CommandPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } ZW_ADD_CMD(FUNC_ID_ZW_CLEAR_NETWORK_STATS) @@ -240,14 +245,14 @@ uint8_t SetRFReceiveMode(uint8_t mode) .uCommandParams.SetRfReceiveMode.mode = mode}; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_SET_RF_RECEIVE_MODE)) { return cmdStatus.Content.SetRFReceiveModeStatus.result; } - ASSERT(0); + assert(0); return 0; } @@ -377,33 +382,26 @@ ZCB_ComplHandler_ZW_SendData( static uint8_t SendData(uint16_t nodeID, const uint8_t *pData, uint8_t dataLength, uint8_t txOptions, ZW_TX_Callback_t pCallBack) { - SZwaveTransmitPackage FramePackage = { 0 }; - #ifndef ZW_SECURITY_PROTOCOL - SSendData *pSendData = &FramePackage.uTransmitParams.SendData; - memset(&pSendData->FrameConfig.aFrame, 0, sizeof(pSendData->FrameConfig.aFrame)); - pSendData->DestNodeId = nodeID; - pSendData->FrameConfig.TransmitOptions = txOptions; - memcpy(&pSendData->FrameConfig.aFrame, pData, dataLength); - pSendData->FrameConfig.Handle = pCallBack; - FramePackage.eTransmitType = EZWAVETRANSMITTYPE_STD; - pSendData->FrameConfig.iFrameLength = dataLength; - + SZwaveTransmitPackage FramePackage = { + .uTransmitParams.SendData.DestNodeId = nodeID, + .uTransmitParams.SendData.FrameConfig.TransmitOptions = txOptions, + .uTransmitParams.SendData.FrameConfig.Handle = pCallBack, + .eTransmitType = EZWAVETRANSMITTYPE_STD, + .uTransmitParams.SendData.FrameConfig.iFrameLength = dataLength, + }; + memcpy(FramePackage.uTransmitParams.SendData.FrameConfig.aFrame, pData, dataLength); #else - { - SSendDataEx *pSendDataEx = &FramePackage.uTransmitParams.SendDataEx; - pSendDataEx->DestNodeId = nodeID; - pSendDataEx->FrameConfig.TransmitOptions = txOptions; - memcpy(&pSendDataEx->FrameConfig.aFrame, pData, dataLength); - pSendDataEx->FrameConfig.Handle = pCallBack; - FramePackage.eTransmitType = EZWAVETRANSMITTYPE_EX; - FramePackage.uTransmitParams.SendDataEx.FrameConfig.iFrameLength = dataLength; - } -#endif /* !ZW_SLAVE_ENHANCED_232 */ - - // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwTxQueue(), (uint8_t *)&FramePackage, 0); - return (EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus) ? true : false; + SZwaveTransmitPackage FramePackage = { + .uTransmitParams.SendDataEx.DestNodeId = nodeID, + .uTransmitParams.SendDataEx.FrameConfig.TransmitOptions = txOptions, + .uTransmitParams.SendDataEx.FrameConfig.Handle = pCallBack, + .eTransmitType = EZWAVETRANSMITTYPE_EX, + .uTransmitParams.SendDataEx.FrameConfig.iFrameLength = dataLength, + }; + memcpy(FramePackage.uTransmitParams.SendDataEx.FrameConfig.aFrame, pData, dataLength); +#endif + return (EQUEUENOTIFYING_STATUS_SUCCESS == QueueNotifyingSendToBack(ZAF_getZwTxQueue(), (uint8_t *)&FramePackage, 0)); } ZW_ADD_CMD(FUNC_ID_ZW_SEND_DATA) @@ -421,12 +419,9 @@ ZW_ADD_CMD(FUNC_ID_ZW_SEND_DATA) uint8_t offset = 0; node_id_t nodeId = (node_id_t)GET_NODEID(&frame->payload[0], offset); uint8_t dataLength = frame->payload[offset + 1]; - ASSERT(dataLength <= BUF_SIZE_RX); - if (dataLength > BUF_SIZE_RX) - { - dataLength = BUF_SIZE_RX; - } + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); const uint8_t * const pSerInData = frame->payload + offset + 2; funcID_ComplHandler_ZW_SendData = frame->payload[offset + 3 + dataLength]; @@ -489,11 +484,8 @@ ZW_ADD_CMD(FUNC_ID_ZW_SEND_DATA_EX) uint8_t dataLength; dataLength = frame->payload[offset + 1]; - ASSERT(dataLength <= BUF_SIZE_RX); - if (dataLength > BUF_SIZE_RX) - { - dataLength = BUF_SIZE_RX; - } + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); funcID_ComplHandler_ZW_SendDataEx = frame->payload[offset + 6 + dataLength]; const uint8_t retVal = SendDataEx(nodeId, &frame->payload[offset + 2], dataLength, frame->payload[offset + 2 + dataLength], @@ -537,12 +529,9 @@ static uint8_t SendDataMulti(uint8_t numberOfNodes, const uint8_t *pNodeList, co { ZW_NodeMaskSetBit(pSendDataMulti->NodeMask, pNodeList[i]); } + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); pSendDataMulti->FrameConfig.TransmitOptions = txOptions; - ASSERT(dataLength <= BUF_SIZE_RX); - if (dataLength > BUF_SIZE_RX) - { - dataLength = BUF_SIZE_RX; - } memcpy(&pSendDataMulti->FrameConfig.aFrame, pData, dataLength); pSendDataMulti->FrameConfig.Handle = pCallBack; FramePackage.eTransmitType = EZWAVETRANSMITTYPE_MULTI; @@ -589,11 +578,8 @@ ZCB_ComplHandler_ZW_SendDataMultiEx( static uint8_t SendDataMultiEx(uint8_t dataLength, uint8_t *pData, uint8_t txOptions, uint8_t secKeyType, uint8_t groupID, ZW_TX_Callback_t pCallBack) { - ASSERT(dataLength <= BUF_SIZE_RX); - if (dataLength > BUF_SIZE_RX) - { - dataLength = BUF_SIZE_RX; - } + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); // Create transmit frame package SZwaveTransmitPackage FramePackage = { .uTransmitParams.SendDataMultiEx.FrameConfig.Handle = pCallBack, @@ -666,11 +652,8 @@ ZCB_ComplHandler_ZW_SendData_Bridge( static uint8_t SendDataBridge(uint16_t srcNode, uint16_t destNode, uint8_t dataLength, const uint8_t *pData, uint8_t txOptions, ZW_TX_Callback_t pCallBack) { - ASSERT(dataLength <= BUF_SIZE_RX); - if (dataLength > BUF_SIZE_RX) - { - dataLength = BUF_SIZE_RX; - } + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); // Create transmit frame package SZwaveTransmitPackage FramePackage = { .uTransmitParams.SendDataBridge.FrameConfig.Handle = pCallBack, @@ -727,7 +710,8 @@ static uint8_t SendDataMultiBridge(node_id_t srcNode, uint8_t numOfNodes, uint8_ // when nodeIdBaseType is 2 then we handle the FramePackage.uTransmitParams.SendDataMultiBridge.NodeMask as node list // when nodeIdBaseType is 1 then we handle the FramePackage.uTransmitParams.SendDataMultiBridge.NodeMask as node mask // Create transmit frame package - ASSERT(dataLength <= BUF_SIZE_RX); + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); SZwaveTransmitPackage FramePackage = { .uTransmitParams.SendDataMultiBridge.FrameConfig.Handle = pCallBack, @@ -961,9 +945,26 @@ ZW_ADD_CMD(FUNC_ID_MEMORY_PUT_BUFFER) #if SUPPORT_NVM_BACKUP_RESTORE ZW_ADD_CMD(FUNC_ID_NVM_BACKUP_RESTORE) +{ + if (true == NvmBackupLegacyCmdAvailable()) + { + uint8_t length = 0; + func_id_serial_api_nvm_backup_restore(frame_payload_len(frame), frame->payload, compl_workbuf, &length, false); + DoRespond_workbuf(length); + } + else + { + //if legacy command is not allowed, drop it + set_state_and_notify(stateIdle); + } +} +#endif + +#if SUPPORT_NVM_EXT_BACKUP_RESTORE +ZW_ADD_CMD(FUNC_ID_NVM_EXT_BACKUP_RESTORE) { uint8_t length = 0; - func_id_serial_api_nvm_backup_restore(frame_payload_len(frame), frame->payload, compl_workbuf, &length); + func_id_serial_api_nvm_backup_restore(frame_payload_len(frame), frame->payload, compl_workbuf, &length, true); DoRespond_workbuf(length); } #endif @@ -1004,7 +1005,7 @@ ZW_ADD_CMD(FUNC_ID_NVM_EXT_WRITE_LONG_BYTE) if ((FRAME_LENGTH_MIN + 3) < frame->len) { uint32_t offset = (((uint32_t)frame->payload[0] << 16) + ((uint32_t)((uint16_t)frame->payload[1] << 8)) + frame->payload[2]); - const uint8_t retVal = SerialApiNvmWriteAppData(offset, &frame->payload[3], 1); + retVal = SerialApiNvmWriteAppData(offset, &frame->payload[3], 1); } DoRespond(retVal); } @@ -1042,11 +1043,11 @@ ZW_ADD_CMD(FUNC_ID_NVM_EXT_WRITE_LONG_BUFFER) { /* HOST->ZW: offset3byte(MSB) | offset3byte | offset2byte(LSB) | length2byte(MSB) | length2byte(LSB) | buffer[] */ /* ZW->HOST: retVal */ - uint16_t length; uint8_t retVal = 0; ///* Ignore if frame has no data to write */ if ((FRAME_LENGTH_MIN + 5) < frame->len) { + uint16_t length; length = ((uint16_t)(frame->payload[3] << 8)) + frame->payload[4]; /* Ignore write if length exceeds specified data-array */ if (length <= frame->len - FRAME_LENGTH_MIN) @@ -1056,7 +1057,7 @@ ZW_ADD_CMD(FUNC_ID_NVM_EXT_WRITE_LONG_BUFFER) { const uint8_t * const pSerInData = frame->payload + 5; uint32_t offset = (((uint32_t)frame->payload[0] << 16) + ((uint32_t)((uint16_t)frame->payload[1] << 8)) + frame->payload[2]); - const uint8_t retVal = SerialApiNvmWriteAppData(offset, pSerInData, length); + retVal = SerialApiNvmWriteAppData(offset, pSerInData, length); } } } @@ -1169,8 +1170,8 @@ static uint8_t RequestNodeNeighborUpdate(uint16_t nodeID, ZW_TX_Callback_t pCall if (EQUEUENOTIFYING_STATUS_SUCCESS == QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&Request, 0)) { // Wait for protocol to handle command - SZwaveCommandStatusPackage status = { 0 }; - if (GetCommandResponse(&status, EZWAVECOMMANDSTATUS_ZW_REQUESTNODENEIGHBORUPDATE)) + SZwaveCommandStatusPackage status = { .eStatusType = EZWAVECOMMANDSTATUS_ZW_REQUESTNODENEIGHBORUPDATE}; + if (GetCommandResponse(&status, status.eStatusType)) { return status.Content.RequestNodeNeigborUpdateStatus.result; } @@ -1260,7 +1261,7 @@ ZW_ADD_CMD(FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO) volatile uint8_t offset = 0; node_id_t nodeId = (node_id_t)GET_NODEID(&frame->payload[0], offset); GetNodeInfo(nodeId, (t_ExtNodeInfo *)compl_workbuf); - STATIC_ASSERT(sizeof(t_ExtNodeInfo) == 7, STATIC_ASSERT_FAILED_size_mismatch); + _Static_assert(sizeof(t_ExtNodeInfo) == 7, "STATIC_ASSERT_FAILED_size_mismatch"); DoRespond_workbuf(7); } #endif @@ -1323,30 +1324,33 @@ ZCB_ComplHandler_ZW_NodeManagement( } uint8_t offset = 0; - addState = (*statusInfo).bStatus; + addState = statusInfo->bStatus; BYTE_IN_AR(compl_workbuf, 0) = funcID_ComplHandler_ZW_NodeManagement; BYTE_IN_AR(compl_workbuf, 1) = (*statusInfo).bStatus; if (SERIAL_API_SETUP_NODEID_BASE_TYPE_16_BIT == nodeIdBaseType) { - BYTE_IN_AR(compl_workbuf, 2) = (uint8_t)((*statusInfo).bSource >> 8); // MSB - BYTE_IN_AR(compl_workbuf, 3) = (uint8_t)((*statusInfo).bSource & 0xFF); // LSB + BYTE_IN_AR(compl_workbuf, 2) = (uint8_t)(statusInfo->bSource >> 8); // MSB + BYTE_IN_AR(compl_workbuf, 3) = (uint8_t)(statusInfo->bSource & 0xFF); // LSB offset++; // 16 bit nodeID means the command fields that follow are offset by one byte } else { - BYTE_IN_AR(compl_workbuf, 2) = (uint8_t)((*statusInfo).bSource & 0xFF); // Legacy 8 bit nodeID + BYTE_IN_AR(compl_workbuf, 2) = (uint8_t)(statusInfo->bSource & 0xFF); // Legacy 8 bit nodeID } /* - Buffer boundary check */ - if ((*statusInfo).bLen > (uint8_t)(BUF_SIZE_TX - (offset + 4))) + if (statusInfo->bLen > (uint8_t)(BUF_SIZE_TX - (offset + 4))) { - (*statusInfo).bLen = (uint8_t)(BUF_SIZE_TX - (offset + 4)); + statusInfo->bLen = (uint8_t)(BUF_SIZE_TX - (offset + 4)); } - BYTE_IN_AR(compl_workbuf, offset + 3) = (*statusInfo).bLen; - for (uint8_t i = 0; i < (*statusInfo).bLen; i++) + BYTE_IN_AR(compl_workbuf, offset + 3) = statusInfo->bLen; + if(statusInfo->pCmd != NULL) { - BYTE_IN_AR(compl_workbuf, offset + 4 + i) = (*statusInfo).pCmd[i]; + for (uint8_t i = 0; i < statusInfo->bLen; i++) + { + BYTE_IN_AR(compl_workbuf, offset + 4 + i) = statusInfo->pCmd[i]; + } } - Request(nodeManagement_Func_ID, compl_workbuf, (uint8_t)(offset + (*statusInfo).bLen + 4)); + Request(nodeManagement_Func_ID, compl_workbuf, (uint8_t)(offset + statusInfo->bLen + 4)); } bool ZW_NodeManagementRunning(void) @@ -1367,8 +1371,8 @@ static void AddNodeToNetwork(uint8_t mode, void (*pCallBack)(LEARN_INFO_T *statu .uCommandParams.NetworkManagement.pHandle = (ZW_Void_Callback_t)pCallBack }; // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } static void AddNodeDskToNetwork(uint8_t mode, const uint8_t* pDsk, void (*pCallBack)(LEARN_INFO_T *statusInfo)) @@ -1380,8 +1384,8 @@ static void AddNodeDskToNetwork(uint8_t mode, const uint8_t* pDsk, void (*pCallB }; memcpy(&pCmdPackage.uCommandParams.NetworkManagementDSK.dsk[0], pDsk, 8); // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } ZW_ADD_CMD(FUNC_ID_ZW_ADD_NODE_TO_NETWORK) @@ -1423,8 +1427,8 @@ static void RemoveNodeFromNetwork(uint8_t mode, node_id_t node_id, void (*pCallB pCmdPackage.uCommandParams.NetworkManagement.nodeID = node_id; } // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } #endif @@ -1475,8 +1479,8 @@ static void ControllerChange(uint8_t mode, void (*pCallBack)(LEARN_INFO_T *statu .uCommandParams.NetworkManagement.pHandle = (ZW_Void_Callback_t)pCallBack}; // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&pCmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } ZW_ADD_CMD(FUNC_ID_ZW_CONTROLLER_CHANGE) @@ -1534,7 +1538,9 @@ static void ZCB_ZW_NodeManagementLearnStatusRelay(uint32_t Status) LEARN_INFO_T Info = { .bStatus = (uint8_t)Status, .bSource = node_id, - 0}; + .pCmd = NULL, + .bLen = 0 + }; ZCB_ComplHandler_ZW_NodeManagement(&Info); } @@ -1569,20 +1575,6 @@ ZW_ADD_CMD(FUNC_ID_ZW_SET_LEARN_MODE) #ifdef ZW_SLAVE funcID_ComplHandler_ZW_SetLearnMode = frame->payload[1]; #endif -#ifdef ZW_CONTROLLER_SINGLE - SyncEventArg1Unbind(&LearnModeStatusCb); - if (frame->payload[1] != 0) - { - SyncEventArg1bind(&LearnModeStatusCb, ZCB_ZW_NodeManagementLearnStatusRelay); - } - SZwaveCommandPackage Command = { - .eCommandType = EZWAVECOMMANDTYPE_SET_LEARN_MODE, - .uCommandParams.SetLearnMode.eLearnMode = frame->payload[0], - .uCommandParams.SetLearnMode.useCB = frame->payload[1] != 0 - }; - QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&Command, 0); - -#else SyncEventArg1Unbind(&LearnModeStatusCb); if (frame->payload[1] != 0) { @@ -1619,7 +1611,6 @@ ZW_ADD_CMD(FUNC_ID_ZW_SET_LEARN_MODE) /* E_NETWORK_LEARN_MODE_INCLUSION_SMARTSTART = 4 Enable the learn process to initiate SMARTSTART inclusion */ retVal = NetworkLearnModeStart(frame->payload[0] - SERIALPI_SET_LEARN_MODE_LEARN_PLUS_OFFSET); } -#endif /* ZW_CONTROLLER_SINGLE */ DoRespond(retVal); } #endif /* SUPPORT_ZW_SET_LEARN_MODE */ @@ -1705,7 +1696,8 @@ ZCB_ComplHandler_ZW_ReplicationSendData( static uint8_t ReplicationSendData(uint16_t nodeID, uint8_t dataLength, const uint8_t* pData, uint8_t txOptions, ZW_TX_Callback_t pCallBack) { - ASSERT(dataLength <= BUF_SIZE_RX); + assert(dataLength <= BUF_SIZE_RX); + dataLength = MIN(dataLength, BUF_SIZE_RX); SZwaveTransmitPackage FramePackage = { .uTransmitParams.SendReplication.DestNodeId = nodeID, .uTransmitParams.SendReplication.FrameConfig.TransmitOptions = txOptions, @@ -2149,14 +2141,14 @@ static uint8_t RemoveFailedNode(uint16_t nodeID) .uCommandParams.FailedNodeIDCmd.nodeID = nodeID }; // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_REMOVE_FAILED_NODE_ID)) { return cmdStatus.Content.FailedNodeIDStatus.result; } - ASSERT(0); + assert(0); return 0; } @@ -2180,8 +2172,8 @@ static uint8_t IsNodeIDFailed(uint16_t nodeID) .uCommandParams.IsFailedNodeID.nodeID = nodeID}; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldnt take long) SZwaveCommandStatusPackage cmdStatus = { 0 }; @@ -2189,7 +2181,7 @@ static uint8_t IsNodeIDFailed(uint16_t nodeID) { return cmdStatus.Content.IsFailedNodeIDStatus.result; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. return 0; } @@ -2233,14 +2225,14 @@ static uint8_t ReplaceFailedNode(uint16_t nodeID, uint8_t normalPower) .uCommandParams.FailedNodeIDCmd.normalPower = normalPower }; // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_REPLACE_FAILED_NODE_ID)) { return cmdStatus.Content.FailedNodeIDStatus.result; } - ASSERT(0); + assert(0); return 0; } @@ -2265,8 +2257,8 @@ static void GetRoutingInfo(uint16_t nodeID, uint8_t options, uint8_t *pRoutingIn .uCommandParams.GetRoutingInfo.nodeID = nodeID, .uCommandParams.GetRoutingInfo.options = options}; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldnt take long) SZwaveCommandStatusPackage cmdStatus = { 0 }; @@ -2275,7 +2267,7 @@ static void GetRoutingInfo(uint16_t nodeID, uint8_t options, uint8_t *pRoutingIn memcpy(pRoutingInfo, cmdStatus.Content.GetRoutingInfoStatus.RoutingInfo, MAX_NODEMASK_LENGTH); return; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. } ZW_ADD_CMD(FUNC_ID_GET_ROUTING_TABLE_LINE) @@ -2323,8 +2315,8 @@ static void StoreHomeID(uin8_t *pHomeID, uint16_t nodeID) }; memcpy(cmdPackage.uCommandParams.StoreHomeID.homeID, pHomeID, sizeof(cmdPackage.uCommandParams.StoreHomeID.homeID)); // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } ZW_ADD_CMD(FUNC_ID_STORE_HOMEID) @@ -2346,8 +2338,8 @@ static void LockResponseRoute(uint8_t lockID) .uCommandParams.LockRouteResponse.value = lockID, }; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } ZW_ADD_CMD(FUNC_ID_LOCK_ROUTE_RESPONSE) @@ -2369,8 +2361,8 @@ static uint8_t GetPriorityRoute(uint16_t nodeID, uint8_t *priRoute) .uCommandParams.GetPriorityRoute.pPriRouteBuffer = priRoute, }; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldnt take long) SZwaveCommandStatusPackage cmdStatus = { 0 }; @@ -2380,7 +2372,7 @@ static uint8_t GetPriorityRoute(uint16_t nodeID, uint8_t *priRoute) priRoute[4] = cmdStatus.Content.GetPriorityRouteStatus.routeSpeed; return cmdStatus.Content.GetPriorityRouteStatus.bAnyRouteFound; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. return 0; } @@ -2422,8 +2414,8 @@ static uint8_t SetPriorityRoute(uint16_t nodeID, const uint8_t *routeInfo) cmdPackage.uCommandParams.SetPriorityRoute.clearGolden = true; } // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldnt take long) SZwaveCommandStatusPackage cmdStatus = { 0 }; @@ -2431,7 +2423,7 @@ static uint8_t SetPriorityRoute(uint16_t nodeID, const uint8_t *routeInfo) { return cmdStatus.Content.SetPriorityRouteStatus.bRouteUpdated; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. return 0; } @@ -2477,10 +2469,10 @@ ZW_ADD_CMD(FUNC_ID_ZW_GET_VERSION) // Make ZW_GET_VERSION return a unique version string "Z-Wave 7.99" so that test tools can distinguish it from the normal builds. versionMinor = 99; } - volatile int32_t iCharacters = snprintf((char *)(&compl_workbuf[0]), 12, "Z-Wave %1d.%02d", protocol_info->ProtocolVersion.Major, versionMinor); - ASSERT(iCharacters == 11); // Serial API must deliver 13 bytes reply. 11 byte string (no zero termination) followed by zero and 1 byte lib type + __attribute__((unused)) volatile int32_t iCharacters = snprintf((char *)(&compl_workbuf[0]), 12, "Z-Wave %1d.%02d", protocol_info->ProtocolVersion.Major, versionMinor); + assert(iCharacters == 11); // Serial API must deliver 13 bytes reply. 11 byte string (no zero termination) followed by zero and 1 byte lib type // We use SNPRINTF zero termination to produce the zero. - STATIC_ASSERT(sizeof(compl_workbuf) >= 13, STATIC_ASSERT_compl_workbuf_to_small); + _Static_assert(sizeof(compl_workbuf) >= 13, "STATIC_ASSERT_compl_workbuf_to_small"); compl_workbuf[12] = protocol_info->eLibraryType; DoRespond_workbuf(13); } @@ -2707,8 +2699,8 @@ static uint8_t SetSlaveLearnMode(uint16_t nodeID, uint8_t mode) .uCommandParams.SetSlaveLearnMode.nodeID = nodeID, .uCommandParams.SetSlaveLearnMode.mode = mode, }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_SET_SLAVE_LEARN_MODE_RESULT)) { @@ -2786,15 +2778,15 @@ static uint8_t IsNodeVirtual(uint16_t nodeID) .eCommandType = EZWAVECOMMANDTYPE_IS_VIRTUAL_NODE, .uCommandParams.IsVirtualNode.value = nodeID, }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); - SZwaveCommandStatusPackage cmdStatus = { 0 }; - if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_IS_VIRTUAL_NODE)) + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + SZwaveCommandStatusPackage cmdStatus = { .eStatusType = EZWAVECOMMANDSTATUS_IS_VIRTUAL_NODE }; + if (GetCommandResponse(&cmdStatus, cmdStatus.eStatusType)) { return cmdStatus.Content.IsVirtualNodeStatus.result; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. return 0; } @@ -2813,8 +2805,8 @@ static void GetVirtualNodes(uint8_t *vNodesMask) { SZwaveCommandPackage cmdPackage = { .eCommandType = EZWAVECOMMANDTYPE_GET_VIRTUAL_NODES}; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_GET_VIRTUAL_NODES)) { @@ -2822,7 +2814,7 @@ static void GetVirtualNodes(uint8_t *vNodesMask) return; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. } ZW_ADD_CMD(FUNC_ID_ZW_GET_VIRTUAL_NODES) @@ -3064,389 +3056,6 @@ ZW_ADD_CMD(FUNC_ID_ZW_SET_ROUTING_MAX_6_00) } #endif - -#if SUPPORT_ZW_SET_PROMISCUOUS_MODE -static void SetPromiscuousMode(uint8_t mode) -{ - SZwaveCommandPackage PromiscuousMode = { - .eCommandType = EZWAVECOMMANDTYPE_SET_PROMISCUOUS_MODE, - .uCommandParams.SetPromiscuousMode.Enable = mode; - }; - - // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t*)&PromiscuousMode, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); -} - -ZW_ADD_CMD(FUNC_ID_ZW_SET_PROMISCUOUS_MODE) -{ - /* HOST->ZW: promiscuousMode */ - SetPromiscuousMode(frame->payload[0]); - set_state_and_notify(stateIdle); -} -#endif - - -#if SUPPORT_SERIAL_API_TEST -ZW_APPLICATION_META_TX_BUFFER txBuffer; - -uint8_t funcID_ComplHandler_Serial_API_Test; -uint8_t testnodemask[ZW_MAX_NODES / 8]; -uint8_t testresultnodemask[ZW_MAX_NODES / 8]; - -uint8_t testnodemasklen = 0; -uint8_t timerTestHandle = 0xff; -uint8_t testCmd; -bool setON = true; -uint8_t testNodeID = 0; -uint16_t testDelay; -uint16_t testCurrentDelay; -uint8_t testPayloadLen; -uint16_t testCount; -uint16_t testSuccessCount; -uint16_t testFailedCount; -uint8_t testState = 0; -uint8_t testTxOptions; - -void -SendTestReport( - uint8_t txStatus) -{ - if (funcID_ComplHandler_Serial_API_Test != 0) - { - BYTE_IN_AR(compl_workbuf, 0) = funcID_ComplHandler_Serial_API_Test; - BYTE_IN_AR(compl_workbuf, 1) = testCmd; - BYTE_IN_AR(compl_workbuf, 2) = testState; - BYTE_IN_AR(compl_workbuf, 3) = testNodeID; - BYTE_IN_AR(compl_workbuf, 4) = txStatus; - BYTE_IN_AR(compl_workbuf, 5) = BYTE_GET_LOW_BYTE_IN_WORD(testCount); - Request(FUNC_ID_SERIAL_API_TEST, compl_workbuf, 6); - } -} - - -void -SendTestRoundReport( - __attribute__((unused)) uint8_t txStatus) -{ - if (funcID_ComplHandler_Serial_API_Test != 0) - { - BYTE_IN_AR(compl_workbuf, 0) = funcID_ComplHandler_Serial_API_Test; - BYTE_IN_AR(compl_workbuf, 1) = testCmd; - BYTE_IN_AR(compl_workbuf, 2) = testState; - BYTE_IN_AR(compl_workbuf, 3) = BYTE_GET_HIGH_BYTE_IN_WORD(testCount); - BYTE_IN_AR(compl_workbuf, 4) = BYTE_GET_LOW_BYTE_IN_WORD(testCount); - /* Initialy we assume every node acked, so we assume no nodemask is to be send */ - uint8_t i = 0; - if (ZW_NODE_MASK_BITS_IN(testresultnodemask, testnodemasklen)) - { - for (; i < testnodemasklen; i++) - { - BYTE_IN_AR(compl_workbuf, 6 + i) = testresultnodemask[i]; - } - BYTE_IN_AR(compl_workbuf, 5) = testnodemasklen; - i++; - } - Request(FUNC_ID_SERIAL_API_TEST, compl_workbuf, 5 + i); - } -} - - -void -ZCB_TestDelayNextSendTimeout(void) -{ - if (--testCurrentDelay == 0) - { - if (timerTestHandle != 0xff) - { - TimerCancel(timerTestHandle); - } - timerTestHandle = 0xff; - TestSend(); - } -} - - -void -ZCB_TestDelayTimeout(void) -{ - if (--testCurrentDelay == 0) - { - if (timerTestHandle != 0xff) - { - TimerCancel(timerTestHandle); - } - timerTestHandle = 0xff; - setON = !setON; - TestStartRound(); - } -} - - -bool -TestFindNextNode(void) -{ - do - { - if (ZW_NodeMaskNodeIn(testnodemask, ++testNodeID)) - { - return true; - } - } while (testNodeID < ZW_MAX_NODES); - return false; -} - - -/*=========================== MetaDataSendComplete ========================= -** Function description -** -** -** -** Side effects: -** -**--------------------------------------------------------------------------*/ -void -ZCB_TestSendComplete( - uint8_t bStatus, - __attribute__((unused)) TX_STATUS_TYPE *txStatusReport -) -{ - DPRINT("C"); - DPRINTF("%u", bStatus); - - if (bStatus == TRANSMIT_COMPLETE_OK) - { - testSuccessCount++; - } - else - { - /* Set bit indicating that node failed to acknowledge */ - ZW_NODE_MASK_SET_BIT(testresultnodemask, testNodeID); - testFailedCount++; - } - /* Should we transmit result (to host) after every transmit or do we send one frame after every round? */ - if (testCmd < 0x05) - { - /* One result frame after every transmit */ - SendTestReport(bStatus); - } - if (testState == POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_INPROGRESS) - { - if (TestFindNextNode()) - { - { - testCurrentDelay = testDelay; - if (timerTestHandle != 0xff) - { - TimerCancel(timerTestHandle); - } - timerTestHandle = 0xff; - if (!testCurrentDelay) - { - testCurrentDelay++; - ZCB_TestDelayNextSendTimeout(); - } - else - { - timerTestHandle = TimerStart(ZCB_TestDelayNextSendTimeout, 1, TIMER_FOREVER); - } - } - } - else - { - if (testCmd >= 0x05) - { - /* One result frame after every round */ - SendTestRoundReport(0); - } - /* No more nodes in this round - delay (if any delay to be done) before starting next round */ - if (testCount && (--testCount != 0)) - { - testCurrentDelay = testDelay; - if (timerTestHandle != 0xff) - { - TimerCancel(timerTestHandle); - } - timerTestHandle = 0xff; - if (!testCurrentDelay) - { - testCurrentDelay++; - ZCB_TestDelayTimeout(); - } - else - { - timerTestHandle = TimerStart(ZCB_TestDelayTimeout, 1, TIMER_FOREVER); - } - } - else - { - testState = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_SUCCES; - SendTestReport(0); - } - } - } - else - { - if (timerTestHandle != 0xff) - { - TimerCancel(timerTestHandle); - } - timerTestHandle = 0xff; - SendTestReport(0); - } -} - - -/*================================= TestSend =============================== -** Function description -** Send the next data frame -** -** -** Side effects: -** -**--------------------------------------------------------------------------*/ -void -TestSend(void) -{ - uint8_t payLoadLen; - - DPRINT("N"); - - if ((testCmd == 0x03) || (testCmd == 0x04) || (testCmd == 0x07) || (testCmd == 0x08)) - { - txBuffer.ZW_BasicSetFrame.cmdClass = COMMAND_CLASS_BASIC; - txBuffer.ZW_BasicSetFrame.cmd = BASIC_SET; - txBuffer.ZW_BasicSetFrame.value = setON ? BASIC_ON : BASIC_OFF; - payLoadLen = sizeof(txBuffer.ZW_BasicSetFrame); - } - else - { - txBuffer.ZW_ManufacturerSpecificReportFrame.cmdClass = COMMAND_CLASS_MANUFACTURER_PROPRIETARY; - txBuffer.ZW_ManufacturerSpecificReportFrame.manufacturerId1 = 0x00; - txBuffer.ZW_ManufacturerSpecificReportFrame.manufacturerId2 = 0x00; - txBuffer.ZW_ManufacturerSpecificReportFrame.productId1 = 0x04; - txBuffer.ZW_ManufacturerSpecificReportFrame.productId2 = 0x81; - *(&(txBuffer.ZW_ManufacturerSpecificReportFrame.productId2) + 1) = 0x00; - *(&(txBuffer.ZW_ManufacturerSpecificReportFrame.productId2) + 2) = BYTE_GET_HIGH_BYTE_IN_WORD(testCount); //data1 - *(&(txBuffer.ZW_ManufacturerSpecificReportFrame.productId2) + 3) = BYTE_GET_LOW_BYTE_IN_WORD(testCount); //data1+1 - payLoadLen = sizeof(txBuffer.ZW_ManufacturerSpecificReportFrame); - } - /* Send meta data frame */ - // Create transmit frame package - uint8_t iFrameLength = (testPayloadLen > payLoadLen) ? testPayloadLen : payLoadLen; - SZwaveTransmitPackage FramePackage = { - .uTransmitParams.SendData.DestNodeId = testNodeID, - .uTransmitParams.SendData.FrameConfig.TransmitOptions = testTxOptions, - .uTransmitParams.SendData.FrameConfig.Handle = &ZCB_TestSendComplete, - .eTransmitType = EZWAVETRANSMITTYPE_STD, - .uTransmitParams.SendData.FrameConfig.iFrameLength = iFrameLength - }; - memcpy(&FramePackage.uTransmitParams.SendData.FrameConfig.aFrame, &txBuffer, iFrameLength); - // Put the package on queue (and dont wait for it) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwTxQueue(), (uint8_t *)&FramePackage, 0); - - if (EQUEUENOTIFYING_STATUS_SUCCESS != QueueStatus) - { - ZCB_TestSendComplete(TRANSMIT_COMPLETE_NO_ACK, NULL); - } -} - - -/*============================ TestStartRound ============================ -** Start a Test round -** -** This is an application function example -** -**--------------------------------------------------------------------------*/ -void -TestStartRound(void) -{ - uint8_t bTemp; - - ZW_NODE_MASK_CLEAR(testresultnodemask, ZW_MAX_NODES / 8); - /* Fill the meta data frame with data */ - for (bTemp = 0; bTemp < (META_DATA_MAX_DATA_SIZE - sizeof(ZW_MANUFACTURER_SPECIFIC_REPORT_FRAME)); bTemp++) - { - *(&(txBuffer.ZW_ManufacturerSpecificReportFrame.productId2) + 1 + bTemp) = bTemp + 1; - } - testNodeID = 0; - /* Find first node to transmit to */ - if ((testState == POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_INPROGRESS) && TestFindNextNode()) - { - /* Found a node */ - TestSend(); - } - else - { - testState = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_FAILED; - SendTestReport(0); - } -} - -ZW_ADD_CMD(FUNC_ID_SERIAL_API_TEST) -{ - /* HOST->ZW: testCmd | testDelay(MSB) | testDelay(LSB) | testPayloadLen | */ - /* testCount(MSB) | testCount(LSB) | testTxOptions | nodemasklen | testnodemask[] | funcID */ - /* testCmd = 0x01 - use sendData */ - /* testCmd = 0x02 - use sendDataMeta */ - /* testCmd = 0x03 - use sendData with Basic Set toggle ON/OFF between rounds */ - /* testCmd = 0x04 - use sendDataMeta with Basic Set toggle ON/OFF between rounds */ - /* testCmd = 0x05 - use sendData with one group result frame (serial) at every round end */ - /* testCmd = 0x06 - use sendDataMeta with one group result frame (serial) at every round end */ - /* testCmd = 0x07 - use sendData with Basic Set toggle ON/OFF and one group result frame (serial) between rounds */ - /* testCmd = 0x08 - use sendDataMeta with Basic Set toggle ON/OFF and one group result frame (serial) between rounds */ - /* ZW->HOST: RES | testStarted */ - uint8_t retVal = 0; - testCmd = frame->payload[0]; - if (testCmd && (testState != POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_INPROGRESS)) - { - WORD_SET_HIGH_LOW_BYTES(testDelay, frame->payload[1], frame->payload[2]); - - testPayloadLen = frame->payload[3]; - WORD_SET_HIGH_LOW_BYTES(testCount, frame->payload[4], frame->payload[5]); - testTxOptions = frame->payload[6]; - testnodemasklen = frame->payload[7]; - /* - Boundary Check */ - if (testnodemasklen > MAX_NODEMASK_LENGTH) - { - testnodemasklen = MAX_NODEMASK_LENGTH; - } - ZW_NODE_MASK_CLEAR(testnodemask, MAX_NODEMASK_LENGTH); - for (uint8_t i = 0; i < testnodemasklen; i++) - { - BYTE_IN_AR(testnodemask, i) = frame->payload[i + 8]; - } - funcID_ComplHandler_Serial_API_Test = frame->payload[frame->payload[7] + 8]; - if (testCount != 0) - { - testFailedCount = 0; - testSuccessCount = 0; - testState = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_INPROGRESS; - TestStartRound(); - retVal = 1; - } - else - { - testState = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_FAILED; - SendTestReport(0); - return; - } - } - else - { - /* STOP test ??? */ - if (!testCmd) - { - testState = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_FAILED; - SendTestReport(0); - retVal = 1; - } - } - DoRespond(retVal); -} -#endif - - #if SUPPORT_SERIAL_API_EXT ZW_ADD_CMD(FUNC_ID_SERIAL_API_EXT) { @@ -3487,8 +3096,8 @@ static uint8_t GetRandom(uint8_t noOfRndBytes, uint8_t* rndBytes) if (EQUEUENOTIFYING_STATUS_SUCCESS == QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&GetRandom, 0)) { // Wait for protocol to handle command - SZwaveCommandStatusPackage Random = { 0 }; - if (GetCommandResponse(&Random, EZWAVECOMMANDSTATUS_GENERATE_RANDOM)) + SZwaveCommandStatusPackage Random = { .eStatusType = EZWAVECOMMANDSTATUS_GENERATE_RANDOM }; + if (GetCommandResponse(&Random, Random.eStatusType)) { memcpy(rndBytes, Random.Content.GenerateRandomStatus.aRandomNumber, Random.Content.GenerateRandomStatus.iLength); return Random.Content.GenerateRandomStatus.iLength; @@ -3536,8 +3145,8 @@ static void AesEcb(uint8_t *key, uint8_t *InputData, uint8_t *outData) SZwaveCommandPackage cmdPackage = {.eCommandType = EZWAVECOMMANDTYPE_AES_ECB}; memcpy(cmdPackage.uCommandParams.AesEcb.key, key, sizeof(cmdPackage.uCommandParams.AesEcb.key)); memcpy(cmdPackage.uCommandParams.AesEcb.inputData, InputData, sizeof(cmdPackage.uCommandParams.AesEcb.inputData)); - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_AES_ECB)) { @@ -3545,7 +3154,7 @@ static void AesEcb(uint8_t *key, uint8_t *InputData, uint8_t *outData) return; } - ASSERT(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. + assert(false); // FIXME We should have more intelligent error handling, we shouldnt assert here. } ZW_ADD_CMD(FUNC_ID_ZW_AES_ECB) @@ -3593,13 +3202,11 @@ static bool SetMaxInclReqIntervals( uint32_t maxInclReqIntervals) if (EQUEUENOTIFYING_STATUS_SUCCESS == QueueNotifyingSendToBack(ZAF_getZwCommandQueue(), (uint8_t *)&setMaxInclusionRequestIntervals, 0)) { // Wait for protocol to handle command - SZwaveCommandStatusPackage result = { 0 }; - if (GetCommandResponse(&result, EZWAVECOMMANDSTATUS_ZW_SET_MAX_INCL_REQ_INTERVALS)) + SZwaveCommandStatusPackage result = { .eStatusType = EZWAVECOMMANDSTATUS_ZW_SET_MAX_INCL_REQ_INTERVALS}; + if ((GetCommandResponse(&result, result.eStatusType)) + && (result.Content.NetworkManagementStatus.statusInfo[0])) { - if(result.Content.NetworkManagementStatus.statusInfo[0]) - { - return true; - } + return true; } } return false; diff --git a/src/zwave_ncp_serial_api_controller/cmd_handlers.h b/src/zwave_ncp/cmd_handlers.h similarity index 97% rename from src/zwave_ncp_serial_api_controller/cmd_handlers.h rename to src/zwave_ncp/cmd_handlers.h index a76f2717..59f1cbc4 100644 --- a/src/zwave_ncp_serial_api_controller/cmd_handlers.h +++ b/src/zwave_ncp/cmd_handlers.h @@ -29,7 +29,7 @@ typedef struct } cmd_handler_map_t; -#define CMD_HANDLER_SECTION "_cmd_handlers" +#define CMD_HANDLER_SECTION "zw_cmd_handlers" #define ZW_ADD_CMD(cmd) \ static void cmd_handler_fcn_##cmd(__attribute__((unused)) const comm_interface_frame_ptr frame); /* Prototype */ \ diff --git a/src/zwave_ncp_serial_api_controller/cmd_handlers_invoker.c b/src/zwave_ncp/cmd_handlers_invoker.c similarity index 76% rename from src/zwave_ncp_serial_api_controller/cmd_handlers_invoker.c rename to src/zwave_ncp/cmd_handlers_invoker.c index 2fdc8244..d250882d 100644 --- a/src/zwave_ncp_serial_api_controller/cmd_handlers_invoker.c +++ b/src/zwave_ncp/cmd_handlers_invoker.c @@ -4,20 +4,20 @@ */ #include "cmd_handlers.h" -#include "Assert.h" +#include /** * This is the first of the registered handlers */ -extern const cmd_handler_map_t __start__cmd_handlers; -#define cmd_handlers_start __start__cmd_handlers +extern const cmd_handler_map_t __start_zw_cmd_handlers; +#define cmd_handlers_start __start_zw_cmd_handlers /** * This marks the end of the handlers. The element * after the last element. This means that this element * is not valid. */ -extern const cmd_handler_map_t __stop__cmd_handlers; -#define cmd_handlers_stop __stop__cmd_handlers +extern const cmd_handler_map_t __stop_zw_cmd_handlers; +#define cmd_handlers_stop __stop_zw_cmd_handlers bool invoke_cmd_handler(const comm_interface_frame_ptr frame) @@ -36,7 +36,7 @@ bool invoke_cmd_handler(const comm_interface_frame_ptr frame) void cmd_foreach(cmd_foreach_callback_t callback, cmd_context_t context) { - ASSERT(callback != NULL); + assert(callback != NULL); cmd_handler_map_t const * iter = &cmd_handlers_start; for ( ; iter < &cmd_handlers_stop; ++iter) { diff --git a/src/zwave_ncp_serial_api_controller/cmds_dcdc.c b/src/zwave_ncp/cmds_dcdc.c similarity index 98% rename from src/zwave_ncp_serial_api_controller/cmds_dcdc.c rename to src/zwave_ncp/cmds_dcdc.c index bc9c76af..22e9eb40 100644 --- a/src/zwave_ncp_serial_api_controller/cmds_dcdc.c +++ b/src/zwave_ncp/cmds_dcdc.c @@ -9,7 +9,7 @@ #include "app.h" #include "sl_dcdc.h" #include "ZW_typedefs.h" -#include "ZW_SerialAPI.h" +#include "SerialAPI.h" #include "zpal_nvm.h" #include "serialapi_file.h" #include "ZAF_nvm_app.h" diff --git a/src/zwave_ncp_serial_api_controller/cmds_management.c b/src/zwave_ncp/cmds_management.c similarity index 82% rename from src/zwave_ncp_serial_api_controller/cmds_management.c rename to src/zwave_ncp/cmds_management.c index 2143b25a..8877f569 100644 --- a/src/zwave_ncp_serial_api_controller/cmds_management.c +++ b/src/zwave_ncp/cmds_management.c @@ -2,7 +2,7 @@ * @file cmds_management.c * @copyright 2022 Silicon Laboratories Inc. */ - +#include #include #include #include @@ -11,12 +11,12 @@ #include #include #include +#include #include #include //#define DEBUGPRINT #include -#include "zw_build_no.h" #ifdef ZW_CONTROLLER #include @@ -45,31 +45,6 @@ #define MAX( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) ) #endif // MAX -static const serial_api_setup_cmd_get_region_info_answer_t regions_info[] = { - {.region=REGION_EU, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_US, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_ANZ, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_HK, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_IN, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_IL, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_RU, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_CN, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_US_LR, .zw_classic=1, .zw_lr=1, .reserved=0, .included_region=REGION_US}, - {.region=REGION_JP, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, - {.region=REGION_KR, .zw_classic=1, .zw_lr=0, .reserved=0, .included_region=REGION_UNDEFINED}, -}; -#define REGIONS_INFO_COUNT (sizeof(regions_info)/sizeof(regions_info[0])) -//default answer in case the requested region is not found in the regions_info table. -static const serial_api_setup_cmd_get_region_info_answer_t unknown_region_info = -{ - .region = REGION_UNDEFINED, - .zw_classic = 0, - .zw_lr = 0, - .reserved = 0, - .included_region = 0 -}; -#define REGION_INFO_SIZE (sizeof(serial_api_setup_cmd_get_region_info_answer_t)) - void func_id_serial_api_get_init_data(__attribute__((unused)) uint8_t inputLength, __attribute__((unused)) const uint8_t *pInputBuffer, uint8_t *pOutputBuffer, @@ -101,7 +76,7 @@ void func_id_serial_api_get_init_data(__attribute__((unused)) uint8_t inputLengt BYTE_IN_AR(pOutputBuffer, 3 + (ZW_MAX_NODES / 8)) = zpal_get_chip_type(); BYTE_IN_AR(pOutputBuffer, 4 + (ZW_MAX_NODES / 8)) = zpal_get_chip_revision(); *pOutputLength += (ZW_MAX_NODES / 8); - ASSERT(*pOutputLength <= 34); // Elsewhere, like in zwapi_init.c, the pOutputBuffer is hardcoded to 34 bytes in lenght. + assert(*pOutputLength <= 34); // Elsewhere, like in zwapi_init.c, the pOutputBuffer is hardcoded to 34 bytes in lenght. #else BYTE_IN_AR(pOutputBuffer, 1) |= GET_INIT_DATA_FLAG_SLAVE_API; /* Flag byte */ BYTE_IN_AR(pOutputBuffer, 2) = 0; /* node bitmask length */ @@ -124,7 +99,7 @@ void func_id_serial_api_get_LR_nodes(__attribute__((unused)) uint8_t inputLength * This Assert is here to remind us to update this function, if in the future the number of supported nodes increases. * In which case the MAX_LR_NODEMASK_LENGTH define will become greater than 128 */ - STATIC_ASSERT(MAX_LR_NODEMASK_LENGTH <= 128, STATIC_ASSERT_MAX_LR_NODEMASK_LENGTH_to_big); + _Static_assert(MAX_LR_NODEMASK_LENGTH <= 128, "STATIC_ASSERT_MAX_LR_NODEMASK_LENGTH_to_big"); uint8_t bitmaskOffset = pInputBuffer[0]; *pOutputLength = 3 + MAX_LR_NODEMASK_LENGTH; @@ -177,7 +152,8 @@ void func_id_serial_api_setup(uint8_t inputLength, uint8_t i=0; uint8_t cmdRes; zpal_radio_region_t rfRegion; - zpal_tx_power_t iPowerLevel, iPower0dbmMeasured; + zpal_tx_power_t iPowerLevel = 0; + zpal_tx_power_t iPower0dbmMeasured = 0; /* We assume operation is nonesuccessful */ cmdRes = false; @@ -227,8 +203,6 @@ void func_id_serial_api_setup(uint8_t inputLength, BITMASK_ADD_CMD(supportedBitmask, SERIAL_API_SETUP_CMD_TX_GET_MAX_LR_PAYLOAD_SIZE); // (17) BITMASK_ADD_CMD(supportedBitmask, SERIAL_API_SETUP_CMD_TX_POWERLEVEL_SET_16_BIT); // (18) BITMASK_ADD_CMD(supportedBitmask, SERIAL_API_SETUP_CMD_TX_POWERLEVEL_GET_16_BIT); // (19) - BITMASK_ADD_CMD(supportedBitmask, SERIAL_API_SETUP_CMD_GET_SUPPORTED_REGION); // (21) - BITMASK_ADD_CMD(supportedBitmask, SERIAL_API_SETUP_CMD_GET_REGION_INFO); // (22) /* Currently supported command with the highest value is SERIAL_API_SETUP_CMD_NODEID_BASETYPE_SET. No commands after it. */ @@ -271,7 +245,7 @@ void func_id_serial_api_setup(uint8_t inputLength, { rfRegion = pInputBuffer[1]; /* Check if the RF Region value is valid, and then store it in flash */ - if ((rfRegion <= REGION_US_LR) || (rfRegion == REGION_JP) || (rfRegion == REGION_KR)) + if (true == isRfRegionValid(rfRegion)) { /* Save into nvm */ cmdRes = SaveApplicationRfRegion(rfRegion); @@ -280,52 +254,10 @@ void func_id_serial_api_setup(uint8_t inputLength, BYTE_IN_AR(pOutputBuffer, i++) = cmdRes; break; - case SERIAL_API_SETUP_CMD_GET_SUPPORTED_REGION: - { - uint8_t supported_region_count = 0; - uint8_t region_count_index = i; - i++; //skip suported region count, move to first region value; - for (rfRegion = REGION_EU; rfRegion <= REGION_US_LR; rfRegion++) { - if (true == isRfRegionValid(rfRegion)) { - supported_region_count++; - pOutputBuffer[i] = (uint8_t) rfRegion; - i++; - } - } - for (rfRegion = REGION_JP; rfRegion <= REGION_KR; rfRegion++) { - if (true == isRfRegionValid(rfRegion)) { - supported_region_count++; - pOutputBuffer[i] = (uint8_t) rfRegion; - i++; - } - } - pOutputBuffer[region_count_index] = supported_region_count; - break; - } - - case SERIAL_API_SETUP_CMD_GET_REGION_INFO: - { - uint8_t info_idx; - //search for the requested region in the regions_info table. - for (info_idx = 0; info_idx < REGIONS_INFO_COUNT; info_idx++) { - if (regions_info[info_idx].region == pInputBuffer[SAPI_SETUP_GET_REGION_INFO_RX_IDX_REGION]) { - break; - } - } - // Copy the answer in the output buffer. - if (info_idx < REGIONS_INFO_COUNT) { - memcpy(&(pOutputBuffer[i]), &(regions_info[info_idx]), REGION_INFO_SIZE); - } else { - //region not found, answer the unknown region info. - memcpy(&(pOutputBuffer[i]), &unknown_region_info, REGION_INFO_SIZE); - } - i += REGION_INFO_SIZE; - break; - } - case SERIAL_API_SETUP_CMD_TX_POWERLEVEL_SET: { - zpal_tx_power_t iTxPower, iAdjust; + zpal_tx_power_t iTxPower; + zpal_tx_power_t iAdjust; /** * HOST->ZW: SERIAL_API_SETUP_CMD_TX_POWER_SET | NormalTxPowerLevel | Measured0dBmPower * ZW->HOST: SERIAL_API_SETUP_CMD_TX_POWER_SET | cmdRes @@ -378,7 +310,8 @@ void func_id_serial_api_setup(uint8_t inputLength, case SERIAL_API_SETUP_CMD_TX_POWERLEVEL_SET_16_BIT: { - zpal_tx_power_t iTxPower, iAdjust; + zpal_tx_power_t iTxPower; + zpal_tx_power_t iAdjust; zpal_tx_power_t iTxPowerMaxSupported; /** * HOST->ZW: SERIAL_API_SETUP_CMD_TX_POWER_SET | NormalTxPowerLevel (MSB) |NormalTxPowerLevel (LSB) | Measured0dBmPower (MSB)| Measured0dBmPower (LSB) @@ -477,7 +410,7 @@ void func_id_serial_api_setup(uint8_t inputLength, * ZW->HOST: SERIAL_API_SETUP_CMD_MAX_LR_TX_PWR_GET | maxtxpower (16-bit) */ { - int16_t readout; + int16_t readout = 0; ReadApplicationMaxLRTxPwr(&readout); BYTE_IN_AR(pOutputBuffer, i++) = (uint8_t)((readout >> 8) & 0xFF); BYTE_IN_AR(pOutputBuffer, i++) = (uint8_t)(readout & 0xFF); @@ -544,19 +477,15 @@ void func_id_zw_get_protocol_version(uint8_t inputLength, // Defined in the specs to be the max size of the git hash const uint8_t git_hash_max_size = 16; uint8_t len = 0; -#if defined(GIT_HASH_ID) - uint8_t git_hash_id[40] = GIT_HASH_ID; -#else /* defined(GIT_HASH_ID) */ - uint8_t *git_hash_id = ZW_GetProtocolGitHash(); -#endif /* defined(GIT_HASH_ID) */ + const uint8_t *git_hash_id = ZW_GetProtocolGitHash(); const SApplicationHandles *pAppHandles = ZAF_getAppHandle(); pOutputBuffer[len++] = pAppHandles->pProtocolInfo->eProtocolType; pOutputBuffer[len++] = pAppHandles->pProtocolInfo->ProtocolVersion.Major; pOutputBuffer[len++] = pAppHandles->pProtocolInfo->ProtocolVersion.Minor; pOutputBuffer[len++] = pAppHandles->pProtocolInfo->ProtocolVersion.Revision; - pOutputBuffer[len++] = (uint8_t)(ZAF_BUILD_NO >> 8); - pOutputBuffer[len++] = (uint8_t)(ZAF_BUILD_NO ); + pOutputBuffer[len++] = (uint8_t)(ZAF_GetBuildNumber() >> 8); + pOutputBuffer[len++] = (uint8_t)(ZAF_GetBuildNumber() ); for (uint32_t i = 0 ; i < git_hash_max_size; i++,len++) { pOutputBuffer[len] = git_hash_id[i]; @@ -575,8 +504,8 @@ bool InitiateShutdown( ZW_Void_Callback_t pCallback) if (EQUEUENOTIFYING_STATUS_SUCCESS == QueueNotifyingSendToBack(pAppHandles->pZwCommandQueue, (uint8_t *)&shutdown, 0)) { // Wait for protocol to handle command - SZwaveCommandStatusPackage result = { 0 }; - if (GetCommandResponse(&result, EZWAVECOMMANDSTATUS_ZW_INITIATE_SHUTDOWN)) + SZwaveCommandStatusPackage result = { .eStatusType = EZWAVECOMMANDSTATUS_ZW_INITIATE_SHUTDOWN }; + if (GetCommandResponse(&result, result.eStatusType)) { return result.Content.InitiateShutdownStatus.result; } diff --git a/src/zwave_ncp_serial_api_controller/cmds_management.h b/src/zwave_ncp/cmds_management.h similarity index 89% rename from src/zwave_ncp_serial_api_controller/cmds_management.h rename to src/zwave_ncp/cmds_management.h index baaac812..d6845457 100644 --- a/src/zwave_ncp_serial_api_controller/cmds_management.h +++ b/src/zwave_ncp/cmds_management.h @@ -37,8 +37,6 @@ typedef enum SERIAL_API_SETUP_CMD_TX_GET_MAX_LR_PAYLOAD_SIZE = 17, SERIAL_API_SETUP_CMD_TX_POWERLEVEL_SET_16_BIT = 18, SERIAL_API_SETUP_CMD_TX_POWERLEVEL_GET_16_BIT = 19, - SERIAL_API_SETUP_CMD_GET_SUPPORTED_REGION = 21, - SERIAL_API_SETUP_CMD_GET_REGION_INFO = 22, } eSerialAPISetupCmd; /* SERIAL_API_SETUP_CMD_NODEID_BASETYPE_SET definitions */ @@ -76,22 +74,6 @@ extern eSerialAPISetupNodeIdBaseType nodeIdBaseType; #define SERIAL_API_SETUP_CMD_NODEID_BASETYPE_SET_CMD_LENGTH_MIN 2 #define SERIAL_API_SETUP_CMD_MAX_LR_TX_PWR_SET_CMD_LENGTH_MIN 3 -// -------------------------------- -// Definitions related to the sub command get region info -/// Index of the region in received buffer -#define SAPI_SETUP_GET_REGION_INFO_RX_IDX_REGION (1) -/// structure used to describe the format of a get region info answer. -#pragma pack(push) -#pragma pack(1) -typedef struct { - uint8_t region; - uint8_t zw_classic:1; ///< the region supports classic Z-Wave - uint8_t zw_lr:1; ///< the region supports Z-Wave Long Range - uint8_t reserved:6; ///< reserved for future use - uint8_t included_region; ///< the selected region include this one (e.g. US_LR include US) -} serial_api_setup_cmd_get_region_info_answer_t; -#pragma pack(pop) - /** * Must be called upon receiving a "Node List Command". * @param inputLength Length of data in input buffer. diff --git a/src/zwave_ncp_serial_api_controller/cmds_power_management.c b/src/zwave_ncp/cmds_power_management.c similarity index 98% rename from src/zwave_ncp_serial_api_controller/cmds_power_management.c rename to src/zwave_ncp/cmds_power_management.c index 0502891e..601bfbc4 100644 --- a/src/zwave_ncp_serial_api_controller/cmds_power_management.c +++ b/src/zwave_ncp/cmds_power_management.c @@ -6,7 +6,7 @@ */ #include #include "cmd_handlers.h" -#include "ZW_SerialAPI.h" +#include "SerialAPI.h" #include "app.h" #include "zpal_power_manager.h" #include "SwTimer.h" diff --git a/src/zwave_ncp_serial_api_controller/cmds_rf.c b/src/zwave_ncp/cmds_rf.c similarity index 100% rename from src/zwave_ncp_serial_api_controller/cmds_rf.c rename to src/zwave_ncp/cmds_rf.c diff --git a/src/zwave_ncp_serial_api_controller/cmds_rf.h b/src/zwave_ncp/cmds_rf.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/cmds_rf.h rename to src/zwave_ncp/cmds_rf.h diff --git a/src/zwave_ncp_serial_api_controller/cmds_security.c b/src/zwave_ncp/cmds_security.c similarity index 100% rename from src/zwave_ncp_serial_api_controller/cmds_security.c rename to src/zwave_ncp/cmds_security.c diff --git a/src/zwave_ncp_serial_api_controller/cmds_security.h b/src/zwave_ncp/cmds_security.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/cmds_security.h rename to src/zwave_ncp/cmds_security.h diff --git a/src/zwave_ncp_serial_api_controller/comm_interface.c b/src/zwave_ncp/comm_interface.c similarity index 96% rename from src/zwave_ncp_serial_api_controller/comm_interface.c rename to src/zwave_ncp/comm_interface.c index 880d3e29..74052542 100644 --- a/src/zwave_ncp_serial_api_controller/comm_interface.c +++ b/src/zwave_ncp/comm_interface.c @@ -5,12 +5,12 @@ #include "comm_interface.h" #include "zpal_uart.h" -#include "ZW_SerialAPI.h" +#include "SerialAPI.h" #include "SwTimer.h" #include "utils.h" #include #include "AppTimer.h" -#include "Assert.h" +#include #include "SerialAPI_hw.h" #define BUFFER_CHECK_TIME_MS 250 @@ -20,8 +20,8 @@ #define ACK_LEN 1 #define CRC_LEN 1 -#define COMM_INT_TX_BUFFER_SIZE 200 -#define COMM_INT_RX_BUFFER_SIZE 200 +#define COMM_INT_TX_BUFFER_SIZE RECEIVE_BUFFER_SIZE +#define COMM_INT_RX_BUFFER_SIZE RECEIVE_BUFFER_SIZE #define TRANSMIT_BUFFER_SIZE COMM_INT_TX_BUFFER_SIZE @@ -64,7 +64,12 @@ typedef struct } tx_frame_t; -static comm_interface_t comm_interface = { 0 }; +static comm_interface_t comm_interface = { + .transport.type = TRANSPORT_TYPE_UART, + .state = COMM_INTERFACE_STATE_SOF, + .buffer_len = 0, +}; + comm_interface_frame_ptr const serial_frame = (comm_interface_frame_ptr)comm_interface.buffer; static uint8_t tx_data[COMM_INT_TX_BUFFER_SIZE]; @@ -219,11 +224,10 @@ void comm_interface_init(void) comm_interface_set_ack_timeout_ms(DEFAULT_ACK_TIMEOUT_MS); comm_interface_set_byte_timeout_ms(DEFAULT_BYTE_TIMEOUT_MS); - zpal_status_t status = zpal_uart_init(&uart_config, &comm_interface.transport.handle); - ASSERT(status == ZPAL_STATUS_OK); + __attribute__((unused)) zpal_status_t status = zpal_uart_init(&uart_config, &comm_interface.transport.handle); + assert(status == ZPAL_STATUS_OK); status = zpal_uart_enable(comm_interface.transport.handle); - ASSERT(status == ZPAL_STATUS_OK); - comm_interface.transport.type = TRANSPORT_TYPE_UART; + assert(status == ZPAL_STATUS_OK); AppTimerRegister(&comm_interface.ack_timer, false, ack_timer_cb); TimerStop(&comm_interface.ack_timer); @@ -234,8 +238,6 @@ void comm_interface_init(void) AppTimerRegister(&comm_interface.buffer_check_timer, true, buffer_check_timer_cb); TimerStop(&comm_interface.buffer_check_timer); - comm_interface.state = COMM_INTERFACE_STATE_SOF; - comm_interface.buffer_len = 0; set_expect_bytes(HEADER_LEN); } @@ -419,7 +421,7 @@ static void handle_default(void) comm_interface_parse_result_t comm_interface_parse_data(bool ack) { - uint8_t rx_byte; + uint8_t rx_byte = 0; comm_interface_parse_result_t result = PARSE_IDLE; while ((result == PARSE_IDLE) && zpal_uart_get_available(comm_interface.transport.handle)) diff --git a/src/zwave_ncp_serial_api_controller/comm_interface.h b/src/zwave_ncp/comm_interface.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/comm_interface.h rename to src/zwave_ncp/comm_interface.h diff --git a/src/zwave_ncp/common_supported_func.h b/src/zwave_ncp/common_supported_func.h new file mode 100644 index 00000000..40be66c3 --- /dev/null +++ b/src/zwave_ncp/common_supported_func.h @@ -0,0 +1,69 @@ +/** + * @file + * @copyright 2022 Silicon Laboratories Inc. + */ + +/* Generated file copied from Sdk670 with std. functions supported by static controller. */ + +#define SUPPORT_LOCK_ROUTE_RESPONSE 1 /* ZW_LockRoute */ +#define SUPPORT_MEMORY_GET_BUFFER 1 /* MemoryGetBuffer */ +#define SUPPORT_MEMORY_GET_BYTE 1 /* MemoryGetByte */ +#define SUPPORT_MEMORY_GET_ID 1 /* MemoryGetID */ +#define SUPPORT_MEMORY_PUT_BUFFER 1 /* MemoryPutBuffer */ +#define SUPPORT_MEMORY_PUT_BYTE 1 /* MemoryPutByte */ +#define SUPPORT_NVM_GET_ID 1 /* NVM_get_id */ +#define SUPPORT_NVM_EXT_READ_LONG_BUFFER 1 /* NVM_ext_read_long_buffer */ +#define SUPPORT_NVM_EXT_READ_LONG_BYTE 1 /* NVM_ext_read_long_byte */ +#define SUPPORT_NVM_EXT_WRITE_LONG_BYTE 0 /* NVM_ext_write_long_byte */ +#define SUPPORT_NVM_EXT_WRITE_LONG_BUFFER 0 /* NVM_ext_write_long_buffer*/ +#define SUPPORT_STORE_HOMEID 0 /* ZW_StoreHomeID */ +#define SUPPORT_ZW_AES_ECB 0 /* ZW_AES_ECB */ +#define SUPPORT_ZW_EXPLORE_REQUEST_INCLUSION 1 /* ZW_ExploreRequestInclusion */ +#define SUPPORT_ZW_EXPLORE_REQUEST_EXCLUSION 1 /* ZW_ExploreRequestExclusion */ +#define SUPPORT_ZW_GET_NODE_PROTOCOL_INFO 1 /* ZW_GetNodeProtocolInfo */ +#define SUPPORT_ZW_GET_PROTOCOL_STATUS 1 /* ZW_GetProtocolStatus */ +#define SUPPORT_ZW_GET_PROTOCOL_VERSION 1 /* ZW_GetProtocolVersion */ +#define SUPPORT_ZW_GET_RANDOM 1 /* ZW_GetRandomWord */ +#define SUPPORT_ZW_GET_SUC_NODE_ID 1 /* ZW_GetSUCNodeID */ +#define SUPPORT_ZW_GET_VERSION 1 /* ZW_Version */ +#define SUPPORT_ZW_REQUEST_NETWORK_UPDATE 1 /* ZW_RequestNetWorkUpdate */ +#define SUPPORT_ZW_SEND_DATA 1 /* ZW_SendData */ +#define SUPPORT_ZW_SEND_DATA_ABORT 1 /* ZW_SendDataAbort */ +#define SUPPORT_ZW_SEND_DATA_MULTI 1 /* ZW_SendDataMulti */ +#define SUPPORT_ZW_SEND_NODE_INFORMATION 1 /* ZW_SendNodeInformation */ +#define SUPPORT_ZW_SET_DEFAULT 1 /* ZW_SetDefault */ +#define SUPPORT_ZW_SET_LEARN_MODE 1 /* ZW_SetLearnMode */ +#define SUPPORT_ZW_SET_PROMISCUOUS_MODE 0 /* ZW_SetPromiscuousMode */ +#define SUPPORT_ZW_SET_RF_RECEIVE_MODE 1 /* ZW_SetRFReceiveMode */ +#define SUPPORT_ZW_SET_SUC_NODE_ID 1 /* ZW_SetSUCNodeID */ +#define SUPPORT_ZW_TYPE_LIBRARY 1 /* ZW_Type_Library */ +#define SUPPORT_ZW_WATCHDOG_START 1 /* ZW_WatchDogEnable */ +#define SUPPORT_ZW_WATCHDOG_STOP 1 /* ZW_WatchDogDisable */ +#define SUPPORT_FUNC_ID_CLEAR_TX_TIMERS 1 /* ZW_ClearTxTimers */ +#define SUPPORT_FUNC_ID_GET_TX_TIMERS 1 /* ZW_GetTxTimer */ +#define SUPPORT_ZW_CLEAR_NETWORK_STATS 1 /* ZW_ClearNetworkStats */ +#define SUPPORT_ZW_GET_NETWORK_STATS 1 /* ZW_GetNetworkStats */ +#define SUPPORT_ZW_GET_BACKGROUND_RSSI 1 /* ZW_GetBackgroundRSSI */ +#define SUPPORT_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD 1 + +#define SUPPORT_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS 1 + +/* SerialAPI functionality support definitions */ +#define SUPPORT_SEND_DATA_TIMING 1 +/* Only Controllers can Add/Remove other nodes */ + +/* Enable support for SerialAPI Startup Notification */ +#define SUPPORT_SERIAL_API_STARTUP_NOTIFICATION 1 + +/* Common SerialAPI functionality support definitions */ +#define SUPPORT_SERIAL_API_GET_INIT_DATA 1 +#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION 1 +#define SUPPORT_SERIAL_API_SET_TIMEOUTS 1 + +#define SUPPORT_SERIAL_API_SOFT_RESET 1 +#define SUPPORT_SERIAL_API_SETUP 1 + +#define SUPPORT_ZW_APPLICATION_UPDATE 1 + +#define SUPPORT_GET_TX_COUNTER 0 +#define SUPPORT_RESET_TX_COUNTER 0 diff --git a/src/zwave_ncp/controller_supported_func.h b/src/zwave_ncp/controller_supported_func.h new file mode 100644 index 00000000..afe5698e --- /dev/null +++ b/src/zwave_ncp/controller_supported_func.h @@ -0,0 +1,83 @@ +/** + * @file + * @copyright 2022 Silicon Laboratories Inc. + */ + +#include "common_supported_func.h" + +#define SUPPORT_GET_ROUTING_TABLE_LINE 1 /* ZW_GetRoutingInfo */ +#define SUPPORT_NVM_BACKUP_RESTORE 1 /* NVM_backup_restore */ +#define SUPPORT_NVM_EXT_BACKUP_RESTORE 1 /* NVM_backup_restore extended */ +#define SUPPORT_ZW_ADD_NODE_TO_NETWORK 1 /* ZW_AddNodeToNetwork */ +#define SUPPORT_ZW_ASSIGN_RETURN_ROUTE 1 /* ZW_AssignReturnRoute */ +#define SUPPORT_ZW_ASSIGN_PRIORITY_RETURN_ROUTE 1 /* ZW_AssignPriorityReturnRoute */ +#define SUPPORT_ZW_ASSIGN_SUC_RETURN_ROUTE 1 /* ZW_AssignSUCReturnRoute */ +#define SUPPORT_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE 1 /* ZW_AssignPrioritySUCReturnRoute */ +#define SUPPORT_ZW_CONTROLLER_CHANGE 1 /* ZW_ControllerChange */ +#define SUPPORT_ZW_DELETE_RETURN_ROUTE 1 /* ZW_DeleteReturnRoute */ +#define SUPPORT_ZW_DELETE_SUC_RETURN_ROUTE 1 /* ZW_DeleteSUCReturnRoute */ +#define SUPPORT_ZW_GET_CONTROLLER_CAPABILITIES 1 /* ZW_GetControllerCapabilities */ +#define SUPPORT_ZW_GET_PRIORITY_ROUTE 1 /* ZW_GetPriorityRoute */ +#define SUPPORT_ZW_SET_PRIORITY_ROUTE 1 /* ZW_SetPriorityRoute */ +#define SUPPORT_ZW_IS_FAILED_NODE_ID 1 /* ZW_isFailedNode */ +#define SUPPORT_ZW_REMOVE_FAILED_NODE_ID 1 /* ZW_RemoveFailedNode */ +#define SUPPORT_ZW_REMOVE_NODE_FROM_NETWORK 1 /* ZW_RemoveNodeFromNetwork */ +#define SUPPORT_ZW_REMOVE_NODE_ID_FROM_NETWORK 1 /* ZW_RemoveNodeIDFromNetwork */ +#define SUPPORT_ZW_REPLACE_FAILED_NODE 1 /* ZW_ReplaceFailedNode */ +#define SUPPORT_ZW_REPLICATION_COMMAND_COMPLETE 1 /* ZW_ReplicationReceiveComplete */ +#define SUPPORT_ZW_REPLICATION_SEND_DATA 1 /* ZW_ReplicationSend */ +#define SUPPORT_ZW_REQUEST_NODE_INFO 1 /* ZW_RequestNodeInfo */ +#define SUPPORT_ZW_REQUEST_NODE_NEIGHBOR_UPDATE 1 /* ZW_RequestNodeNeighborUpdate */ +#define SUPPORT_ZW_SEND_DATA_EX 0 /* ZW_SendDataEx */ +#define SUPPORT_ZW_SEND_DATA_MULTI_EX 0 /* ZW_SendDataMultiEx */ +#define SUPPORT_ZW_GET_SECURITY_KEYS 0 /* ZW_GetSecurityKeys */ +#define SUPPORT_ZW_SEND_SUC_ID 1 /* ZW_SendSUCID */ +#define SUPPORT_ZW_SEND_TEST_FRAME 1 /* ZW_SendTestFrame */ +#define SUPPORT_ZW_SET_ROUTING_MAX 1 /* ZW_SetRoutingMAX*/ +#define SUPPORT_ZW_NVR_GET_VALUE 1 /* ZW_NVRGetValue */ +#define SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE 1 +#define SUPPORT_ZW_INITIATE_SHUTDOWN 1 +#define SUPPORT_SERIAL_API_GET_LR_NODES 1 +#define SUPPORT_SERIAL_GET_LR_CHANNEL 1 +#define SUPPORT_SERIAL_SET_LR_CHANNEL 1 +#define SUPPORT_SERIAL_SET_LR_VIRTUAL_IDS 1 +#define SUPPORT_SERIAL_ENABLE_RADIO_PTI 1 + +/* */ +#define SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0 + +/**************************************************************************/ +/* Common for all Controllers */ +/* SerialAPI functionality support definitions */ +#define SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE 1 + + +/**************************************************************************/ +/* Controller */ +/* Specific SerialAPI functionality support definitions */ +/**************************************************************************/ + +#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 1 + + + +/**************************************************************************/ +/* Bridge Controller */ +/* specific SerialAPI functionality support definitions */ +#ifdef ZW_CONTROLLER_BRIDGE +#define SUPPORT_ZW_GET_VIRTUAL_NODES 1 /* ZW_GetVirtualNodes */ +#define SUPPORT_ZW_IS_VIRTUAL_NODE 1 /* ZW_IsVirtualNode */ +#define SUPPORT_ZW_SEND_DATA_BRIDGE 1 /* ZW_SendData_Bridge */ +#define SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE 1 /* ZW_SendDataMulti_Bridge */ +#define SUPPORT_ZW_SET_SLAVE_LEARN_MODE 1 /* ZW_SetSlaveLearnMode */ +#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 1 +/* Not supported by any controllers except controller portable and installer libs */ +#else +#define SUPPORT_ZW_GET_VIRTUAL_NODES 0 /* ZW_GetVirtualNodes */ +#define SUPPORT_ZW_IS_VIRTUAL_NODE 0 /* ZW_IsVirtualNode */ +#define SUPPORT_ZW_SEND_DATA_BRIDGE 0 /* ZW_SendData_Bridge */ +#define SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE 0 /* ZW_SendDataMulti_Bridge */ +#define SUPPORT_ZW_SET_SLAVE_LEARN_MODE 0 /* ZW_SetSlaveLearnMode */ +#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 + +#endif /* ZW_CONTROLLER_BRIDGE */ diff --git a/src/zwave_ncp_serial_api_controller/main.c b/src/zwave_ncp/main.c similarity index 97% rename from src/zwave_ncp_serial_api_controller/main.c rename to src/zwave_ncp/main.c index d760d1b2..edc48c8a 100644 --- a/src/zwave_ncp_serial_api_controller/main.c +++ b/src/zwave_ncp/main.c @@ -14,7 +14,6 @@ * sections of the MSLA applicable to Source Code. * ******************************************************************************/ -#include "sl_component_catalog.h" #include "sl_system_init.h" #include "sl_system_kernel.h" diff --git a/src/zwave_ncp/nvm_backup_restore.c b/src/zwave_ncp/nvm_backup_restore.c new file mode 100644 index 00000000..63404525 --- /dev/null +++ b/src/zwave_ncp/nvm_backup_restore.c @@ -0,0 +1,395 @@ +/** + * @file nvm_backup_restore.c + * @copyright 2022 Silicon Laboratories Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +//#define DEBUGPRINT +#include "DebugPrint.h" + +/*WARNING: The backup/restore feature is based on the thesis that the NVM area is one continuous block even if it consist of two blocks, + A protocol and an application block. These blocks are defined in the linker script. The blocks are addressed using the data structure below. + The definition of the NVM blocks should not be changed, changing the definition will result in breaking the backup/restore feature*/ + +#define WORK_BUFFER_SIZE 64 + +/* HOST->ZW: +operation [open=0|read=1|write=2|close=3] +length desired length of read/write operation +offset(MSB) pointer to NVM memory +offset(LSB) +buffer[] buffer only sent for operation=write +*/ +/* ZW->HOST: +retVal [OK=0|error=1|EOF=-1] +length actual length of read/written data +offset(MSB) pointer to NVM memory (EOF ptr for operation=open) +offset(LSB) +buffer[] buffer only returned for operation=read +*/ + + +/* Macro and definitions used to get index of the different fields in NVM backup & restore buffer. */ +#define NVMBACKUP_RX_SUB_CMD_IDX (0) /** index of sub command field in rx buffer. */ +#define NVMBACKUP_RX_DATA_LEN_IDX (1) /** index of data length field in rx buffer. */ +#define NVMBACKUP_RX_ADDR_IDX (2) /** index of address field in rx buffer. */ +/** macro used the get index of the data in NVM Backup Restore received buffer. +@param size size of the address field.*/ +#define NVMBACKUP_RX_DATA_IDX(size) (NVMBACKUP_RX_ADDR_IDX + (size)) + +#define NVMBACKUP_TX_STATUS_IDX (0) /** index of command status field in tx buffer. */ +#define NVMBACKUP_TX_DATA_LEN_IDX (1) /** index of data length field in tx buffer. */ +#define NVMBACKUP_TX_ADDR_IDX (2) /** index of address field in tx buffer. */ +/** macro used to get index of the data in NVM Backup Restore send buffer. +@param size size of the address field.*/ +#define NVMBACKUP_TX_DATA_IDX(size) (NVMBACKUP_TX_ADDR_IDX + (size)) + +#define NVMBACKUP_STATUS_SIZE (1) /** size of command status. */ +#define NVMBACKUP_DATA_LEN_SIZE (1) /** size of Data length field. */ + + +static eNVMBackupRestoreOperation NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationClose; + +/** + * This function is used to extract the address from a received frame (on serial API). + * This address is extracted depending on the size of the address field (which depend on the command type: + * 2 bytes for the legacy NVM_BACKUP_RESTORE, 4bytes for the new NVM_EXT_BACKUP_RESTORE). + * + * @param pAddr[in] pointer on the first address byte in the rx buffer. + * @param addrSize[in] size of the address field (in bytes). + * + * @return NVM address + */ +static uint32_t NvmBackupAddrGet(uint8_t* pAddr, const nvm_backup_restore_addr_size_t addrSize) +{ + uint32_t address = 0; + + /* Build the address starting from the most significant byte. + For each new byte, shift the address then add the new byte.*/ + for (uint8_t i = 0; i < addrSize; i++) + { + address = (address << 8) + *pAddr; + pAddr++; + } + + return address; +} + +/** + * This function is used to fill the address in a frame (on serial API). + * This address is set depending on the size of the address field (which depend on the command type: + * 2 bytes for the legacy NVM_BACKUP_RESTORE, 4bytes for the new EXT_NVM_BACKUP_RESTORE). + * + * @param pAddr[in] pointer on the first address byte in the tx buffer. + * @param addrSize[in] size of the address field (in bytes). + * @param address[in] address to fill in the tx frame + */ +static void NvmBackupAddrSet(uint8_t* pAddr, const nvm_backup_restore_addr_size_t addrSize, uint32_t address) +{ + int8_t i = 0; //must be signed to avoid infinite loop. + + /*fill the buffer starting from the lowest significant byte. + addrSize can be 2 or 4, so there can't be any sign issue with the cast.*/ + for (i = (int8_t)addrSize-1; i >= 0; i--) + { + pAddr[i] = address & 0x000000FF; + address >>= 8; + } +} + + +/** + * Must be called to open the backup restore feature + * The function will shut down the RF, Z-Wave timer system , close the NVM system, and disable the watchdog timer + * + * @return true if backup/resotre is opened else false + */ +static bool NvmBackupOpen(void) +{ + SZwaveCommandPackage nvmOpen = { + .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_OPEN, + .uCommandParams.NvmBackupRestore.offset = 0, + .uCommandParams.NvmBackupRestore.length = 0, + }; + zpal_enable_watchdog(false); + uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmOpen); + if (EQUEUENOTIFYING_STATUS_SUCCESS == bReturn) + { + SZwaveCommandStatusPackage cmdStatus = { .eStatusType = EZWAVECOMMANDSTATUS_NVM_BACKUP_RESTORE}; + if ((GetCommandResponse(&cmdStatus, cmdStatus.eStatusType)) + && (cmdStatus.Content.NvmBackupRestoreStatus.status)) + { + return true; + } + } + return false; +} + +/** + * Read data from the NVM area + * + * @param offset[in] The offset of the NVM area to read from + * @param length[in] the length of the NVM area to read + * @param pNvmData[out] the data read from the NVM area + * + * @return true if data is read else false + */ +static uint8_t NvmBackupRead( uint32_t offset, uint8_t length, uint8_t* pNvmData) +{ + SZwaveCommandPackage nvmRead = { + .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_READ, + .uCommandParams.NvmBackupRestore.offset = offset, + .uCommandParams.NvmBackupRestore.length = length, + .uCommandParams.NvmBackupRestore.nvmData = pNvmData + }; + DPRINTF("NVM_Read_ 0x%08x, 0x%08x, 0x%08x\r\n",offset, length, (uint32_t)pNvmData); + uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmRead); + if (EQUEUENOTIFYING_STATUS_SUCCESS == bReturn) + { + SZwaveCommandStatusPackage cmdStatus = { 0 }; + if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_NVM_BACKUP_RESTORE)) + { + if (cmdStatus.Content.NvmBackupRestoreStatus.status) + { + DPRINT("NVM_READ_OK\r\n"); + return true; + } + } + } + DPRINT("NVM_READ_ERR\r\n"); + return false; +} + +/** + * Close the open/restore feature + * + * @return true if backup/retore feature is closed else false + */ + +static uint8_t NvmBackupClose(void) +{ + SZwaveCommandPackage nvmClose = { + .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_CLOSE + }; + uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmClose); + + return ((EQUEUENOTIFYING_STATUS_SUCCESS == bReturn)? true: false); +} + +/** + * Restore the NVM data + * + * @param offset[in] The offset of the NVM area to wite backup data to + * @param length[in] the length of the backup data + * @param pNvmData[out] the data to be written to the NVM + * + * @return true if data is written else false + */ +static uint8_t NvmBackupRestore( uint32_t offset, uint8_t length, uint8_t* pNvmData) +{ + SZwaveCommandPackage nvmWrite = { + .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_WRITE, + .uCommandParams.NvmBackupRestore.offset = offset, + .uCommandParams.NvmBackupRestore.length = length, + .uCommandParams.NvmBackupRestore.nvmData = pNvmData + }; + uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmWrite); + if (EQUEUENOTIFYING_STATUS_SUCCESS == bReturn) + { + SZwaveCommandStatusPackage cmdStatus = { 0 }; + if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_NVM_BACKUP_RESTORE)) + { + if (cmdStatus.Content.NvmBackupRestoreStatus.status) + { + DPRINT("NVM_WRITE_OK\r\n"); + return true; + } + } + } + DPRINT("NVM_WRITE_ERR\r\n"); + return false; +} + +bool NvmBackupLegacyCmdAvailable(void) +{ + /* If NVM size is 0x10000, the legacy command should be forbidden. However, for backward + compatibility, a controller with exactly 0x10000 bytes of NVM must be able to use it. + WARNING: in that case, the legacy NVM backup & restore command will return a size equal to 0. */ + if (0x10000 < zpal_nvm_backup_get_size()) + { + return false; + } + else + { + return true; + } +} + +void func_id_serial_api_nvm_backup_restore(__attribute__((unused)) uint8_t inputLength, uint8_t *pInputBuffer, uint8_t *pOutputBuffer, uint8_t *pOutputLength, bool extended) +{ + uint32_t NVM_WorkPtr = 0; + uint8_t dataLength; + const uint32_t nvm_storage_size = zpal_nvm_backup_get_size(); + nvm_backup_restore_addr_size_t addrSize; + + //set address size according to the command (legacy or extended backup & restore) + if (true == extended) + { + addrSize = NVM_EXT_BACKUP_RESTORE_ADDR_SIZE; + } + else + { + addrSize = NVM_BACKUP_RESTORE_ADDR_SIZE; + } + + dataLength = 0; /* Assume nothing is read or written */ + memset(pOutputBuffer, 0, NVMBACKUP_STATUS_SIZE + NVMBACKUP_DATA_LEN_SIZE + addrSize); + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueOK; /* Assume not at EOF and no ERROR */ + + switch (pInputBuffer[NVMBACKUP_RX_SUB_CMD_IDX]) /* operation */ + { + case NVMBackupRestoreOperationOpen: /* open */ + { + if (NVMBackupRestoreOperationClose == NVMBackupRestoreOperationInProgress) + { + /* Lock everyone else out from making changes to the NVM content */ + /* Remember to have some kind of dead-mans-pedal to release lock again. */ + /* TODO */ + // here we have to shut down RF and disable power management and close NVM subsystem + if (NvmBackupOpen()) + { + NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationOpen; + /* Set the size of the backup/restore. (Number of bytes in flash used for file systems) */ + /* Please note that the special case where nvm_storage_size == 0x10000 is indicated by 0x00 0x00 */ + NvmBackupAddrSet( &(pOutputBuffer[NVMBACKUP_TX_ADDR_IDX]), addrSize, nvm_storage_size); + + /* in case of extended command, set the sub commands capability*/ + if (true == extended) + { + pOutputBuffer[NVMBACKUP_TX_DATA_IDX(addrSize) + (dataLength++)] = + (1 << NVMBackupRestoreOperationOpen) + + (1 << NVMBackupRestoreOperationRead) + + (1 << NVMBackupRestoreOperationWrite) + + (1 << NVMBackupRestoreOperationClose); + } + pOutputBuffer[NVMBACKUP_TX_DATA_LEN_IDX] = dataLength; + } + else + { + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueError; /*Report error we can't open backup restore feature*/ + } + } + } + break; + + case NVMBackupRestoreOperationRead: /* read */ + { + DPRINT("NVM_Read_ \r\n"); + /* Check that NVM is ready */ + if ((NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationRead) && + (NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationOpen)) + { + DPRINT("NVM_Read_Mis \r\n"); + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueOperationMismatch; + break; + } + NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationRead; + /* Load input */ + dataLength = pInputBuffer[NVMBACKUP_RX_DATA_LEN_IDX]; /* Requested dataLength */ + NVM_WorkPtr = NvmBackupAddrGet( &(pInputBuffer[NVMBACKUP_RX_ADDR_IDX]), addrSize); + /* Validate Input */ + if (dataLength > WORK_BUFFER_SIZE)/* Make sure that length isn't larger than the available buffer size */ + { + dataLength = WORK_BUFFER_SIZE; + } + if ((NVM_WorkPtr + dataLength) >= nvm_storage_size)/* Make sure that we don't go beyond valid NVM content */ + { + DPRINT("NVM_Read_EOF \r\n"); + dataLength = (uint8_t)(nvm_storage_size - NVM_WorkPtr); + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = (uint8_t)NVMBackupRestoreReturnValueEOF; /* Indicate at EOF */ + } + /* fill output buffer */ + pOutputBuffer[NVMBACKUP_TX_DATA_LEN_IDX] = dataLength; + NvmBackupAddrSet( &(pOutputBuffer[NVMBACKUP_TX_ADDR_IDX]), addrSize, NVM_WorkPtr); + NvmBackupRead(NVM_WorkPtr, dataLength, &pOutputBuffer[NVMBACKUP_TX_DATA_IDX(addrSize)]); + } + break; + + case NVMBackupRestoreOperationWrite: /* write */ + { + /* Check that NVM is ready */ + if ((NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationWrite) && + (NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationOpen)) + { + DPRINT("NVM_Write_mis \r\n"); + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueOperationMismatch; + break; + } + NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationWrite; + /* Load input */ + dataLength = pInputBuffer[NVMBACKUP_RX_DATA_LEN_IDX]; /* Requested dataLength */ + NVM_WorkPtr = NvmBackupAddrGet( &(pInputBuffer[NVMBACKUP_RX_ADDR_IDX]), addrSize); + /* Validate input */ + if (dataLength > WORK_BUFFER_SIZE) + { + DPRINT("NVM_Write_buff_err \r\n"); + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueError; /* ERROR: ignore request if length is larger than available buffer */ + } + else + { + /* Make sure that we don't go beyond valid NVM content */ + uint8_t tmp_buf[WORK_BUFFER_SIZE]; + if ((NVM_WorkPtr + dataLength) >= nvm_storage_size) + { + DPRINT("NVM_Write_EOF \r\n"); + dataLength = (uint8_t)(nvm_storage_size - NVM_WorkPtr); + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = (uint8_t)NVMBackupRestoreReturnValueEOF; /* Indicate at EOF */ + } + /* copy data into another buffer because write operation will be done in another task. */ + memcpy(tmp_buf, (uint8_t*)&pInputBuffer[NVMBACKUP_RX_DATA_IDX(addrSize)], dataLength); + NvmBackupRestore(NVM_WorkPtr , dataLength, tmp_buf); + /* fill output buffer */ + pOutputBuffer[NVMBACKUP_TX_DATA_LEN_IDX] = dataLength; + NvmBackupAddrSet( &(pOutputBuffer[NVMBACKUP_TX_ADDR_IDX]), addrSize, NVM_WorkPtr); + + } + /* reset data length because there is no data in output buffer. */ + dataLength = 0; + } + break; + + case NVMBackupRestoreOperationClose: /* close */ + { + /* Unlock NVM content, so everyone else can make changes again */ + // here we have to shut down RF and disable power management + /* TODO */ + if (NVMBackupRestoreOperationInProgress == NVMBackupRestoreOperationClose) + { + break; + } + if (NvmBackupClose()) + { + NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationClose; + } + else + { + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueError; /*report error we canot close backup restore feature*/ + } + } + break; + + default: + pOutputBuffer[NVMBACKUP_TX_STATUS_IDX] = NVMBackupRestoreReturnValueError; + break; + } + //build output buffer length + *pOutputLength = (uint8_t)(NVMBACKUP_STATUS_SIZE + NVMBACKUP_DATA_LEN_SIZE + addrSize + dataLength); +} diff --git a/src/zwave_ncp_serial_api_controller/nvm_backup_restore.h b/src/zwave_ncp/nvm_backup_restore.h similarity index 64% rename from src/zwave_ncp_serial_api_controller/nvm_backup_restore.h rename to src/zwave_ncp/nvm_backup_restore.h index a7967c97..42ef75e6 100644 --- a/src/zwave_ncp_serial_api_controller/nvm_backup_restore.h +++ b/src/zwave_ncp/nvm_backup_restore.h @@ -7,6 +7,14 @@ #define APPS_SERIALAPI_NVM_BACKUP_RESTROE_H_ #include +#include "SerialAPI.h" + +/** + * This function is used to check if the legacy nvm backup & restore command can be used. + * The legacy command cannot be used if address of the NVM are larger than 2 bytes. + * @return true or false depending on the NVM size + */ +bool NvmBackupLegacyCmdAvailable(void); /** * Must be called upon receiving a "Serial API NVM Backup/restore commands". @@ -14,10 +22,12 @@ * @param pInputBuffer Input buffer * @param pOutputBuffer Output buffer * @param pOutputLength Length of data in output buffer. + * @param extended Input Length of the address field */ void func_id_serial_api_nvm_backup_restore(uint8_t inputLength, uint8_t* pInputBuffer, uint8_t* pOutputBuffer, - uint8_t* pOutputLength); + uint8_t* pOutputLength, + bool extended); #endif /* APPS_SERIALAPI_NVM_BACKUP_RESTROE_H_ */ diff --git a/src/zwave_ncp_serial_api_controller/serialapi_file.c b/src/zwave_ncp/serialapi_file.c similarity index 91% rename from src/zwave_ncp_serial_api_controller/serialapi_file.c rename to src/zwave_ncp/serialapi_file.c index e0c4dab8..9338e55b 100644 --- a/src/zwave_ncp_serial_api_controller/serialapi_file.c +++ b/src/zwave_ncp/serialapi_file.c @@ -21,8 +21,7 @@ #include #include #include "SizeOf.h" -#include "Assert.h" -#include "DebugPrintConfig.h" +#include //#define DEBUGPRINT //#include "DebugPrint.h" #include "SyncEvent.h" @@ -106,10 +105,6 @@ typedef struct __attribute__((packed)) SApplicationConfiguration // Must be pac static void WriteDefault(void); -// Application file system -static zpal_nvm_handle_t pFileSystemApplication; - - static void WriteDefaultApplicationConfiguration(void); static bool ObjectExist(zpal_nvm_object_key_t key); @@ -127,8 +122,8 @@ static void SerialAPI_FileSystemMigrationManagement(void) { //Read present file system version file - uint32_t presentFilesysVersion; - uint32_t expectedFilesysVersion; // This will hold the file system version that current SW will support. + uint32_t presentFilesysVersion = 0; + uint32_t expectedFilesysVersion = 0; // This will hold the file system version that current SW will support. SerialAPI_GetZWVersion(&presentFilesysVersion); @@ -137,7 +132,7 @@ SerialAPI_FileSystemMigrationManagement(void) if(expectedFilesysVersion < presentFilesysVersion) { //System downgrade. Should not be allowed. - ASSERT(false); + assert(false); } else if(expectedFilesysVersion > presentFilesysVersion) // File system upgrade needed. Initiating file system migration... { @@ -152,18 +147,18 @@ SerialAPI_FileSystemMigrationManagement(void) // Add code for migration of file system to version APP_VERSION_7_15_3 (7.15.3). //Get length of legacy file - size_t dataLen; - zpal_nvm_get_object_size(pFileSystemApplication, FILE_ID_APPLICATIONCONFIGURATION, &dataLen); + size_t dataLen = 0; + ZAF_nvm_app_get_object_size(FILE_ID_APPLICATIONCONFIGURATION, &dataLen); //Read legacy file to first members of tApplicationConfiguration - SApplicationConfiguration_v7_15_3 tApplicationConfiguration = { 0 }; + SApplicationConfiguration_v7_15_3 tApplicationConfiguration = { .rfRegion = REGION_UNDEFINED }; // Initialize, since zpal_nvm_read() might fail. - zpal_nvm_read(pFileSystemApplication, FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, dataLen); + ZAF_nvm_app_read(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, dataLen); //Write default values to new members of tApplicationConfiguration and update the file. tApplicationConfiguration.radio_debug_enable = 0; tApplicationConfiguration.maxTxPower = 140; - zpal_status_t status = zpal_nvm_write(pFileSystemApplication, FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, + zpal_status_t status = ZAF_nvm_app_write(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, sizeof(tApplicationConfiguration)); if (ZPAL_STATUS_OK == status) { @@ -174,11 +169,11 @@ SerialAPI_FileSystemMigrationManagement(void) // Migrate files from file system version APP_VERSION_7_15_3 to APP_VERSION_7_18_1. if ( presentFilesysVersion < APP_VERSION_7_18_1 ) { - SApplicationConfiguration_v7_15_3 tApplicationConfiguration_v7_15_3 = { 0 }; - SApplicationConfiguration_V7_18_1 tApplicationConfiguration = { 0 }; + SApplicationConfiguration_v7_15_3 tApplicationConfiguration_v7_15_3 = { .rfRegion = REGION_UNDEFINED }; + SApplicationConfiguration_V7_18_1 tApplicationConfiguration = { .rfRegion = REGION_UNDEFINED }; zpal_status_t status; - status = zpal_nvm_read(pFileSystemApplication, FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration_v7_15_3, + status = ZAF_nvm_app_read(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration_v7_15_3, sizeof(tApplicationConfiguration_v7_15_3)); if (ZPAL_STATUS_OK != status) { @@ -192,7 +187,7 @@ SerialAPI_FileSystemMigrationManagement(void) tApplicationConfiguration.radio_debug_enable = tApplicationConfiguration_v7_15_3.radio_debug_enable; tApplicationConfiguration.maxTxPower = tApplicationConfiguration_v7_15_3.maxTxPower; - status = zpal_nvm_write(pFileSystemApplication, FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, + status = ZAF_nvm_app_write(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, sizeof(tApplicationConfiguration)); /* Do not use FILE_SIZE_APPLICATIONCONFIGURATION in * migration functions, instead hard-code the size as * sizes do change with FW upgrades. */ @@ -209,11 +204,11 @@ SerialAPI_FileSystemMigrationManagement(void) // Migrate files from file system version APP_VERSION_7_20_0 (same as 7_18_1) to APP_VERSION_7_21_0. if ( presentFilesysVersion < APP_VERSION_7_21_0 ) { - SApplicationConfiguration sAppCfgMigration = { 0 }; + SApplicationConfiguration sAppCfgMigration = { .rfRegion = REGION_UNDEFINED }; zpal_status_t status; //cannot migrate if the file system is older than V7.18.1. Other migration script should have been called before. - ASSERT(APP_VERSION_7_18_1 <= presentFilesysVersion); + assert(APP_VERSION_7_18_1 <= presentFilesysVersion); /*New application configuration has only a new member (no change in the legacy part). So read the legacy structure directly in the new one, then just set value for new member.*/ @@ -243,7 +238,7 @@ SerialAPI_FileSystemMigrationManagement(void) /* * If this fails, some of the migrations were not performed due to earlier migrations that have failed. */ - ASSERT(APP_VERSION_7_21_0 <= presentFilesysVersion); + assert(APP_VERSION_7_21_0 <= presentFilesysVersion); /** * @attention This implementation assumes that the build is going to update the ZAF_FILE_ID_APP_VERSION to the current! @@ -262,16 +257,16 @@ uint8_t SerialApiFileInit(void) bool initStatus = ZAF_nvm_app_init(); if (!initStatus) { - ASSERT(false); //Assert has been kept for debugging , can be removed from production code. This error can only be caused by some internal flash HW failure + assert(false); //Assert has been kept for debugging , can be removed from production code. This error can only be caused by some internal flash HW failure } initStatus = ZAF_nvm_init(); if (!initStatus) { - ASSERT(false); //Assert has been kept for debugging , can be removed from production code. This error can only be caused by some internal flash HW failure + assert(false); //Assert has been kept for debugging , can be removed from production code. This error can only be caused by some internal flash HW failure } - uint32_t appVersion; + uint32_t appVersion = 0; bool status = SerialAPI_GetZWVersion(&appVersion); if (status) @@ -569,16 +564,13 @@ ReadApplicationRfRegion(zpal_radio_region_t* rfRegion) uint8_t SaveApplicationNodeIdBaseType(eSerialAPISetupNodeIdBaseType nodeIdBaseType) { - SApplicationConfiguration tApplicationConfiguration = { 0 }; + SApplicationConfiguration tApplicationConfiguration = { .rfRegion = REGION_UNDEFINED }; uint8_t dataIsWritten = false; - zpal_status_t status; - - status = ZAF_nvm_app_read(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, FILE_SIZE_APPLICATIONCONFIGURATION); - if (ZPAL_STATUS_OK == status) + + if (ZPAL_STATUS_OK == ZAF_nvm_app_read(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, FILE_SIZE_APPLICATIONCONFIGURATION)) { tApplicationConfiguration.nodeIdBaseType = nodeIdBaseType; - status = ZAF_nvm_app_write(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, FILE_SIZE_APPLICATIONCONFIGURATION); - if (ZPAL_STATUS_OK == status) + if (ZPAL_STATUS_OK == ZAF_nvm_app_write(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, FILE_SIZE_APPLICATIONCONFIGURATION)) { dataIsWritten = true; } @@ -589,18 +581,14 @@ SaveApplicationNodeIdBaseType(eSerialAPISetupNodeIdBaseType nodeIdBaseType) uint8_t ReadApplicationNodeIdBaseType(eSerialAPISetupNodeIdBaseType* nodeIdBaseType) { - SApplicationConfiguration tApplicationConfiguration; + SApplicationConfiguration tApplicationConfiguration = { .rfRegion = REGION_UNDEFINED }; uint8_t dataIsRead = false; - zpal_status_t status; - - if (ObjectExist(FILE_ID_APPLICATIONCONFIGURATION)) + + if (ObjectExist(FILE_ID_APPLICATIONCONFIGURATION) + && (ZPAL_STATUS_OK == ZAF_nvm_app_read(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, FILE_SIZE_APPLICATIONCONFIGURATION))) { - status = ZAF_nvm_app_read(FILE_ID_APPLICATIONCONFIGURATION, &tApplicationConfiguration, FILE_SIZE_APPLICATIONCONFIGURATION); - if (ZPAL_STATUS_OK == status) - { - *nodeIdBaseType = tApplicationConfiguration.nodeIdBaseType; + *nodeIdBaseType = tApplicationConfiguration.nodeIdBaseType; dataIsRead = true; - } } return dataIsRead; @@ -734,9 +722,8 @@ ReadApplicationEnablePTI(uint8_t *radio_debug_enable) uint32_t ReadApplicationVersion(void) { - uint32_t appVersion; + uint32_t appVersion = 0; SerialAPI_GetZWVersion(&appVersion); - return appVersion; } diff --git a/src/zwave_ncp_serial_api_controller/serialapi_file.h b/src/zwave_ncp/serialapi_file.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/serialapi_file.h rename to src/zwave_ncp/serialapi_file.h diff --git a/src/zwave_ncp/slave_supported_func.h b/src/zwave_ncp/slave_supported_func.h new file mode 100644 index 00000000..797f9480 --- /dev/null +++ b/src/zwave_ncp/slave_supported_func.h @@ -0,0 +1,62 @@ +/** + * @file + * @copyright 2022 Silicon Laboratories Inc. + */ + +#include "common_supported_func.h" + +#define SUPPORT_GET_ROUTING_TABLE_LINE 0 /* ZW_GetRoutingInfo */ +#define SUPPORT_NVM_BACKUP_RESTORE 0 /* MemoryGetBuffer */ +#define SUPPORT_ZW_ADD_NODE_TO_NETWORK 0 /* ZW_AddNodeToNetwork */ +#define SUPPORT_ZW_ASSIGN_RETURN_ROUTE 0 /* ZW_AssignReturnRoute */ +#define SUPPORT_ZW_ASSIGN_PRIORITY_RETURN_ROUTE 0 /* ZW_AssignPriorityReturnRoute */ +#define SUPPORT_ZW_ASSIGN_SUC_RETURN_ROUTE 0 /* ZW_AssignSUCReturnRoute */ +#define SUPPORT_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE 0 /* ZW_AssignPrioritySUCReturnRoute */ +#define SUPPORT_ZW_CONTROLLER_CHANGE 0 /* ZW_ControllerChange */ +#define SUPPORT_ZW_DELETE_RETURN_ROUTE 0 /* ZW_DeleteReturnRoute */ +#define SUPPORT_ZW_DELETE_SUC_RETURN_ROUTE 0 /* ZW_DeleteSUCReturnRoute */ +#define SUPPORT_ZW_GET_CONTROLLER_CAPABILITIES 0 /* ZW_GetControllerCapabilities */ +#define SUPPORT_ZW_GET_PRIORITY_ROUTE 0 /* ZW_GetPriorityRoute */ +#define SUPPORT_ZW_SET_PRIORITY_ROUTE 0 /* ZW_SetPriorityRoute */ +#define SUPPORT_ZW_IS_FAILED_NODE_ID 0 /* ZW_isFailedNode */ +#define SUPPORT_ZW_REMOVE_FAILED_NODE_ID 0 /* ZW_RemoveFailedNode */ +#define SUPPORT_ZW_REMOVE_NODE_FROM_NETWORK 0 /* ZW_RemoveNodeFromNetwork */ +#define SUPPORT_ZW_REMOVE_NODE_ID_FROM_NETWORK 0 /* ZW_RemoveNodeIDFromNetwork */ +#define SUPPORT_ZW_REPLACE_FAILED_NODE 0 /* ZW_ReplaceFailedNode */ +#define SUPPORT_ZW_REPLICATION_COMMAND_COMPLETE 0 /* ZW_ReplicationReceiveComplete */ +#define SUPPORT_ZW_REPLICATION_SEND_DATA 0 /* ZW_ReplicationSend */ +#define SUPPORT_ZW_REQUEST_NODE_INFO 0 /* ZW_RequestNodeInfo */ +#define SUPPORT_ZW_REQUEST_NODE_NEIGHBOR_UPDATE 0 /* ZW_RequestNodeNeighborUpdate */ +#define SUPPORT_ZW_SEND_DATA_EX 1 /* ZW_SendDataEx */ +#define SUPPORT_ZW_SEND_DATA_MULTI_EX 1 /* ZW_SendDataMultiEx */ +#define SUPPORT_ZW_GET_SECURITY_KEYS 1 /* ZW_GetSecurityKeys */ +#define SUPPORT_ZW_SEND_SUC_ID 0 /* ZW_SendSUCID */ +#define SUPPORT_ZW_SEND_TEST_FRAME 0 /* ZW_SendTestFrame */ +#define SUPPORT_ZW_SET_ROUTING_MAX 0 /*notUsed*/ +#define SUPPORT_ZW_NVR_GET_VALUE 0 /* ZW_NVRGetValue */ +#define SUPPORT_ZW_INITIATE_SHUTDOWN 0 +#define SUPPORT_SERIAL_API_GET_LR_NODES 0 +#define SUPPORT_SERIAL_GET_LR_CHANNEL 0 +#define SUPPORT_SERIAL_SET_LR_CHANNEL 0 +#define SUPPORT_SERIAL_SET_LR_VIRTUAL_IDS 0 +#define SUPPORT_SERIAL_ENABLE_RADIO_PTI 0 + +/* */ +#define SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0 + +/**************************************************************************/ +/* Common for all slaves */ +/* SerialAPI functionality support definitions */ +#define SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE 0 + +/**************************************************************************/ +/* Slave enhanced */ +/* Specific SerialAPI functionality support definitions */ + +#define SUPPORT_ZW_GET_VIRTUAL_NODES 0 /* ZW_GetVirtualNodes */ +#define SUPPORT_ZW_IS_VIRTUAL_NODE 0 /* ZW_IsVirtualNode */ +#define SUPPORT_ZW_SEND_DATA_BRIDGE 0 /* ZW_SendData_Bridge */ +#define SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE 0 /* ZW_SendDataMulti_Bridge */ +#define SUPPORT_ZW_SET_SLAVE_LEARN_MODE 0 /* ZW_SetSlaveLearnMode */ +#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 +#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 0 diff --git a/src/zwave_ncp_serial_api_controller/utils.c b/src/zwave_ncp/utils.c similarity index 70% rename from src/zwave_ncp_serial_api_controller/utils.c rename to src/zwave_ncp/utils.c index bec51e15..75eafc20 100644 --- a/src/zwave_ncp_serial_api_controller/utils.c +++ b/src/zwave_ncp/utils.c @@ -3,6 +3,7 @@ * @copyright 2022 Silicon Laboratories Inc. */ +#include #include #include #include @@ -26,16 +27,16 @@ uint8_t GetCommandResponse(SZwaveCommandStatusPackage *pCmdStatus, EZwaveCommand if (m_pAppTaskHandle && (0 < uxQueueMessagesWaiting(Queue))) { /* More elements in queue call xTaskNotify */ - BaseType_t Status = xTaskNotify(m_pAppTaskHandle, 1 << EAPPLICATIONEVENT_ZWCOMMANDSTATUS, eSetBits); - ASSERT(Status == pdPASS); // We probably received a bad Task handle + __attribute__((unused)) BaseType_t Status = xTaskNotify(m_pAppTaskHandle, 1 << EAPPLICATIONEVENT_ZWCOMMANDSTATUS, eSetBits); + assert(Status == pdPASS); // We probably received a bad Task handle } return true; } else { /* Re-insert none-matching message into Queue */ - BaseType_t result = xQueueSendToBack(Queue, (uint8_t*)pCmdStatus, 0); - ASSERT(pdTRUE == result); + __attribute__((unused)) BaseType_t result = xQueueSendToBack(Queue, (uint8_t*)pCmdStatus, 0); + assert(pdTRUE == result); } } } @@ -44,8 +45,8 @@ uint8_t GetCommandResponse(SZwaveCommandStatusPackage *pCmdStatus, EZwaveCommand if (m_pAppTaskHandle && (0 < uxQueueMessagesWaiting(Queue))) { /* Only call xTaskNotify if still elements in queue */ - BaseType_t Status = xTaskNotify(m_pAppTaskHandle, 1 << EAPPLICATIONEVENT_ZWCOMMANDSTATUS, eSetBits); - ASSERT(Status == pdPASS); // We probably received a bad Task handle + __attribute__((unused)) BaseType_t Status = xTaskNotify(m_pAppTaskHandle, 1 << EAPPLICATIONEVENT_ZWCOMMANDSTATUS, eSetBits); + assert(Status == pdPASS); // We probably received a bad Task handle } return false; } @@ -56,14 +57,14 @@ uint8_t IsPrimaryController(void) SZwaveCommandPackage cmdPackage = { .eCommandType = EZWAVECOMMANDTYPE_IS_PRIMARY_CTRL }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_IS_PRIMARY_CTRL)) { return cmdStatus.Content.IsPrimaryCtrlStatus.result; } - ASSERT(false); + assert(false); return 0; } @@ -73,14 +74,14 @@ uint8_t GetControllerCapabilities(void) SZwaveCommandPackage cmdPackage = { .eCommandType = EZWAVECOMMANDTYPE_GET_CONTROLLER_CAPABILITIES }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); - SZwaveCommandStatusPackage cmdStatus = { 0 }; - if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_GET_CONTROLLER_CAPABILITIES)) + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + SZwaveCommandStatusPackage cmdStatus = { .eStatusType = EZWAVECOMMANDSTATUS_GET_CONTROLLER_CAPABILITIES }; + if (GetCommandResponse(&cmdStatus, cmdStatus.eStatusType)) { return cmdStatus.Content.GetControllerCapabilitiesStatus.result; } - ASSERT(false); + assert(false); return 0; } @@ -110,11 +111,11 @@ void GetNodeInfo(uint16_t NodeId, t_ExtNodeInfo* pNodeInfo) }; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&GetNodeInfoCommand, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&GetNodeInfoCommand, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldnt take long) - SZwaveCommandStatusPackage NodeInfo = { 0 }; - if (GetCommandResponse(&NodeInfo, EZWAVECOMMANDSTATUS_NODE_INFO)) + SZwaveCommandStatusPackage NodeInfo = { .eStatusType = EZWAVECOMMANDSTATUS_NODE_INFO}; + if (GetCommandResponse(&NodeInfo, NodeInfo.eStatusType)) { if (NodeInfo.Content.NodeInfoStatus.NodeId == NodeId) { @@ -122,7 +123,7 @@ void GetNodeInfo(uint16_t NodeId, t_ExtNodeInfo* pNodeInfo) return; } } - ASSERT(false); + assert(false); } /** @@ -141,16 +142,16 @@ void Get_included_nodes(uint8_t* node_id_list) .eCommandType = EZWAVECOMMANDTYPE_ZW_GET_INCLUDED_NODES}; // Put the Command on queue (and dont wait for it, queue must be empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&GetIncludedNodesCommand, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&GetIncludedNodesCommand, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldnt take long) - SZwaveCommandStatusPackage includedNodes = { 0 }; - if (GetCommandResponse(&includedNodes, EZWAVECOMMANDSTATUS_ZW_GET_INCLUDED_NODES)) + SZwaveCommandStatusPackage includedNodes = { .eStatusType = EZWAVECOMMANDSTATUS_ZW_GET_INCLUDED_NODES }; + if (GetCommandResponse(&includedNodes, includedNodes.eStatusType)) { memcpy(node_id_list, (uint8_t*)includedNodes.Content.GetIncludedNodes.node_id_list, sizeof(NODE_MASK_TYPE)); return; } - ASSERT(false); + assert(false); } @@ -171,8 +172,8 @@ void Get_included_lr_nodes(uint8_t* node_id_list) }; // Put the Command on queue (and don't wait for it, queue is most likely empty) - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&GetIncludedNodesCommand, 0); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&GetIncludedNodesCommand, 0); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); // Wait for protocol to handle command (it shouldn't take long) SZwaveCommandStatusPackage includedNodes = { 0 }; if (GetCommandResponse(&includedNodes, EZWAVECOMMANDSTATUS_ZW_GET_INCLUDED_LR_NODES)) @@ -180,7 +181,7 @@ void Get_included_lr_nodes(uint8_t* node_id_list) memcpy(node_id_list, (uint8_t*)includedNodes.Content.GetIncludedNodesLR.node_id_list, sizeof(LR_NODE_MASK_TYPE)); return; } - ASSERT(false); + assert(false); } @@ -214,8 +215,8 @@ void GetLongRangeChannel(uint8_t * channel_n, uint8_t *auto_channel_config) SZwaveCommandPackage cmdPackage = { .eCommandType = EZWAVECOMMANDTYPE_ZW_GET_LR_CHANNEL }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; *auto_channel_config = 0; *channel_n = 0; @@ -225,7 +226,7 @@ void GetLongRangeChannel(uint8_t * channel_n, uint8_t *auto_channel_config) *auto_channel_config = cmdStatus.Content.GetLRChannel.result & LR_AUTO_CHANNEL_CONFIG_MASK; return; } - ASSERT(false); + assert(false); } bool SetLongRangeChannel(uint8_t channel) @@ -235,14 +236,14 @@ bool SetLongRangeChannel(uint8_t channel) .eCommandType = EZWAVECOMMANDTYPE_ZW_SET_LR_CHANNEL, .uCommandParams.SetLRChannel.value = channel }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); SZwaveCommandStatusPackage cmdStatus = { 0 }; if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_ZW_SET_LR_CHANNEL)) { return cmdStatus.Content.SetLRChannel.result; } - ASSERT(false); + assert(false); return 0; } @@ -254,8 +255,8 @@ void SetLongRangeVirtualNodes(uint8_t bitmask) .eCommandType = EZWAVECOMMANDTYPE_ZW_SET_LR_VIRTUAL_IDS, .uCommandParams.SetLRVirtualNodeIDs.value = bitmask }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); } uint8_t GetPTIConfig(void) @@ -264,14 +265,14 @@ uint8_t GetPTIConfig(void) SZwaveCommandPackage cmdPackage = { .eCommandType = EZWAVECOMMANDTYPE_ZW_GET_PTI_CONFIG }; - EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); - ASSERT(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); - SZwaveCommandStatusPackage cmdStatus; - if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_ZW_GET_PTI_CONFIG)) + __attribute__((unused)) EQueueNotifyingStatus QueueStatus = QueueNotifyingSendToBack(m_pAppHandles->pZwCommandQueue, (uint8_t *)&cmdPackage, 500); + assert(EQUEUENOTIFYING_STATUS_SUCCESS == QueueStatus); + SZwaveCommandStatusPackage cmdStatus = { .eStatusType = EZWAVECOMMANDSTATUS_ZW_GET_PTI_CONFIG }; + if (GetCommandResponse(&cmdStatus, cmdStatus.eStatusType)) { return cmdStatus.Content.GetPTIconfig.result; } - ASSERT(false); + assert(false); return 0; } diff --git a/src/zwave_ncp_serial_api_controller/utils.h b/src/zwave_ncp/utils.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/utils.h rename to src/zwave_ncp/utils.h diff --git a/src/zwave_ncp_serial_api_controller/virtual_slave_node_info.c b/src/zwave_ncp/virtual_slave_node_info.c similarity index 100% rename from src/zwave_ncp_serial_api_controller/virtual_slave_node_info.c rename to src/zwave_ncp/virtual_slave_node_info.c diff --git a/src/zwave_ncp_serial_api_controller/virtual_slave_node_info.h b/src/zwave_ncp/virtual_slave_node_info.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/virtual_slave_node_info.h rename to src/zwave_ncp/virtual_slave_node_info.h diff --git a/src/zwave_ncp_serial_api_controller/config/zaf_config.h b/src/zwave_ncp/zaf_config.h similarity index 98% rename from src/zwave_ncp_serial_api_controller/config/zaf_config.h rename to src/zwave_ncp/zaf_config.h index a51b4bf3..7864decf 100644 --- a/src/zwave_ncp_serial_api_controller/config/zaf_config.h +++ b/src/zwave_ncp/zaf_config.h @@ -1,6 +1,6 @@ /***************************************************************************//** * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * The licensor of this software is Silicon Laboratories Inc. Your use of this @@ -27,8 +27,8 @@ // Indicates if the bootloader can be updated // Includes the bootloader as a target -// Default: 0 -#define ZAF_CONFIG_BOOTLOADER_UPGRADABLE 0 +// Default: 1 +#define ZAF_CONFIG_BOOTLOADER_UPGRADABLE 1 // // Command Class Firmware Update - Firmware targets @@ -281,7 +281,7 @@ // SPECIFIC_THERMOSTAT_LINE_VOLTAGE // SPECIFIC_THERMOSTAT_SETBACK // Default: ICON_TYPE_GENERIC_ON_OFF_POWER_SWITCH -#define ZAF_CONFIG_INSTALLER_ICON_TYPE 0 +#define ZAF_CONFIG_INSTALLER_ICON_TYPE ICON_TYPE_GENERIC_ON_OFF_POWER_SWITCH // // Version Configuration @@ -318,7 +318,7 @@ // Default is 0 which is invalid in the context of Silicon Labs Z-Wave apps. According to CC // Manufacturer Specific specification, zero is a valid value and can be used as a product ID. // Default: 0x0000 -#define ZAF_CONFIG_PRODUCT_ID 4 +#define ZAF_CONFIG_PRODUCT_ID 0x0000 // // Device type @@ -330,7 +330,7 @@ // Entry Control // Generic Controller // Meter -// Repeater End Device +// Repeater End Device // Sensor Multilevel // Switch Binary // Switch Multilevel @@ -358,10 +358,10 @@ // Secure Keypad // Routing Sensor Multilevel // Notification Sensor -// Repeater End Device +// Repeater End Device // Infrared Repeater // Default: SPECIFIC_TYPE_NOT_USED -#define ZAF_CONFIG_SPECIFIC_TYPE 0 +#define ZAF_CONFIG_SPECIFIC_TYPE SPECIFIC_TYPE_NOT_USED // // Multi Channel Configuration @@ -397,4 +397,4 @@ // <<< end of configuration section >>> -#endif /* _ZAF_CONFIG_H_ */ \ No newline at end of file +#endif /* _ZAF_CONFIG_H_ */ diff --git a/src/zwave_ncp_serial_api_controller/zaf_config_security.h b/src/zwave_ncp/zaf_config_security.h similarity index 100% rename from src/zwave_ncp_serial_api_controller/zaf_config_security.h rename to src/zwave_ncp/zaf_config_security.h diff --git a/src/zwave_ncp/zwave_ncp.slcp b/src/zwave_ncp/zwave_ncp.slcp new file mode 100644 index 00000000..f677e48e --- /dev/null +++ b/src/zwave_ncp/zwave_ncp.slcp @@ -0,0 +1,150 @@ +project_name: zwave_ncp +label: Z-Wave - NCP +category: Z-Wave|Apps +description: Z-Wave NCP firmware. Derived from the `zwave_ncp_serial_api_controller` example Gecko SDK project. +package: Z-Wave +quality: production +component: + # Z-Wave + - id: zw_role_type_central_static_controller + - id: zaf_ncp + - id: zw_core + - id: zw_appshw_serialapi + - id: zw_apputilities_minimal + - id: zw_app_timer_deep_sleep + - id: zw_api_zw + - id: zw_api_controller + - id: zw_dcdc_override + - id: ZW_MIGRATION_FROM_7_20 + # Platform + - id: emlib_letimer + - id: emlib_timer + - id: emlib_msc + - id: gpiointerrupt + - id: sl_system + - id: device_init + - id: mpu # disable execution from RAM +source: + - path: app_node_info.c + - path: cmd_handlers_invoker.c + - path: cmd_handlers.c + - path: cmd_get_capabilities.c + - path: cmds_dcdc.c # Proprietary commands for Silabs only + - path: cmds_power_management.c # Proprietary commands for Silabs only + - path: cmds_management.c + - path: cmds_rf.c + - path: cmds_security.c + - path: comm_interface.c + - path: nvm_backup_restore.c + - path: serialapi_file.c + - path: app.c + - path: utils.c + - path: virtual_slave_node_info.c + - path: main.c +include: + - path: . + file_list: + - path: app_node_info.h + - path: cmd_handlers.h + - path: cmds_management.h + - path: cmds_rf.h + - path: cmds_security.h + - path: comm_interface.h + - path: controller_supported_func.h + - path: nvm_backup_restore.h + - path: serialapi_file.h + - path: app.h + - path: common_supported_func.h + - path: slave_supported_func.h + - path: utils.h + - path: virtual_slave_node_info.h + - path: SerialAPI.h + - path: . + file_list: + - path: "zaf_config_security.h" +config_file: + # For series 2 + - path: zaf_config.h + file_id: zaf_config + condition: [device_series_2] +configuration: + - name: ZAF_CONFIG_GENERIC_TYPE + value: GENERIC_TYPE_STATIC_CONTROLLER + - name: ZAF_CONFIG_SPECIFIC_TYPE + value: SPECIFIC_TYPE_PC_CONTROLLER + - name: ZAF_CONFIG_PRODUCT_ID + value: 4 # Silicon Labs Z-Wave Serial API product ID + - name: NVM3_DEFAULT_MAX_OBJECT_SIZE + value: 1900 + - name: NVM3_DEFAULT_CACHE_SIZE + value: 100 + - name: SL_BOARD_ENABLE_VCOM + value: 1 + - name: SL_DEVICE_INIT_EMU_EM4_STATE + value: emuEM4Hibernate + - name: SL_DEVICE_INIT_EMU_EM4_RETAIN_LFRCO + value: 1 + - name: SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE + value: emuPinRetentionLatch + - name: SL_IOSTREAM_USART_VCOM_CONVERT_BY_DEFAULT_LF_TO_CRLF + value: 1 + - name: SL_IOSTREAM_USART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION + value: 0 # UART RX shouldn't prevent EM2 + - name: SL_IOSTREAM_EUSART_VCOM_CONVERT_BY_DEFAULT_LF_TO_CRLF + value: 1 + - name: SL_IOSTREAM_EUSART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION + value: 0 # UART RX shouldn't prevent EM2 + - name: configUSE_IDLE_HOOK + value: 1 + - name: configTIMER_TASK_PRIORITY + value: 55 + - name: configMAX_SYSCALL_INTERRUPT_PRIORITY + value: 16 + condition: [device_series_2] + - name: configKERNEL_INTERRUPT_PRIORITY + value: 112 + condition: [device_series_2] + - name: configTIMER_QUEUE_LENGTH + value: 8 + - name: SL_DEVICE_INIT_DCDC_BYPASS + value: 1 + - name: SL_PSA_ITS_USER_MAX_FILES + value: 32 + condition: ["device_series_2", "device_security_vault"] + - name: SL_PSA_KEY_USER_SLOT_COUNT + value: 14 + condition: ["device_series_2", "device_security_vault"] + - name: SL_SLEEPTIMER_PERIPHERAL + value: SL_SLEEPTIMER_PERIPHERAL_BURTC + condition: ["device_series_2"] + - name: SL_STACK_SIZE + value: 1280 + - name: SL_HEAP_SIZE + value: 128 + - name: ZAF_CONFIG_INSTALLER_ICON_TYPE + value: 0 + - name: ZAF_APP_NAME + value: '"serial_api_controller"' + - name: SL_RAIL_UTIL_RAIL_POWER_MANAGER_INIT + value: 0 + +define: + - name: APP_PROPERTIES_CONFIG_FILE + value: + - name: LCD_PRESENT + value: 1 + +post_build: + profile: zwave_ncp_serial_api_controller + +filter: + - name: "Wireless Technology" + value: ["Z-Wave"] + - name: "Device Type" + value: ["NCP"] + - name: "Project Difficulty" + value: ["Beginner"] + +template_contribution: + - name: rodata_sections # Ensure memory section define by Z-Wave stack are placed in the rodata section + value: zw_cmd_handlers diff --git a/src/zwave_ncp_serial_api_controller/.cproject b/src/zwave_ncp_serial_api_controller/.cproject deleted file mode 100644 index 816928e0..00000000 --- a/src/zwave_ncp_serial_api_controller/.cproject +++ /dev/null @@ -1,2550 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/README.md b/src/zwave_ncp_serial_api_controller/README.md deleted file mode 100644 index 860340a6..00000000 --- a/src/zwave_ncp_serial_api_controller/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Serial API - -The Serial Applications Programming Interface (Serial API) allows a host to communicate with a Z-Wave -chip. The host may be PC or a less powerful embedded host CPU, e.g., in a remote control or in a -gateway device. Depending on the chip family, the Serial API may be accessed via RS-232 or USB -physical interfaces. - -There are 2 available versions of SerialAPI: - - - SerialAPI Controller - - SerialAPI End Device - -The following host-based sample applications are available in the SDK: - -- Z/IP Gateway – Gateway application using Serial API features of the bridge controller API -- PC Controller – Demonstrates Serial API features of the bridge controller API - -The host-based sample applications are described in the respective SDK overview documents. - -The Serial API leverages the Z-Wave Protocol API. The Serial API introduces additional messages related -to inter-host communications. - -## Known Issues - -### OTW Update - -The following update paths for Serial API Controller are not possible using the -pre-built binaries because the defines `ZAF_CONFIG_GENERIC_TYPE` and -`ZAF_CONFIG_SPECIFIC_TYPE` differ across these versions: - -- 7.19 or lower to 7.20 -- 7.20 to 7.21 or higher - -However, it is possible to create a custom firmware that is compatible with -earlier versions of the application by building the application manually after -editing `application_properties_config.h`. - -If you want to update a device running the pre-built 7.19 or lower version -firmware to 7.20, -change both `PRODUCT_ID_GENERIC_TYPE` and `PRODUCT_ID_SPECIFIC_TYPE` to -`0`. - -If you want to update a device running the pre-built 7.20 version firmware -to 7.21 or higher, -remove the following conditional block from the file: - -``` -#if (ZAF_CONFIG_GENERIC_TYPE == GENERIC_TYPE_STATIC_CONTROLLER && \ - ZAF_CONFIG_SPECIFIC_TYPE == SPECIFIC_TYPE_PC_CONTROLLER) -(...) -#endif -``` - -Changing these values will only affect the Product ID, stored in the struct -`sl_app_properties`. -The application will still report the values specified in the defines -`ZAF_CONFIG_GENERIC_TYPE` and `ZAF_CONFIG_SPECIFIC_TYPE` in its -Node Information Frame.\ -Note that these values can be changed on the fly using the Serial API command `SERIAL_API_APPL_NODE_INFORMATION`. diff --git a/src/zwave_ncp_serial_api_controller/app.h b/src/zwave_ncp_serial_api_controller/app.h deleted file mode 100644 index 4ab412ef..00000000 --- a/src/zwave_ncp_serial_api_controller/app.h +++ /dev/null @@ -1,663 +0,0 @@ -/** - * @file - * Header file for Serial API implementation. - * - * Contains various application definitions and SerialAPI - * functionality support definitions. - * - * @copyright 2019 Silicon Laboratories Inc. - */ -#ifndef _SERIALAPPL_H_ -#define _SERIALAPPL_H_ -#include - -#ifndef UNIT_TEST -/* Z-Wave library functionality support definitions */ -#ifdef ZW_SLAVE -#include -#else -#include -#endif -#endif /*#ifndef UNIT_TEST*/ - -#include - -#include - -#ifdef ZW_SLAVE -#include -#endif -#ifdef ZW_SECURITY_PROTOCOL -#include -#endif - -#ifdef ZW_CONTROLLER -#include -#endif - -/* Serial API version */ -#define SERIAL_API_VER 10 - -/* Max number of times a frame will be transmitted to PC */ -#define MAX_SERIAL_RETRY 3 - -/* Number of bytes in a homeID */ -#define HOMEID_LENGTH 4 - -/* Max number of nodes in a multi cast (group) */ -#define MAX_GROUP_NODES 64 - -/* Macro for accessing the byte in byte_array at the index indx */ -#define BYTE_IN_AR(byte_array, indx) (*(byte_array + indx)) - -/* Macro for getting HIGH uint8_t in wVar uint16_t variable */ -#define BYTE_GET_HIGH_BYTE_IN_WORD(wVar) *((uint8_t*)&wVar) - -/* Macro for getting LOW uint8_t in wVar uint16_t variable */ -#define BYTE_GET_LOW_BYTE_IN_WORD(wVar) *((uint8_t*)&wVar + 1) - -/* Macro for setting HIGH uint8_t and LOW uint8_t in wVar uint16_t variable */ -#define WORD_SET_HIGH_LOW_BYTES(wVar, bHIGHByte, bLOWByte) BYTE_GET_HIGH_BYTE_IN_WORD(wVar) = bHIGHByte; \ - BYTE_GET_LOW_BYTE_IN_WORD(wVar) = bLOWByte - -/* States for ApplicationPoll function */ -enum -{ - stateStartup, - stateIdle, - stateTxSerial, - stateFrameParse, - stateCallbackTxSerial, - stateCommandTxSerial, - stateAppSuspend -}; - -/* States for FUNC_ID_NVM_BACKUP_RESTORE operation */ -typedef enum -{ - NVMBackupRestoreOperationOpen, - NVMBackupRestoreOperationRead, - NVMBackupRestoreOperationWrite, - NVMBackupRestoreOperationClose -} eNVMBackupRestoreOperation; - -/* Return values for FUNC_ID_NVM_BACKUP_RESTORE operation */ -typedef enum -{ - NVMBackupRestoreReturnValueOK = false, /* Everything is OK, so far */ - NVMBackupRestoreReturnValueError = true, /* Non specific error */ - NVMBackupRestoreReturnValueOperationMismatch, /* Error mixing read and write */ - NVMBackupRestoreReturnValueOperationDisturbed, /* Error read operation disturbed by other write */ - NVMBackupRestoreReturnValueEOF = EOF /* Not really an error. Just an indication of EndOfFile */ -} eNVMBackupRestoreReturnValue; - -#ifndef ZW_SECURITY_PROTOCOL -/* params used by ApplicationNodeInformation */ -#define APPL_NODEPARM_MAX 35 -#endif -#define APPL_SLAVENODEPARM_MAX APPL_NODEPARM_MAX - - -typedef enum _E_SERIALAPI_SET_LEARN_MODE_ -{ - SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_DISABLE = ZW_SET_LEARN_MODE_DISABLE, - SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_CLASSIC = ZW_SET_LEARN_MODE_CLASSIC, - SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_NWI = ZW_SET_LEARN_MODE_NWI, - SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_NWE = ZW_SET_LEARN_MODE_NWE, - SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_MAX = SERIALPI_SET_LEARN_MODE_ZW_SET_LEARN_MODE_NWE, - - /* slave_learn_plus/ctrl_learn extensions */ - SERIALPI_SET_LEARN_MODE_LEARN_PLUS_OFFSET = 0x80, - -} E_SERIALAPI_SET_LEARN_MODE; - -#ifdef ZW_SLAVE_ROUTING -/* SerialAPI only used state - used when ZW_RequestNodeInfo transmit fails */ -/* It is then assumed that the destination node did not receive the request. */ -#define UPDATE_STATE_NODE_INFO_REQ_FAILED 0x81 -#endif - -/* SerialAPI functionality support definitions */ -#define SUPPORT_SEND_DATA_TIMING 1 -/* Definitions for SerialAPI startup */ -typedef enum -{ - SERIALAPI_CONFIG_STARTUP_NOTIFICATION_ENABLED = 1, - SERIALAPI_CONFIG_UNDEFINED = 0xFE -} SERIALAPI_CONFIG_T; - -#if defined(NUNIT_TEST) && !defined(ZW_CONTROLLER_BRIDGE) -#define SUPPORT_ZW_NUNIT 1 -#else -#define SUPPORT_ZW_NUNIT 0 -#endif - -#ifdef PORT_STATUS -#define SUPPORT_ZW_PORT_STATUS 1 -#else -#define SUPPORT_ZW_PORT_STATUS 0 -#endif -#define SUPPORT_ZW_SET_SECURITY_S0_NETWORK_KEY 0 /*deprecated*/ -/* Enable support for SerialAPI Startup Notification */ -#define SUPPORT_SERIAL_API_STARTUP_NOTIFICATION 1 - -/* Security in Protocol SerialAPI functionality support definitions */ -#ifdef ZW_SECURITY_PROTOCOL -#define SUPPORT_APPLICATION_SECURITY_EVENT 0 -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 1 -#if (SUPPORT_ZW_GET_SECURITY_KEYS | \ - SUPPORT_ZW_SET_SECURITY_S0_NETWORK_KEY | \ - SUPPORT_ZW_GET_SECURITY_S2_PUBLIC_DSK | \ - SUPPORT_ZW_SET_SECURITY_S2_CRITICAL_NODE_ID) -#define SUPPORT_ZW_SECURITY_SETUP 1 -#else -#define SUPPORT_ZW_SECURITY_SETUP 0 -#endif -#else /*#ifdef ZW_SECURITY_PROTOCOL*/ -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 0 -#define SUPPORT_ZW_SECURITY_SETUP 0 -#define SUPPORT_APPLICATION_SECURITY_EVENT 0 -#endif - -/* Common SerialAPI functionality support definitions */ -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION 1 - -#define SUPPORT_SERIAL_API_GET_CAPABILITIES 1 -#define SUPPORT_SERIAL_API_SOFT_RESET 1 - -#define SUPPORT_SERIAL_API_POWER_MANAGEMENT 0 -#define SUPPORT_SERIAL_API_READY 0 - -#define SUPPORT_SERIAL_API_EXT 1 -#ifdef ZW_SECURITY_PROTOCOL -/* Only libraries with SECURITY buildin should supports this (slave_enhanced_232) */ -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 1 -#else -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 0 -#endif - -#ifdef ZW_ENABLE_RTC -#define SUPPORT_CLOCK_SET 1 -#define SUPPORT_CLOCK_GET 1 -#define SUPPORT_CLOCK_CMP 1 -#define SUPPORT_RTC_TIMER_CREATE 1 -#define SUPPORT_RTC_TIMER_READ 1 -#define SUPPORT_RTC_TIMER_DELETE 1 -#define SUPPORT_RTC_TIMER_CALL 1 -#else -#define SUPPORT_CLOCK_SET 0 -#define SUPPORT_CLOCK_GET 0 -#define SUPPORT_CLOCK_CMP 0 -#define SUPPORT_RTC_TIMER_CREATE 0 -#define SUPPORT_RTC_TIMER_READ 0 -#define SUPPORT_RTC_TIMER_DELETE 0 -#define SUPPORT_RTC_TIMER_CALL 0 -#endif - -#define SUPPORT_ZW_AUTO_PROGRAMMING 1 - -#ifdef TIMER_SUPPORT -#define SUPPORT_TIMER_START 1 -#define SUPPORT_TIMER_RESTART 1 -#define SUPPORT_TIMER_CANCEL 1 -#define SUPPORT_TIMER_CALL 1 -#else -#define SUPPORT_TIMER_START 0 -#define SUPPORT_TIMER_RESTART 0 -#define SUPPORT_TIMER_CANCEL 0 -#define SUPPORT_TIMER_CALL 0 -#endif - -#if defined(NUNIT_TEST) && !defined(ZW_CONTROLLER_BRIDGE) -#define SUPPORT_ZW_NUNIT 1 -#else -#define SUPPORT_ZW_NUNIT 0 -#endif - -#ifdef PORT_STATUS -#define SUPPORT_ZW_PORT_STATUS 1 -#else -#define SUPPORT_ZW_PORT_STATUS 0 -#endif -/* ZW_EnableSUC() no longer exists in the library */ - -/* */ -#define SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0 - - -#define FID_BM_OFFS(FUNCID) ((FUNCID - 1) / 8) -#define FID_BM(FUNCID) (1 << ((FUNCID - 1) & 0x07)) -#define CAP_FID(OFFSET, FUNCID) (((FUNCID != 0) && (FID_BM_OFFS(FUNCID) == OFFSET)) ? FID_BM(FUNCID) : 0) -#ifdef ZW_CONTROLLER_SINGLE -#define CAP_BM(OFFSET) (CAP_FID(OFFSET, (SUPPORT_SERIAL_API_POWER_MANAGEMENT == 0) ? 0 : FUNC_ID_SERIAL_API_POWER_MANAGEMENT) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_READY == 0) ? 0 : FUNC_ID_SERIAL_API_READY) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_INIT_DATA == 0) ? 0 : FUNC_ID_SERIAL_API_GET_INIT_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_APPL_NODE_INFORMATION == 0) ? 0 : FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE == 0) ? 0 : FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_COMMAND_HANDLER == 0) ? 0 : FUNC_ID_APPLICATION_COMMAND_HANDLER) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_CONTROLLER_CAPABILITIES == 0) ? 0 : FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_SET_TIMEOUTS == 0) ? 0 : FUNC_ID_SERIAL_API_SET_TIMEOUTS) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_CAPABILITIES == 0) ? 0 : FUNC_ID_SERIAL_API_GET_CAPABILITIES) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_SOFT_RESET == 0) ? 0 : FUNC_ID_SERIAL_API_SOFT_RESET) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_STARTUP_NOTIFICATION == 0) ? 0 : FUNC_ID_SERIAL_API_STARTED) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_SETUP == 0) ? 0 : FUNC_ID_SERIAL_API_SETUP) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES == 0) ? 0 : FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_PROTOCOL_VERSION == 0) ? 0 : FUNC_ID_ZW_GET_PROTOCOL_VERSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_RF_RECEIVE_MODE == 0) ? 0 : FUNC_ID_ZW_SET_RF_RECEIVE_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_SLEEP_MODE == 0) ? 0 : FUNC_ID_ZW_SET_SLEEP_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_NODE_INFORMATION == 0) ? 0 : FUNC_ID_ZW_SEND_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA == 0) ? 0 : FUNC_ID_ZW_SEND_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_BRIDGE == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_BRIDGE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_EX == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_EX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_META_BRIDGE == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_META_BRIDGE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_MULTI == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_MULTI) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_MULTI_BRIDGE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_MULTI_EX == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_MULTI_EX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SECURITY_SETUP == 0) ? 0 : FUNC_ID_ZW_SECURITY_SETUP) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_SECURITY_EVENT == 0) ? 0 : FUNC_ID_APPLICATION_SECURITY_EVENT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_VERSION == 0) ? 0 : FUNC_ID_ZW_GET_VERSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_ABORT == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_ABORT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_RF_POWER_LEVEL_SET == 0) ? 0 : FUNC_ID_ZW_RF_POWER_LEVEL_SET) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_RF_POWER_LEVEL_GET == 0) ? 0 : FUNC_ID_ZW_RF_POWER_LEVEL_GET) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_TYPE_LIBRARY == 0) ? 0 : FUNC_ID_ZW_TYPE_LIBRARY) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_PROTOCOL_STATUS == 0) ? 0 : FUNC_ID_ZW_GET_PROTOCOL_STATUS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_ENABLE == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_ENABLE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_DISABLE == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_DISABLE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_KICK == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_KICK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_START == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_START)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_STOP == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_STOP)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_WUT_TIMEOUT == 0) ? 0 : FUNC_ID_ZW_SET_WUT_TIMEOUT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_WUT_KICKED == 0) ? 0 : FUNC_ID_ZW_IS_WUT_KICKED) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_EXT_INT_LEVEL == 0) ? 0 : FUNC_ID_ZW_SET_EXT_INT_LEVEL) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_META == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_META) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_TEST_FRAME == 0) ? 0 : FUNC_ID_ZW_SEND_TEST_FRAME) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_RANDOM == 0) ? 0 : FUNC_ID_ZW_GET_RANDOM) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_GET_ID == 0) ? 0 : FUNC_ID_MEMORY_GET_ID) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_GET_BYTE == 0) ? 0 : FUNC_ID_MEMORY_GET_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_PUT_BYTE == 0) ? 0 : FUNC_ID_MEMORY_PUT_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_GET_BUFFER == 0) ? 0 : FUNC_ID_MEMORY_GET_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_PUT_BUFFER == 0) ? 0 : FUNC_ID_MEMORY_PUT_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_BACKUP_RESTORE == 0) ? 0 : FUNC_ID_NVM_BACKUP_RESTORE) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_GET_ID == 0) ? 0 : FUNC_ID_NVM_GET_ID) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_READ_LONG_BYTE == 0) ? 0 : FUNC_ID_NVM_EXT_READ_LONG_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_WRITE_LONG_BYTE == 0) ? 0 : FUNC_ID_NVM_EXT_WRITE_LONG_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_READ_LONG_BUFFER == 0) ? 0 : FUNC_ID_NVM_EXT_READ_LONG_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_WRITE_LONG_BUFFER == 0) ? 0 : FUNC_ID_NVM_EXT_WRITE_LONG_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_CLOCK_SET == 0) ? 0 : FUNC_ID_CLOCK_SET) | \ - CAP_FID(OFFSET, (SUPPORT_CLOCK_GET == 0) ? 0 : FUNC_ID_CLOCK_GET) | \ - CAP_FID(OFFSET, (SUPPORT_CLOCK_CMP == 0) ? 0 : FUNC_ID_CLOCK_CMP) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_NVR_GET_VALUE == 0) ? 0 : FUNC_ID_NVR_GET_VALUE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_AUTO_PROGRAMMING == 0) ? 0 : FUNC_ID_AUTO_PROGRAMMING) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_SETSTOPMODE == 0) ? 0 : FUNC_ID_PWR_SETSTOPMODE) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_CLK_PD == 0) ? 0 : FUNC_ID_PWR_CLK_PD) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_CLK_PUP == 0) ? 0 : FUNC_ID_PWR_CLK_PUP) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_SELECT_CLK == 0) ? 0 : FUNC_ID_PWR_SELECT_CLK) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_CREATE == 0) ? 0 : FUNC_ID_RTC_TIMER_CREATE) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_READ == 0) ? 0 : FUNC_ID_RTC_TIMER_READ) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_DELETE == 0) ? 0 : FUNC_ID_RTC_TIMER_DELETE) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_CALL == 0) ? 0 : FUNC_ID_RTC_TIMER_CALL) | \ - CAP_FID(OFFSET, (SUPPORT_FUNC_ID_CLEAR_TX_TIMERS == 0) ? 0 : FUNC_ID_CLEAR_TX_TIMERS) | \ - CAP_FID(OFFSET, (SUPPORT_FUNC_ID_GET_TX_TIMERS == 0) ? 0 : FUNC_ID_GET_TX_TIMERS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_CLEAR_NETWORK_STATS == 0) ? 0 : FUNC_ID_ZW_CLEAR_NETWORK_STATS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_NETWORK_STATS == 0) ? 0 : FUNC_ID_ZW_GET_NETWORK_STATS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_BACKGROUND_RSSI == 0) ? 0 : FUNC_ID_ZW_GET_BACKGROUND_RSSI) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REMOVE_NODE_ID_FROM_NETWORK == 0) ? 0 : FUNC_ID_ZW_REMOVE_NODE_ID_FROM_NETWORK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_LEARN_NODE_STATE == 0) ? 0 : FUNC_ID_ZW_SET_LEARN_NODE_STATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_NODE_PROTOCOL_INFO == 0) ? 0 : FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_DEFAULT == 0) ? 0 : FUNC_ID_ZW_SET_DEFAULT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_NEW_CONTROLLER == 0) ? 0 : FUNC_ID_ZW_NEW_CONTROLLER) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REPLICATION_COMMAND_COMPLETE == 0) ? 0 : FUNC_ID_ZW_REPLICATION_COMMAND_COMPLETE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REPLICATION_SEND_DATA == 0) ? 0 : FUNC_ID_ZW_REPLICATION_SEND_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_DELETE_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_DELETE_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REQUEST_NODE_NEIGHBOR_UPDATE == 0) ? 0 : FUNC_ID_ZW_REQUEST_NODE_NEIGHBOR_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_NEIGHBOR_COUNT == 0) ? 0 : FUNC_ID_ZW_GET_NEIGHBOR_COUNT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ARE_NODES_NEIGHBOURS == 0) ? 0 : FUNC_ID_ZW_ARE_NODES_NEIGHBOURS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE == 0) ? 0 : FUNC_ID_ZW_APPLICATION_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ADD_NODE_TO_NETWORK == 0) ? 0 : FUNC_ID_ZW_ADD_NODE_TO_NETWORK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REMOVE_NODE_FROM_NETWORK == 0) ? 0 : FUNC_ID_ZW_REMOVE_NODE_FROM_NETWORK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_CREATE_NEW_PRIMARY == 0) ? 0 : FUNC_ID_ZW_CREATE_NEW_PRIMARY) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_CONTROLLER_CHANGE == 0) ? 0 : FUNC_ID_ZW_CONTROLLER_CHANGE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REQUEST_NODE_INFO == 0) ? 0 : FUNC_ID_ZW_REQUEST_NODE_INFO) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REMOVE_FAILED_NODE_ID == 0) ? 0 : FUNC_ID_ZW_REMOVE_FAILED_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_FAILED_NODE_ID == 0) ? 0 : FUNC_ID_ZW_IS_FAILED_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REPLACE_FAILED_NODE == 0) ? 0 : FUNC_ID_ZW_REPLACE_FAILED_NODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_ROUTING_MAX == 0) ? 0 : FUNC_ID_ZW_GET_ROUTING_MAX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_ROUTING_MAX == 0) ? 0 : FUNC_ID_ZW_SET_ROUTING_MAX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_PRIMARY_CTRL == 0) ? 0 : FUNC_ID_ZW_IS_PRIMARY_CTRL) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_AES_ECB == 0) ? 0 : FUNC_ID_ZW_AES_ECB) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_APPLICATION_UPDATE == 0) ? 0 : FUNC_ID_ZW_APPLICATION_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_LEARN_MODE == 0) ? 0 : FUNC_ID_ZW_SET_LEARN_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_EXPLORE_REQUEST_INCLUSION == 0) ? 0 : FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_EXPLORE_REQUEST_EXCLUSION == 0) ? 0 : FUNC_ID_ZW_EXPLORE_REQUEST_EXCLUSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_SUC_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_SUC_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ENABLE_SUC == 0) ? 0 : FUNC_ID_ZW_ENABLE_SUC) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REQUEST_NETWORK_UPDATE == 0) ? 0 : FUNC_ID_ZW_REQUEST_NETWORK_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_SUC_NODE_ID == 0) ? 0 : FUNC_ID_ZW_SET_SUC_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_DELETE_SUC_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_DELETE_SUC_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_SUC_NODE_ID == 0) ? 0 : FUNC_ID_ZW_GET_SUC_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_SUC_ID == 0) ? 0 : FUNC_ID_ZW_SEND_SUC_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_PRIORITY_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_PRIORITY_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_START == 0) ? 0 : FUNC_ID_TIMER_START) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_RESTART == 0) ? 0 : FUNC_ID_TIMER_RESTART) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_CANCEL == 0) ? 0 : FUNC_ID_TIMER_CANCEL) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_CALL == 0) ? 0 : FUNC_ID_TIMER_CALL) | \ - CAP_FID(OFFSET, (SUPPORT_GET_ROUTING_TABLE_LINE == 0) ? 0 : FUNC_ID_GET_ROUTING_TABLE_LINE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_ROUTING_INFO == 0) ? 0 : FUNC_ID_ZW_SET_ROUTING_INFO) | \ - CAP_FID(OFFSET, (SUPPORT_GET_TX_COUNTER == 0) ? 0 : FUNC_ID_GET_TX_COUNTER) | \ - CAP_FID(OFFSET, (SUPPORT_RESET_TX_COUNTER == 0) ? 0 : FUNC_ID_RESET_TX_COUNTER) | \ - CAP_FID(OFFSET, (SUPPORT_STORE_NODEINFO == 0) ? 0 : FUNC_ID_STORE_NODEINFO) | \ - CAP_FID(OFFSET, (SUPPORT_STORE_HOMEID == 0) ? 0 : FUNC_ID_STORE_HOMEID) | \ - CAP_FID(OFFSET, (SUPPORT_LOCK_ROUTE_RESPONSE == 0) ? 0 : FUNC_ID_LOCK_ROUTE_RESPONSE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_PRIORITY_ROUTE == 0) ? 0 : FUNC_ID_ZW_GET_PRIORITY_ROUTE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_PRIORITY_ROUTE == 0) ? 0 : FUNC_ID_ZW_SET_PRIORITY_ROUTE)|\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION == 0) ? 0 : FUNC_ID_SERIAL_API_APPL_SLAVE_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER == 0) ? 0 : FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION == 0) ? 0 : FUNC_ID_ZW_SEND_SLAVE_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_SLAVE_DATA == 0) ? 0 : FUNC_ID_ZW_SEND_SLAVE_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_SLAVE_LEARN_MODE == 0) ? 0 : FUNC_ID_ZW_SET_SLAVE_LEARN_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_VIRTUAL_NODES == 0) ? 0 : FUNC_ID_ZW_GET_VIRTUAL_NODES) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_VIRTUAL_NODE == 0) ? 0 : FUNC_ID_ZW_IS_VIRTUAL_NODE) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_TEST == 0) ? 0 : FUNC_ID_SERIAL_API_TEST) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_EXT == 0) ? 0 : FUNC_ID_SERIAL_API_EXT) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET == 0) ? 0 : FUNC_ID_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_CMD) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_INIT) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_LIST) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_RUN) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_END) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD == 0) ? 0 : FUNC_ID_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD)| \ - CAP_FID(OFFSET, (SUPPORT_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS == 0) ? 0 : FUNC_ID_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS) \ - ) -#else -#define CAP_BM(OFFSET) (CAP_FID(OFFSET, (SUPPORT_SERIAL_API_POWER_MANAGEMENT == 0) ? 0 : FUNC_ID_SERIAL_API_POWER_MANAGEMENT) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_READY == 0) ? 0 : FUNC_ID_SERIAL_API_READY) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_INIT_DATA == 0) ? 0 : FUNC_ID_SERIAL_API_GET_INIT_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_APPL_NODE_INFORMATION == 0) ? 0 : FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE == 0) ? 0 : FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_COMMAND_HANDLER == 0) ? 0 : FUNC_ID_APPLICATION_COMMAND_HANDLER) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_CONTROLLER_CAPABILITIES == 0) ? 0 : FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_SET_TIMEOUTS == 0) ? 0 : FUNC_ID_SERIAL_API_SET_TIMEOUTS) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_CAPABILITIES == 0) ? 0 : FUNC_ID_SERIAL_API_GET_CAPABILITIES) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_SOFT_RESET == 0) ? 0 : FUNC_ID_SERIAL_API_SOFT_RESET) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_STARTUP_NOTIFICATION == 0) ? 0 : FUNC_ID_SERIAL_API_STARTED) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_SETUP == 0) ? 0 : FUNC_ID_SERIAL_API_SETUP) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES == 0) ? 0 : FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_PROTOCOL_VERSION == 0) ? 0 : FUNC_ID_ZW_GET_PROTOCOL_VERSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_RF_RECEIVE_MODE == 0) ? 0 : FUNC_ID_ZW_SET_RF_RECEIVE_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_SLEEP_MODE == 0) ? 0 : FUNC_ID_ZW_SET_SLEEP_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_NODE_INFORMATION == 0) ? 0 : FUNC_ID_ZW_SEND_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA == 0) ? 0 : FUNC_ID_ZW_SEND_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_BRIDGE == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_BRIDGE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_EX == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_EX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_META_BRIDGE == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_META_BRIDGE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_MULTI == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_MULTI) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_MULTI_BRIDGE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_MULTI_EX == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_MULTI_EX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SECURITY_SETUP == 0) ? 0 : FUNC_ID_ZW_SECURITY_SETUP) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_SECURITY_EVENT == 0) ? 0 : FUNC_ID_APPLICATION_SECURITY_EVENT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_VERSION == 0) ? 0 : FUNC_ID_ZW_GET_VERSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_ABORT == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_ABORT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_RF_POWER_LEVEL_SET == 0) ? 0 : FUNC_ID_ZW_RF_POWER_LEVEL_SET) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_RF_POWER_LEVEL_GET == 0) ? 0 : FUNC_ID_ZW_RF_POWER_LEVEL_GET) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_TYPE_LIBRARY == 0) ? 0 : FUNC_ID_ZW_TYPE_LIBRARY) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_PROTOCOL_STATUS == 0) ? 0 : FUNC_ID_ZW_GET_PROTOCOL_STATUS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_ENABLE == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_ENABLE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_DISABLE == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_DISABLE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_KICK == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_KICK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_START == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_START)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_WATCHDOG_STOP == 0) ? 0 : FUNC_ID_ZW_WATCHDOG_STOP)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_WUT_TIMEOUT == 0) ? 0 : FUNC_ID_ZW_SET_WUT_TIMEOUT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_WUT_KICKED == 0) ? 0 : FUNC_ID_ZW_IS_WUT_KICKED) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_EXT_INT_LEVEL == 0) ? 0 : FUNC_ID_ZW_SET_EXT_INT_LEVEL) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_DATA_META == 0) ? 0 : FUNC_ID_ZW_SEND_DATA_META) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_TEST_FRAME == 0) ? 0 : FUNC_ID_ZW_SEND_TEST_FRAME) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_RANDOM == 0) ? 0 : FUNC_ID_ZW_GET_RANDOM) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_GET_ID == 0) ? 0 : FUNC_ID_MEMORY_GET_ID) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_GET_BYTE == 0) ? 0 : FUNC_ID_MEMORY_GET_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_PUT_BYTE == 0) ? 0 : FUNC_ID_MEMORY_PUT_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_GET_BUFFER == 0) ? 0 : FUNC_ID_MEMORY_GET_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_MEMORY_PUT_BUFFER == 0) ? 0 : FUNC_ID_MEMORY_PUT_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_BACKUP_RESTORE == 0) ? 0 : FUNC_ID_NVM_BACKUP_RESTORE) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_GET_ID == 0) ? 0 : FUNC_ID_NVM_GET_ID) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_READ_LONG_BYTE == 0) ? 0 : FUNC_ID_NVM_EXT_READ_LONG_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_WRITE_LONG_BYTE == 0) ? 0 : FUNC_ID_NVM_EXT_WRITE_LONG_BYTE) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_READ_LONG_BUFFER == 0) ? 0 : FUNC_ID_NVM_EXT_READ_LONG_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_NVM_EXT_WRITE_LONG_BUFFER == 0) ? 0 : FUNC_ID_NVM_EXT_WRITE_LONG_BUFFER) | \ - CAP_FID(OFFSET, (SUPPORT_CLOCK_SET == 0) ? 0 : FUNC_ID_CLOCK_SET) | \ - CAP_FID(OFFSET, (SUPPORT_CLOCK_GET == 0) ? 0 : FUNC_ID_CLOCK_GET) | \ - CAP_FID(OFFSET, (SUPPORT_CLOCK_CMP == 0) ? 0 : FUNC_ID_CLOCK_CMP) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_NVR_GET_VALUE == 0) ? 0 : FUNC_ID_NVR_GET_VALUE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_AUTO_PROGRAMMING == 0) ? 0 : FUNC_ID_AUTO_PROGRAMMING) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_SETSTOPMODE == 0) ? 0 : FUNC_ID_PWR_SETSTOPMODE) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_CLK_PD == 0) ? 0 : FUNC_ID_PWR_CLK_PD) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_CLK_PUP == 0) ? 0 : FUNC_ID_PWR_CLK_PUP) | \ - CAP_FID(OFFSET, (SUPPORT_PWR_SELECT_CLK == 0) ? 0 : FUNC_ID_PWR_SELECT_CLK) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_CREATE == 0) ? 0 : FUNC_ID_RTC_TIMER_CREATE) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_READ == 0) ? 0 : FUNC_ID_RTC_TIMER_READ) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_DELETE == 0) ? 0 : FUNC_ID_RTC_TIMER_DELETE) | \ - CAP_FID(OFFSET, (SUPPORT_RTC_TIMER_CALL == 0) ? 0 : FUNC_ID_RTC_TIMER_CALL) | \ - CAP_FID(OFFSET, (SUPPORT_FUNC_ID_CLEAR_TX_TIMERS == 0) ? 0 : FUNC_ID_CLEAR_TX_TIMERS) | \ - CAP_FID(OFFSET, (SUPPORT_FUNC_ID_GET_TX_TIMERS == 0) ? 0 : FUNC_ID_GET_TX_TIMERS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_CLEAR_NETWORK_STATS == 0) ? 0 : FUNC_ID_ZW_CLEAR_NETWORK_STATS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_NETWORK_STATS == 0) ? 0 : FUNC_ID_ZW_GET_NETWORK_STATS) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_BACKGROUND_RSSI == 0) ? 0 : FUNC_ID_ZW_GET_BACKGROUND_RSSI) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REMOVE_NODE_ID_FROM_NETWORK == 0) ? 0 : FUNC_ID_ZW_REMOVE_NODE_ID_FROM_NETWORK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_LEARN_NODE_STATE == 0) ? 0 : FUNC_ID_ZW_SET_LEARN_NODE_STATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_NODE_PROTOCOL_INFO == 0) ? 0 : FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_DEFAULT == 0) ? 0 : FUNC_ID_ZW_SET_DEFAULT) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_NEW_CONTROLLER == 0) ? 0 : FUNC_ID_ZW_NEW_CONTROLLER) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REPLICATION_COMMAND_COMPLETE == 0) ? 0 : FUNC_ID_ZW_REPLICATION_COMMAND_COMPLETE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REPLICATION_SEND_DATA == 0) ? 0 : FUNC_ID_ZW_REPLICATION_SEND_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_DELETE_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_DELETE_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REQUEST_NODE_NEIGHBOR_UPDATE == 0) ? 0 : FUNC_ID_ZW_REQUEST_NODE_NEIGHBOR_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE == 0) ? 0 : FUNC_ID_ZW_APPLICATION_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ADD_NODE_TO_NETWORK == 0) ? 0 : FUNC_ID_ZW_ADD_NODE_TO_NETWORK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REMOVE_NODE_FROM_NETWORK == 0) ? 0 : FUNC_ID_ZW_REMOVE_NODE_FROM_NETWORK) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_CREATE_NEW_PRIMARY == 0) ? 0 : FUNC_ID_ZW_CREATE_NEW_PRIMARY) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_CONTROLLER_CHANGE == 0) ? 0 : FUNC_ID_ZW_CONTROLLER_CHANGE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REQUEST_NODE_INFO == 0) ? 0 : FUNC_ID_ZW_REQUEST_NODE_INFO) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REMOVE_FAILED_NODE_ID == 0) ? 0 : FUNC_ID_ZW_REMOVE_FAILED_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_FAILED_NODE_ID == 0) ? 0 : FUNC_ID_ZW_IS_FAILED_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REPLACE_FAILED_NODE == 0) ? 0 : FUNC_ID_ZW_REPLACE_FAILED_NODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_ROUTING_MAX == 0) ? 0 : FUNC_ID_ZW_GET_ROUTING_MAX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_ROUTING_MAX == 0) ? 0 : FUNC_ID_ZW_SET_ROUTING_MAX) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_PRIMARY_CTRL == 0) ? 0 : FUNC_ID_ZW_IS_PRIMARY_CTRL) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_AES_ECB == 0) ? 0 : FUNC_ID_ZW_AES_ECB) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_APPLICATION_UPDATE == 0) ? 0 : FUNC_ID_ZW_APPLICATION_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_LEARN_MODE == 0) ? 0 : FUNC_ID_ZW_SET_LEARN_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_EXPLORE_REQUEST_INCLUSION == 0) ? 0 : FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_EXPLORE_REQUEST_EXCLUSION == 0) ? 0 : FUNC_ID_ZW_EXPLORE_REQUEST_EXCLUSION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_SUC_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_SUC_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ENABLE_SUC == 0) ? 0 : FUNC_ID_ZW_ENABLE_SUC) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_REQUEST_NETWORK_UPDATE == 0) ? 0 : FUNC_ID_ZW_REQUEST_NETWORK_UPDATE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_SUC_NODE_ID == 0) ? 0 : FUNC_ID_ZW_SET_SUC_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_DELETE_SUC_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_DELETE_SUC_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_SUC_NODE_ID == 0) ? 0 : FUNC_ID_ZW_GET_SUC_NODE_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_SUC_ID == 0) ? 0 : FUNC_ID_ZW_SEND_SUC_ID) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_ASSIGN_PRIORITY_RETURN_ROUTE == 0) ? 0 : FUNC_ID_ZW_ASSIGN_PRIORITY_RETURN_ROUTE) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_START == 0) ? 0 : FUNC_ID_TIMER_START) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_RESTART == 0) ? 0 : FUNC_ID_TIMER_RESTART) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_CANCEL == 0) ? 0 : FUNC_ID_TIMER_CANCEL) | \ - CAP_FID(OFFSET, (SUPPORT_TIMER_CALL == 0) ? 0 : FUNC_ID_TIMER_CALL) | \ - CAP_FID(OFFSET, (SUPPORT_GET_ROUTING_TABLE_LINE == 0) ? 0 : FUNC_ID_GET_ROUTING_TABLE_LINE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_ROUTING_INFO == 0) ? 0 : FUNC_ID_ZW_SET_ROUTING_INFO) | \ - CAP_FID(OFFSET, (SUPPORT_GET_TX_COUNTER == 0) ? 0 : FUNC_ID_GET_TX_COUNTER) | \ - CAP_FID(OFFSET, (SUPPORT_RESET_TX_COUNTER == 0) ? 0 : FUNC_ID_RESET_TX_COUNTER) | \ - CAP_FID(OFFSET, (SUPPORT_STORE_NODEINFO == 0) ? 0 : FUNC_ID_STORE_NODEINFO) | \ - CAP_FID(OFFSET, (SUPPORT_STORE_HOMEID == 0) ? 0 : FUNC_ID_STORE_HOMEID) | \ - CAP_FID(OFFSET, (SUPPORT_LOCK_ROUTE_RESPONSE == 0) ? 0 : FUNC_ID_LOCK_ROUTE_RESPONSE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_PRIORITY_ROUTE == 0) ? 0 : FUNC_ID_ZW_GET_PRIORITY_ROUTE)|\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_PRIORITY_ROUTE == 0) ? 0 : FUNC_ID_ZW_SET_PRIORITY_ROUTE)|\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION == 0) ? 0 : FUNC_ID_SERIAL_API_APPL_SLAVE_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER == 0) ? 0 : FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION == 0) ? 0 : FUNC_ID_ZW_SEND_SLAVE_NODE_INFORMATION) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SEND_SLAVE_DATA == 0) ? 0 : FUNC_ID_ZW_SEND_SLAVE_DATA) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_SLAVE_LEARN_MODE == 0) ? 0 : FUNC_ID_ZW_SET_SLAVE_LEARN_MODE) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_GET_VIRTUAL_NODES == 0) ? 0 : FUNC_ID_ZW_GET_VIRTUAL_NODES) | \ - CAP_FID(OFFSET, (SUPPORT_ZW_IS_VIRTUAL_NODE == 0) ? 0 : FUNC_ID_ZW_IS_VIRTUAL_NODE) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_EXT == 0) ? 0 : FUNC_ID_SERIAL_API_EXT) | \ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET == 0) ? 0 : FUNC_ID_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_PROMISCUOUS_MODE == 0) ? 0 : FUNC_ID_ZW_SET_PROMISCUOUS_MODE) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_CMD) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_INIT) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_LIST) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_RUN) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_NUNIT == 0) ? 0 : FUNC_ID_ZW_NUNIT_END) |\ - CAP_FID(OFFSET, (SUPPORT_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD == 0) ? 0 : FUNC_ID_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD)| \ - CAP_FID(OFFSET, (SUPPORT_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS == 0) ? 0 : FUNC_ID_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS)| \ - CAP_FID(OFFSET, (SUPPORT_ZW_INITIATE_SHUTDOWN == 0) ? 0 : FUNC_ID_ZW_INITIATE_SHUTDOWN) |\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_API_GET_LR_NODES == 0) ? 0 : FUNC_ID_SERIAL_API_GET_LR_NODES) |\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_GET_LR_CHANNEL == 0) ? 0 : FUNC_ID_GET_LR_CHANNEL) |\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_SET_LR_CHANNEL == 0) ? 0 : FUNC_ID_SET_LR_CHANNEL) |\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_SET_LR_VIRTUAL_IDS == 0) ? 0 : FUNC_ID_ZW_SET_LR_VIRTUAL_IDS) |\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_ENABLE_RADIO_PTI == 0) ? 0 : FUNC_ID_ENABLE_RADIO_PTI) |\ - CAP_FID(OFFSET, (SUPPORT_SERIAL_ENABLE_RADIO_PTI == 0) ? 0 : FUNC_ID_GET_RADIO_PTI) \ - ) -#endif /* ZW_CONTROLLER_SINGLE */ - - -#if SUPPORT_SERIAL_API_READY -enum -{ - /* SERIAL_LINK_IDLE = Ready for incomming Serial communication, but */ - /* do not transmit anything via the serial link even if application */ - /* frames is received on the RF, which normally should be transmitted */ - /* to the HOST. */ - SERIAL_LINK_DETACHED = 0, - /* SERIAL_LINK_CONNECTED = There exists a HOST so transmit on serial */ - /* link if needed. */ - SERIAL_LINK_CONNECTED = 1 -}; - -extern uint8_t serialLinkState; -#endif /* SUPPORT_SERIAL_API_READY */ - -extern void DoRespond_workbuf( - uint8_t cnt); - -extern void set_state_and_notify( - uint8_t st -); - -extern void set_state( - uint8_t st -); - -extern bool Request( - uint8_t cmd, /*IN Command */ - uint8_t *pData, /*IN pointer to data */ - uint8_t len /*IN Length of data */ -); - -extern bool RequestUnsolicited( - uint8_t cmd, /*IN Command */ - uint8_t *pData, /*IN pointer to data */ - uint8_t len /*IN Length of data */ -); - -extern void Respond( - uint8_t cmd, /*IN Command */ - uint8_t const * pData, /*IN pointer to data */ - uint8_t len /*IN Length of data */ -); -extern void DoRespond(uint8_t retVal); - -extern void PopCallBackQueue(void); - -extern void PopCommandQueue(void); - -extern uint8_t GetCallbackCnt(void); - -extern void ZW_GetMfgTokenDataCountryFreq(void *data); - -#ifdef ZW_CONTROLLER_SINGLE -#if SUPPORT_SERIAL_API_TEST - -extern void -SendTestReport( - uint8_t txStatus); - -extern void -TestStartRound(void); - -extern void -SendTestRoundReport( - uint8_t txStatus); - -extern void -ZCB_TestDelayNextSendTimeout(void); - -extern void -ZCB_TestDelayTimeout(void); - -extern bool -TestFindNextNode(void); - -extern void -ZCB_TestSendComplete( - uint8_t bStatus, - TX_STATUS_TYPE *txStatusReport); - -extern void -TestSend(void); - -#endif /* SUPPORT_SERIAL_API_TEST */ -#endif /* ZW_CONTROLLER_SINGLE */ - -#if SUPPORT_SERIAL_API_POWER_MANAGEMENT -extern void -ZCB_PowerManagementWakeUpOnExternalActive(void); - -extern void -ZCB_PowerManagementWakeUpOnTimerHandler(void); - -extern void -ZCB_powerManagementPoweredUpPinActive(void); - -extern void -PowerManagementSetPowerDown(void); - -extern void -PowerManagementSetPowerUp(void); - -extern void -PowerManagementCheck(void); - -extern void -PurgeCallbackQueue(void); - -extern void -PurgeCommandQueue(void); -#endif /* SUPPORT_SERIAL_API_POWER_MANAGEMENT */ - -// Prioritized events that can wakeup protocol thread. -typedef enum EApplicationEvent -{ - EAPPLICATIONEVENT_ZWRX = 0, - EAPPLICATIONEVENT_ZWCOMMANDSTATUS, - EAPPLICATIONEVENT_STATECHANGE, - EAPPLICATIONEVENT_SERIALDATARX, - EAPPLICATIONEVENT_SERIALTIMEOUT, - EAPPLICATIONEVENT_TIMER -} EApplicationEvent; - -/* FUNC_ID_SERIAL_API_STARTED Capabilities bit field definitions */ -typedef enum -{ - SERIAL_API_STARTED_CAPABILITIES_L0NG_RANGE = 1<<0 // Controller is Z-Wave Long Range capable - /* Can be extended with future capability bits here */ -} eSerialAPIStartedCapabilities; - -extern void ApplicationNodeUpdate(uint8_t bStatus, uint16_t nodeID, uint8_t *pCmd, uint8_t bLen); - -/* Should be enough */ -#define BUF_SIZE_RX 168 -#define BUF_SIZE_TX 168 - -extern uint8_t compl_workbuf[BUF_SIZE_TX]; - -#endif /* _SERIALAPPL_H_ */ diff --git a/src/zwave_ncp_serial_api_controller/config/FreeRTOSConfig.h b/src/zwave_ncp_serial_api_controller/config/FreeRTOSConfig.h deleted file mode 100644 index 66a1bb3a..00000000 --- a/src/zwave_ncp_serial_api_controller/config/FreeRTOSConfig.h +++ /dev/null @@ -1,271 +0,0 @@ -/* -------------------------------------------------------------------------- - * Copyright (c) 2013-2019 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * -------------------------------------------------------------------------- - * - * $Revision: V10.2.0 - * - * Project: CMSIS-FreeRTOS - * Title: FreeRTOS configuration definitions - * - * --------------------------------------------------------------------------*/ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- -* Application specific definitions. -* -* These definitions should be adjusted for your particular hardware and -* application requirements. -* -* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE -* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. -* -* See http://www.freertos.org/a00110.html -*----------------------------------------------------------*/ - -#if !defined(__IAR_SYSTEMS_ASM__) -#if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__)) -#include - -#include "RTE_Components.h" -#include CMSIS_device_header -#endif - -#include "em_assert.h" -#include "em_device.h" - -#if defined(SL_COMPONENT_CATALOG_PRESENT) -#include "sl_component_catalog.h" -#endif -#endif - -#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) -#include "SEGGER_SYSVIEW_FreeRTOS.h" -#endif - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Minimal stack size [words] <0-65535> -// Stack for idle task and default task stack in words. -// Default: 160 -#define configMINIMAL_STACK_SIZE 160 - -// Total heap size [bytes] <0-0xFFFFFFFF> -// Heap memory size in bytes. -// Default: 8192 -#define configTOTAL_HEAP_SIZE 8192 - -// Kernel tick frequency [Hz] <0-0xFFFFFFFF> -// Kernel tick rate in Hz. -// Default: 1000 -#define configTICK_RATE_HZ 1000 - -// Timer task stack depth [words] <0-65535> -// Stack for timer task in words. -// Default: 160 -#define configTIMER_TASK_STACK_DEPTH 160 - -// Timer task priority <0-56> -// Timer task priority. -// Default: 40 (High) -#define configTIMER_TASK_PRIORITY 55 - -// Timer queue length <0-1024> -// Timer command queue length. -// Default: 10 -#define configTIMER_QUEUE_LENGTH 8 - -// Preemption interrupt priority -// Maximum priority of interrupts that are safe to call FreeRTOS API. -// Default: 96 -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 32 - -// Use time slicing -// Enable setting to use timeslicing. -// Default: 1 -#define configUSE_TIME_SLICING 1 - -// Idle should yield -// Control Yield behaviour of the idle task. -// Default: 1 -#define configIDLE_SHOULD_YIELD 1 - -// Check for stack overflow -// <0=>Disable <1=>Method one <2=>Method two -// Enable or disable stack overflow checking. -// Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. -// Default: 2 -#define configCHECK_FOR_STACK_OVERFLOW 2 - -// Use idle hook -// Enable callback function call on each idle task iteration. -// Callback function vApplicationIdleHook implementation is required when idle hook is enabled. -// Default: 0 -#define configUSE_IDLE_HOOK 1 - -// Use tick hook -// Enable callback function call during each tick interrupt. -// Callback function vApplicationTickHook implementation is required when tick hook is enabled. -// Default: 0 -#define configUSE_TICK_HOOK 0 - -// Use deamon task startup hook -// Enable callback function call when timer service starts. -// Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. -// Default: 0 -#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 - -// Use malloc failed hook -// Enable callback function call when out of dynamic memory. -// Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. -// Default: 0 -#define configUSE_MALLOC_FAILED_HOOK 0 - -// Queue registry size -// Define maximum number of queue objects registered for debug purposes. -// The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names. -// Default: 10 -#define configQUEUE_REGISTRY_SIZE 10 - -// Port Specific Features -// Enable and configure port specific features. -// Check FreeRTOS documentation for definitions that apply for the used port. - -// Use Floating Point Unit -// Using Floating Point Unit (FPU) affects context handling. -// Enable FPU when application uses floating point operations. -// Default: 1 -#define configENABLE_FPU 1 - -// Use Memory Protection Unit -// Using Memory Protection Unit (MPU) requires detailed memory map definition. -// This setting is only releavant for MPU enabled ports. -// Default: 0 -#define configENABLE_MPU 0 - -// Minimal secure stack size [words] <0-65535> -// Stack for idle task Secure side context in words. -// This setting is only relevant when TrustZone extension is enabled. -// Default: 128 -#define configMINIMAL_SECURE_STACK_SIZE 128 -// - -// Thread Local Storage Settings -// Thread local storage pointers -// Thread local storage (or TLS) allows the application writer to store -// values inside a task's control block, making the value specific to -// (local to) the task itself. -// Default: 0 -#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 -// - -// Use Threadsafe Errno -// Enable Threadsafe Errno support. -// Default: 0 -#define configUSE_POSIX_ERRNO 0 - -//------------- <<< end of configuration section >>> --------------------------- - -/* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */ -#define configCPU_CLOCK_HZ (SystemCoreClock) -#define configSUPPORT_STATIC_ALLOCATION 1 -#define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configUSE_PREEMPTION 1 -#define configUSE_TIMERS 1 -#define configUSE_MUTEXES 1 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_TASK_NOTIFICATIONS 1 -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 -#define configMAX_PRIORITIES 56 -#define configKERNEL_INTERRUPT_PRIORITY 224 - -/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ -#define INCLUDE_xEventGroupSetBitsFromISR 1 -#define INCLUDE_xSemaphoreGetMutexHolder 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_xTaskGetCurrentTaskHandle 1 -#define INCLUDE_xTaskGetSchedulerState 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_eTaskGetState 1 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_xTimerPendFunctionCall 1 - -/* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ -#define xPortPendSVHandler PendSV_Handler -#define vPortSVCHandler SVC_Handler - -/* Ensure Cortex-M port compatibility. */ -#define SysTick_Handler xPortSysTickHandler - -/* Implement FreeRTOS configASSERT as emlib assert. */ -#define configASSERT(x) EFM_ASSERT(x) - -/* Energy saving modes. */ -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#define configUSE_TICKLESS_IDLE 1 -#else -#define configUSE_TICKLESS_IDLE 0 -#endif - -/* Definition used by Keil to replace default system clock source. */ -#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 - -/* Maximum size of task name. */ -#define configMAX_TASK_NAME_LEN 10 - -/* Use queue sets? */ -#define configUSE_QUEUE_SETS 0 - -/* Generate run-time statistics? */ -#define configGENERATE_RUN_TIME_STATS 0 - -/* Co-routine related definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES 1 - -/* Optional resume from ISR functionality. */ -#define INCLUDE_xResumeFromISR 1 - -/* FreeRTOS Secure Side Only and TrustZone Security Extension */ -#define configRUN_FREERTOS_SECURE_ONLY 0 -#define configENABLE_TRUSTZONE 1 - -/* Thread local storage pointers used by the SDK */ -#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS - #define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 0 -#endif - -/* PRINT_STRING implementation. iostream_retarget_stdio or third party - printf should be added if this is used */ -#define configPRINT_STRING(X) printf(X) - -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS \ - + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) - -//#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) -//#include "SEGGER_SYSVIEW_FreeRTOS.h" -//#endif -#endif /* FREERTOS_CONFIG_H */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/app_properties_config.h b/src/zwave_ncp_serial_api_controller/config/app_properties_config.h deleted file mode 100644 index 6951a569..00000000 --- a/src/zwave_ncp_serial_api_controller/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 \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/btl_interface_cfg.h b/src/zwave_ncp_serial_api_controller/config/btl_interface_cfg.h deleted file mode 100644 index 13e09116..00000000 --- a/src/zwave_ncp_serial_api_controller/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 \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/emlib_core_debug_config.h b/src/zwave_ncp_serial_api_controller/config/emlib_core_debug_config.h deleted file mode 100644 index e4a01682..00000000 --- a/src/zwave_ncp_serial_api_controller/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/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13.h b/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13.h deleted file mode 100644 index f83a5e81..00000000 --- a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Provides support for BRD8029A (Buttons and LEDs EXP Board) - * - * @copyright 2018 Silicon Laboratories Inc. - */ - -#ifndef EXTENSION_BOARD_8029A_EFR32XG13_H -#define EXTENSION_BOARD_8029A_EFR32XG13_H - -#include "extension_board_8029a_efr32xg13_button.h" -#include "extension_board_8029a_efr32xg13_led.h" -#include "extension_board_8029a_efr32xg13_slider.h" - -/*************************************************************************/ -/* Map physical board IO devices to application LEDs and buttons */ -/*************************************************************************/ - -/* Map application LEDs to board LEDs */ -#define APP_LED_A BOARD_LED1 -#define APP_LED_INDICATOR BOARD_LED2 // Positioned opposite APP_BUTTON_LEARN_RESET -#define APP_LED_B BOARD_LED4 -#define APP_LED_C BOARD_LED3 - -#define APP_RGB_R BOARD_RGB1_R -#define APP_RGB_G BOARD_RGB1_G -#define APP_RGB_B BOARD_RGB1_B - -/* Mapping application buttons to board buttons */ -#if defined(RADIO_BOARD_EFR32ZG13P32) || defined(RADIO_BOARD_EFR32ZG13L) || defined(RADIO_BOARD_EFR32ZG13S) -// The EFR32ZG13P32 device has reduced number of GPIO pins and therefore -// supports only two of our buttons -#define APP_BUTTON_A BOARD_BUTTON_PB4 -#define APP_BUTTON_LEARN_RESET BOARD_BUTTON_PB3 // Supports EM4 wakeup -#else -#define APP_BUTTON_A BOARD_BUTTON_PB1 -#define APP_BUTTON_LEARN_RESET BOARD_BUTTON_PB2 // Supports EM4 wakeup -#define APP_BUTTON_B BOARD_BUTTON_PB3 // Supports EM4 wakeup -#define APP_BUTTON_C BOARD_BUTTON_PB4 -#define APP_SLIDER_A BOARD_BUTTON_SLIDER1 -#endif - -/* The next two are identical since on the BRD8029A only PB2 and PB3 - * can trigger a wakeup from EM4. PB2 is already used for learn/reset - */ -#define APP_WAKEUP_BTN_SLDR BOARD_BUTTON_PB3 // Use this one when wakeup capability is required and button is preferred to slider -#define APP_WAKEUP_SLDR_BTN BOARD_BUTTON_PB3 // Use this one when wakeup capability is required and slider is preferred to button - -#endif /* EXTENSION_BOARD_8029A_EFR32XG13_H */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_button.h b/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_button.h deleted file mode 100644 index 8e4dcc1b..00000000 --- a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_button.h +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Provides support for BRD8029A (Buttons on EXP Board) - * - * @copyright 2022 Silicon Laboratories Inc. - */ - -#ifndef EXTENSION_BOARD_8029A_EFR32XG13_BUTTON_H -#define EXTENSION_BOARD_8029A_EFR32XG13_BUTTON_H - -/*************************************************************************/ -/* Configure push buttons */ -/*************************************************************************/ - -/* NB: BTN0 on BRD8029A is connected in parallel with PB0 on BRD4001A - * (Wireless Starter Kit mainboard). Not a problem, the two buttons - * simply provide the same functionality. - */ - -// <<< Use Configuration Wizard in Context Menu >>> -// Button Configuration -#define PB1_LABEL "BTN0" - -// Button1 ON value -// <1=> Active high -// <0=> Active low -// 0 -#define PB1_ON_VALUE 0 - -// Button1 interrupt pin number -// 6 -#define PB1_INT_NO 6 - -// Button1 wake up from EM4 -// 0 -#define PB1_CAN_WAKEUP_EM4 0 - -#define PB2_LABEL "BTN1" - -// Button2 ON value -// <1=> Active high -// <0=> Active low -// 0 -#define PB2_ON_VALUE 0 - -// Button2 interrupt pin number -// 7 -#define PB2_INT_NO 7 - -// Button2 wake up from EM4 -// 1 -#define PB2_CAN_WAKEUP_EM4 1 - -#define PB3_LABEL "BTN2" - -// Button3 ON value -// <1=> Active high -// <0=> Active low -// 0 -#define PB3_ON_VALUE 0 - -// Button3 interrupt pin number -// 10 -#define PB3_INT_NO 10 - -// Button3 wake up from EM4 -// 1 -#define PB3_CAN_WAKEUP_EM4 1 - -#define PB4_LABEL "BTN3" - -// Button4 ON value -// <1=> Active high -// <0=> Active low -// 0 -#define PB4_ON_VALUE 0 - -// Button4 interrupt pin number -// 11 -#define PB4_INT_NO 11 - -// Button4 wake up from EM4 -// 0 -#define PB4_CAN_WAKEUP_EM4 0 - -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// PB1_GPIO -// $[GPIO_PB1_GPIO] -#ifndef PB1_GPIO_PORT -#define PB1_GPIO_PORT gpioPortF -#endif -#ifndef PB1_GPIO_PIN -#define PB1_GPIO_PIN 6 -#endif -// [GPIO_PB1_GPIO]$ - -// PB2_GPIO -// $[GPIO_PB2_GPIO] -#ifndef PB2_GPIO_PORT -#define PB2_GPIO_PORT gpioPortF -#endif -#ifndef PB2_GPIO_PIN -#define PB2_GPIO_PIN 7 -#endif -// [GPIO_PB2_GPIO]$ - -// PB3_GPIO -// $[GPIO_PB3_GPIO] -#ifndef PB3_GPIO_PORT -#define PB3_GPIO_PORT gpioPortC -#endif -#ifndef PB3_GPIO_PIN -#define PB3_GPIO_PIN 10 -#endif -// [GPIO_PB3_GPIO]$ - -// PB4_GPIO -// $[GPIO_PB4_GPIO] -#ifndef PB4_GPIO_PORT -#define PB4_GPIO_PORT gpioPortC -#endif -#ifndef PB4_GPIO_PIN -#define PB4_GPIO_PIN 11 -#endif -// [GPIO_PB4_GPIO]$ - -// <<< sl:end pin_tool >>> - -#endif /* EXTENSION_BOARD_8029A_EFR32XG13_BUTTON_H */ diff --git a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_led.h b/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_led.h deleted file mode 100644 index e6717eac..00000000 --- a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_led.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Provides support for BRD8029A (LEDs on EXP Board) - * - * @copyright 2022 Silicon Laboratories Inc. - */ - -#ifndef EXTENSION_BOARD_8029A_EFR32XG13_LED_H -#define EXTENSION_BOARD_8029A_EFR32XG13_LED_H - -/*************************************************************************/ -/* Configure LEDs */ -/*************************************************************************/ - -/* NB: Mounted in parallel with "LED0" on the mainboard. - * - * EFR32 peripheral: (none) - */ - -// <<< Use Configuration Wizard in Context Menu >>> -// LED Configuration -// LED1 ON value -// <0=> Active low -// <1=> Active high -// 1 -#define LED1_ON_VALUE 1 - -// LED2 ON value -// <0=> Active low -// <1=> Active high -// 1 -#define LED2_ON_VALUE 1 - -// LED3 ON value -// <0=> Active low -// <1=> Active high -// 1 -#define LED3_ON_VALUE 1 - -// LED4 ON value -// <0=> Active low -// <1=> Active high -// 1 -#define LED4_ON_VALUE 1 - -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -#define LED1_LABEL "LED0" -// LED1_GPIO -// $[GPIO_LED1_GPIO] -#ifndef LED1_GPIO_PORT -#define LED1_GPIO_PORT gpioPortF -#endif -#ifndef LED1_GPIO_PIN -#define LED1_GPIO_PIN 4 -#endif -// [GPIO_LED1_GPIO]$ - -#define LED2_LABEL "LED1" -// LED2_GPIO -// $[GPIO_LED2_GPIO] -#ifndef LED2_GPIO_PORT -#define LED2_GPIO_PORT gpioPortF -#endif -#ifndef LED2_GPIO_PIN -#define LED2_GPIO_PIN 3 -#endif -// [GPIO_LED2_GPIO]$ - -#define LED3_LABEL "LED2" -// LED3_GPIO -// $[GPIO_LED3_GPIO] -#ifndef LED3_GPIO_PORT -#define LED3_GPIO_PORT gpioPortA -#endif -#ifndef LED3_GPIO_PIN -#define LED3_GPIO_PIN 2 -#endif -// [GPIO_LED3_GPIO]$ - -/* NB: EFR32 peripheral: US0_CS#0 - */ -#define LED4_LABEL "LED3" -// LED4_GPIO -// $[GPIO_LED4_GPIO] -#ifndef LED4_GPIO_PORT -#define LED4_GPIO_PORT gpioPortA -#endif -#ifndef LED4_GPIO_PIN -#define LED4_GPIO_PIN 3 -#endif -// [GPIO_LED4_GPIO]$ - -// <<< sl:end pin_tool >>> - -/*************************************************************************/ -/* Configure RGB LEDs */ -/*************************************************************************/ - -/* BRD8029A does not have any RGB led! - * If paired with radio board ZGM13 then the RGB on that board can be used - */ - -#endif /* EXTENSION_BOARD_8029A_EFR32XG13_LED_H */ diff --git a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_slider.h b/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_slider.h deleted file mode 100644 index 7b13ffee..00000000 --- a/src/zwave_ncp_serial_api_controller/config/extension_board_8029a_efr32xg13_slider.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Provides support for BRD8029A (Slider on EXP Board) - * - * @copyright 2022 Silicon Laboratories Inc. - */ - -#ifndef EXTENSION_BOARD_8029A_EFR32XG13_SLIDER_H -#define EXTENSION_BOARD_8029A_EFR32XG13_SLIDER_H - -/*************************************************************************/ -/* Configure slider button */ -/*************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// Slider Configuration -#define SLIDER1_LABEL "SW1" - -// Slider ON value -// <1=> Active high -// <0=> Active low -// 0 -#define SLIDER1_ON_VALUE 0 - -// Interrupt pin number -// 9 -#define SLIDER1_INT_NO 9 - -// Wake up from EM4 -// 0 -#define SLIDER1_CAN_WAKEUP_EM4 0 - -// - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SLIDER1_GPIO -// $[GPIO_SLIDER1_GPIO] -#ifndef SLIDER1_GPIO_PORT -#define SLIDER1_GPIO_PORT gpioPortC -#endif -#ifndef SLIDER1_GPIO_PIN -#define SLIDER1_GPIO_PIN 9 -#endif -// [GPIO_SLIDER1_GPIO]$ - -// <<< sl:end pin_tool >>> - -#endif /* EXTENSION_BOARD_8029A_EFR32XG13_SLIDER_H */ diff --git a/src/zwave_ncp_serial_api_controller/config/nvm3_default_config.h b/src/zwave_ncp_serial_api_controller/config/nvm3_default_config.h deleted file mode 100644 index 71bb6563..00000000 --- a/src/zwave_ncp_serial_api_controller/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 100 -#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 1900 -#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 \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/pin_config.h b/src/zwave_ncp_serial_api_controller/config/pin_config.h deleted file mode 100644 index 740e8856..00000000 --- a/src/zwave_ncp_serial_api_controller/config/pin_config.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[ADC0] -// [ADC0]$ - -// $[CMU] -// [CMU]$ - -// $[CSEN] -// [CSEN]$ - -// $[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]$ - -// $[GPIO] -// [GPIO]$ - -// $[I2C0] -// [I2C0]$ - -// $[I2C1] -// [I2C1]$ - -// $[IDAC0] -// [IDAC0]$ - -// $[LESENSE] -// [LESENSE]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[LEUART0] -// [LEUART0]$ - -// $[LFXO] -// [LFXO]$ - -// $[MODEM] -// [MODEM]$ - -// $[PCNT0] -// [PCNT0]$ - -// $[PRS.CH0] -// [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]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[USART0] -// 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]$ - -// $[VDAC0] -// [VDAC0]$ - -// $[WTIMER0] -// [WTIMER0]$ - -// $[CUSTOM_PIN_NAME] -#ifndef _PORT -#define _PORT gpioPortA -#endif -#ifndef _PIN -#define _PIN 0 -#endif - -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H - diff --git a/src/zwave_ncp_serial_api_controller/config/serial_api_config.h b/src/zwave_ncp_serial_api_controller/config/serial_api_config.h deleted file mode 100644 index 0d025455..00000000 --- a/src/zwave_ncp_serial_api_controller/config/serial_api_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file - * Serial API Configuration - * @copyright 2022 Silicon Laboratories Inc. - */ -#ifndef SERIAL_API_CONFIG_H -#define SERIAL_API_CONFIG_H - -#include - -// <<< sl:start pin_tool >>> - -// SERIAL_API - -// $[USART_SERIAL_API] -#ifndef SERIAL_API_PERIPHERAL -#define SERIAL_API_PERIPHERAL USART0 -#endif -#ifndef SERIAL_API_PERIPHERAL_NO -#define SERIAL_API_PERIPHERAL_NO 0 -#endif - -// USART0 TX on PA0 -#ifndef SERIAL_API_TX_PORT -#define SERIAL_API_TX_PORT gpioPortA -#endif -#ifndef SERIAL_API_TX_PIN -#define SERIAL_API_TX_PIN 0 -#endif -#ifndef SERIAL_API_TX_LOC -#define SERIAL_API_TX_LOC 0 -#endif - -// USART0 RX on PA1 -#ifndef SERIAL_API_RX_PORT -#define SERIAL_API_RX_PORT gpioPortA -#endif -#ifndef SERIAL_API_RX_PIN -#define SERIAL_API_RX_PIN 1 -#endif -#ifndef SERIAL_API_RX_LOC -#define SERIAL_API_RX_LOC 0 -#endif -// [USART_SERIAL_API]$ - -// <<< sl:end pin_tool >>> - -#endif // SERIAL_API_CONFIG_H diff --git a/src/zwave_ncp_serial_api_controller/config/sl_board_control_config.h b/src/zwave_ncp_serial_api_controller/config/sl_board_control_config.h deleted file mode 100644 index 3faa30a6..00000000 --- a/src/zwave_ncp_serial_api_controller/config/sl_board_control_config.h +++ /dev/null @@ -1,84 +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 Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 1 - -// Enable Display -// Default: 0 -#define SL_BOARD_ENABLE_DISPLAY 0 - -// Enable Relative Humidity and Temperature sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_RHT 0 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#ifndef SL_BOARD_ENABLE_VCOM_PORT -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortA -#endif -#ifndef SL_BOARD_ENABLE_VCOM_PIN -#define SL_BOARD_ENABLE_VCOM_PIN 5 -#endif -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// SL_BOARD_ENABLE_DISPLAY -// $[GPIO_SL_BOARD_ENABLE_DISPLAY] -#ifndef SL_BOARD_ENABLE_DISPLAY_PORT -#define SL_BOARD_ENABLE_DISPLAY_PORT gpioPortD -#endif -#ifndef SL_BOARD_ENABLE_DISPLAY_PIN -#define SL_BOARD_ENABLE_DISPLAY_PIN 15 -#endif -// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ - -// 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 gpioPortD -#endif -#ifndef SL_BOARD_ENABLE_SENSOR_RHT_PIN -#define SL_BOARD_ENABLE_SENSOR_RHT_PIN 15 -#endif -// [GPIO_SL_BOARD_ENABLE_SENSOR_RHT]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/src/zwave_ncp_serial_api_controller/config/sl_debug_swo_config.h b/src/zwave_ncp_serial_api_controller/config/sl_debug_swo_config.h deleted file mode 100644 index 75896a71..00000000 --- a/src/zwave_ncp_serial_api_controller/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/src/zwave_ncp_serial_api_controller/config/sl_device_init_dcdc_config.h b/src/zwave_ncp_serial_api_controller/config/sl_device_init_dcdc_config.h deleted file mode 100644 index e3deec07..00000000 --- a/src/zwave_ncp_serial_api_controller/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 1 - -// 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 \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/sl_device_init_emu_config.h b/src/zwave_ncp_serial_api_controller/config/sl_device_init_emu_config.h deleted file mode 100644 index 68a04c23..00000000 --- a/src/zwave_ncp_serial_api_controller/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 1 - -// 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 emuEM4Hibernate - -// 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 emuPinRetentionLatch - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_EMU_CONFIG_H \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/sl_device_init_hfxo_config.h b/src/zwave_ncp_serial_api_controller/config/sl_device_init_hfxo_config.h deleted file mode 100644 index d8e42433..00000000 --- a/src/zwave_ncp_serial_api_controller/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: 39000000 -#define SL_DEVICE_INIT_HFXO_FREQ 39000000 - -// HFXO precision in PPM <0-65535> -// Default: 500 -#define SL_DEVICE_INIT_HFXO_PRECISION 500 - -// CTUNE <0-511> -// Default: 360 -#define SL_DEVICE_INIT_HFXO_CTUNE 319 - -// 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/src/zwave_ncp_serial_api_controller/config/sl_fem_util_config.h b/src/zwave_ncp_serial_api_controller/config/sl_fem_util_config.h deleted file mode 100644 index f7d358dd..00000000 --- a/src/zwave_ncp_serial_api_controller/config/sl_fem_util_config.h +++ /dev/null @@ -1,95 +0,0 @@ -/***************************************************************************//** - * @file - * @brief Front End Module 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_FEM_UTIL_CONFIG_H -#define SL_FEM_UTIL_CONFIG_H - -#include "em_gpio.h" - -// <<< Use Configuration Wizard in Context Menu >>> -// FEM Configuration -// Enable RX Mode -// Default: 0 -#define SL_FEM_UTIL_RX_ENABLE 0 -// Enable TX Mode -// Default: 0 -#define SL_FEM_UTIL_TX_ENABLE 0 -// Enable Bypass Mode -// Default: 0 -#define SL_FEM_UTIL_BYPASS_ENABLE 0 -// Enable TX High Power Mode -// Default: 0 -#define SL_FEM_UTIL_TX_HIGH_POWER_ENABLE 0 -// -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> -// SL_FEM_UTIL_RX -// $[PRS_SL_FEM_UTIL_RX] -//#define SL_FEM_UTIL_RX_CHANNEL 5 - -// PRS CH5 on PD10 -//#define SL_FEM_UTIL_RX_PORT gpioPortD -//#define SL_FEM_UTIL_RX_PIN 10 -//#define SL_FEM_UTIL_RX_LOC 0 - -// [PRS_SL_FEM_UTIL_RX]$ - -// SL_FEM_UTIL_TX -// $[PRS_SL_FEM_UTIL_TX] - -// [PRS_SL_FEM_UTIL_TX]$ - -// SL_FEM_UTIL_SLEEP -// $[PRS_SL_FEM_UTIL_SLEEP] -//#define SL_FEM_UTIL_SLEEP_CHANNEL 6 - -// PRS CH6 on PD11 -//#define SL_FEM_UTIL_SLEEP_PORT gpioPortD -//#define SL_FEM_UTIL_SLEEP_PIN 11 -//#define SL_FEM_UTIL_SLEEP_LOC 13 - -// [PRS_SL_FEM_UTIL_SLEEP]$ - -// SL_FEM_UTIL_BYPASS -// $[GPIO_SL_FEM_UTIL_BYPASS] - -// [GPIO_SL_FEM_UTIL_BYPASS]$ - -// SL_FEM_UTIL_TX_HIGH_POWER -// $[GPIO_SL_FEM_UTIL_TX_HIGH_POWER] - -// [GPIO_SL_FEM_UTIL_TX_HIGH_POWER]$ -// <<< sl:end pin_tool >>> - -#define SL_FEM_UTIL_OPTIMIZED_PHY_ENABLE 0 -#define SL_FEM_UTIL_RUNTIME_PHY_SELECT 0 - -#endif // SL_FEM_UTIL_CONFIG_H \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/sl_memory_config.h b/src/zwave_ncp_serial_api_controller/config/sl_memory_config.h deleted file mode 100644 index 1c580349..00000000 --- a/src/zwave_ncp_serial_api_controller/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 1280 -#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 128 -#endif - -// -// <<< end of configuration section >>> - -#endif diff --git a/src/zwave_ncp_serial_api_controller/config/sl_power_manager_config.h b/src/zwave_ncp_serial_api_controller/config/sl_power_manager_config.h deleted file mode 100644 index e4b1da09..00000000 --- a/src/zwave_ncp_serial_api_controller/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/src/zwave_ncp_serial_api_controller/config/sl_rail_util_pa_config.h b/src/zwave_ncp_serial_api_controller/config/sl_rail_util_pa_config.h deleted file mode 100644 index 0c983c34..00000000 --- a/src/zwave_ncp_serial_api_controller/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_NONE -// Sub-1 GHz PA Selection -// Enable -// Disable -// Default: RAIL_TX_POWER_MODE_SUBGIG -#define SL_RAIL_UTIL_PA_SELECTION_SUBGHZ RAIL_TX_POWER_MODE_SUBGIG -// - -// 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 \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/sl_rail_util_power_manager_init_config.h b/src/zwave_ncp_serial_api_controller/config/sl_rail_util_power_manager_init_config.h deleted file mode 100644 index a9df48b4..00000000 --- a/src/zwave_ncp_serial_api_controller/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 0 - -// -// <<< end of configuration section >>> -#endif // SL_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/sl_rail_util_sequencer_config.h b/src/zwave_ncp_serial_api_controller/config/sl_rail_util_sequencer_config.h deleted file mode 100644 index 9a584a07..00000000 --- a/src/zwave_ncp_serial_api_controller/config/sl_rail_util_sequencer_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************//** - * @file - * @brief - ******************************************************************************* - * # License - * Copyright 2023 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_SEQUENCER_H -#define SL_RAIL_UTIL_SEQUENCER_H - -#include "rail.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define SL_RAIL_UTIL_SEQUENCER_RUNTIME_IMAGE_SELECTION 0 - -#define SL_RAIL_UTIL_SEQUENCER_IMAGE RAIL_SEQ_IMAGE_ZWAVE - -#ifdef __cplusplus -} -#endif - -#endif // SL_RAIL_UTIL_SEQUENCER_H \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/sl_sleeptimer_config.h b/src/zwave_ncp_serial_api_controller/config/sl_sleeptimer_config.h deleted file mode 100644 index bba646d6..00000000 --- a/src/zwave_ncp_serial_api_controller/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 >>> \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zaf_appname_config.h b/src/zwave_ncp_serial_api_controller/config/zaf_appname_config.h deleted file mode 100644 index c52bf4a4..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zaf_appname_config.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************//** - * # License - * Copyright 2023 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 the Silicon Labs Master Software License - * Agreement (MSLA) available at - * https://www.silabs.com/about-us/legal/master-software-license-agreement - * By installing, copying or otherwise using this software, you agree to the - * terms of the MSLA. - * - ******************************************************************************/ - -#ifndef _ZAF_APPNAME_CONFIG_H_ -#define _ZAF_APPNAME_CONFIG_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// ZAF Application Name Configuration - -// Application Name -// "zwave_application" -#define ZAF_APP_NAME "serial_api_controller" - -// - -// <<< end of configuration section >>> - -#endif /* _ZAF_APPNAME_CONFIG_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zaf_event_distributor_core_config.h b/src/zwave_ncp_serial_api_controller/config/zaf_event_distributor_core_config.h deleted file mode 100644 index b5cd3958..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zaf_event_distributor_core_config.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************//** - * # License - * Copyright 2023 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 the Silicon Labs Master Software License - * Agreement (MSLA) available at - * https://www.silabs.com/about-us/legal/master-software-license-agreement - * By installing, copying or otherwise using this software, you agree to the - * terms of the MSLA. - * - ******************************************************************************/ - -#ifndef _ZAF_EVENT_DISTRIBUTOR_CORE_CONFIG_H_ -#define _ZAF_EVENT_DISTRIBUTOR_CORE_CONFIG_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// ZAF Event Distributor Core Configuration - -// Timeout (in mS) when waiting for event <1..4294967295:1> -// Default: 4294967295 -#define ZAF_EVENT_DISTRIBUTOR_CORE_CONFIG_TIMEOUT 4294967295 - -// - -// <<< end of configuration section >>> - -#endif /* _ZAF_EVENT_DISTRIBUTOR_CORE_CONFIG_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zpal_zwave_nvm_instance_config.h b/src/zwave_ncp_serial_api_controller/config/zpal_zwave_nvm_instance_config.h deleted file mode 100644 index d6ffa898..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zpal_zwave_nvm_instance_config.h +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************//** - * # License - * Copyright 2023 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 the Silicon Labs Master Software License - * Agreement (MSLA) available at - * https://www.silabs.com/about-us/legal/master-software-license-agreement - * By installing, copying or otherwise using this software, you agree to the - * terms of the MSLA. - * - ******************************************************************************/ - -#ifndef _ZPAL_ZWAVE_NVM_INSTANCE_CONFIG_H_ -#define _ZPAL_ZWAVE_NVM_INSTANCE_CONFIG_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// ZAF NVM3 config - -#ifndef ZPAL_ZW_NVM_CACHE_SIZE -// NVM3 Z-Wave 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 -// Z-Wave NVM3 instance (all ZAF and application NVM3 objects). -// Count of objects stored by ZAF depend on the application. At least -// 11 object should be reserved for ZAF. -// see [TODO add a user documentation] for more details -// Default: 11 -#define ZPAL_ZW_NVM_CACHE_SIZE 11 -#endif - -#ifndef ZPAL_ZW_NVM_MAX_OBJECT_SIZE -// NVM3 Z-Wave Instance Max Object Size -// Size of the largest object that can be stored by ZAF or application. -// For ZAF, it should be at least the largest of: -// - CC_NOTIFICATION_MAX_NOTIFICATIONS -// - 3 * CC_ASSOCIATION_MAX_NODES_IN_GROUP * (1+ZAF_CONFIG_NUMBER_OF_END_POINTS) + CC_ASSOCIATION_MAX_GROUPS_PER_ENDPOINT -// - 204 (minimum required by nvm3 library) -// - 512 (minimum required for controller) -// Default: 512 -#define ZPAL_ZW_NVM_MAX_OBJECT_SIZE 512 -#endif - -#ifndef ZPAL_ZW_NVM_INSTANCE_REPACK_HEADROOM -// NVM3 Z-Wave Instance User Repack Headroom -// Headroom determining how many bytes below the forced repack limit the user -// repack limit should be placed. -// Default: 12 -#define ZPAL_ZW_NVM_INSTANCE_REPACK_HEADROOM 12 -#endif - -// - -// <<< end of configuration section >>> - -#endif /* _ZPAL_ZWAVE_NVM_INSTANCE_CONFIG_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zw_build_no.h b/src/zwave_ncp_serial_api_controller/config/zw_build_no.h deleted file mode 100644 index 09377ef4..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zw_build_no.h +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @file - * @copyright 2021 Silicon Laboratories Inc. - */ - -#ifndef _ZW_BUILD_NO_H_ -#define _ZW_BUILD_NO_H_ - -#include - -// Application Framework Build number. -// If not otherwise specified, it is the same as Z-Wave Protocol Build number -#ifndef ZAF_BUILD_NO -#define ZAF_BUILD_NO ZW_GetProtocolBuildNumber() -#endif - -#endif /* _ZW_BUILD_NO_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zw_config_rf.h b/src/zwave_ncp_serial_api_controller/config/zw_config_rf.h deleted file mode 100644 index 920d318e..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zw_config_rf.h +++ /dev/null @@ -1,46 +0,0 @@ -/***************************************************************************//** - * # License - * Copyright 2023 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 the Silicon Labs Master Software License - * Agreement (MSLA) available at - * https://www.silabs.com/about-us/legal/master-software-license-agreement - * By installing, copying or otherwise using this software, you agree to the - * terms of the MSLA. - * - ******************************************************************************/ - -#ifndef _ZW_CONFIG_RF_H_ -#define _ZW_CONFIG_RF_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Max Tx Power Configuration - -// The maximum allowed Tx power in deci dBm for Z-Wave Long Range network <140..200:1> -// The maximum allowed Tx power in deci dBm for Z-Wave Long Range network -// Default: 140 -#define APP_MAX_TX_POWER_LR 140 - -// The maximum allowed Tx power in deci dBm for Z-Wave network <-100..140:1> -// The maximum allowed Tx power in deci dBm for Z-Wave network -// Default: 0 -#define APP_MAX_TX_POWER 0 - -// The deci dBmoutput measured at a PA setting of 0dBm <-50..50:1> -// The deci dBm output measured at a PA setting of 0dBm -// Default: 0 -#define APP_MEASURED_0DBM_TX_POWER 0 - -// Enable Radio Debug -// Enable Radio Debug -// Default: 0 -#define ENABLE_RADIO_DEBUG 0 - -// - -// <<< end of configuration section >>> - -#endif /* _ZW_CONFIG_RF_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zw_region_config.h b/src/zwave_ncp_serial_api_controller/config/zw_region_config.h deleted file mode 100644 index 60dc9f9a..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zw_region_config.h +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************//** - * # License - * Copyright 2023 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 the Silicon Labs Master Software License - * Agreement (MSLA) available at - * https://www.silabs.com/about-us/legal/master-software-license-agreement - * By installing, copying or otherwise using this software, you agree to the - * terms of the MSLA. - * - ******************************************************************************/ - -#ifndef _ZW_REGION_CONFIG_H_ -#define _ZW_REGION_CONFIG_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Z-Wave Radio Configuration - -// The supported region of the device. Used only if region value is not previously written in MFG_ZWAVE_COUNTRY_FREQ token. To delete value from MFG token, run: commander flash --tokengroup znet --token MFG_ZWAVE_COUNTRY_FREQ:0xFF -// The supported region of the device. Used only if region value is not previously written in MFG_ZWAVE_COUNTRY_FREQ token. To delete value from MFG token, run: commander flash --tokengroup znet --token MFG_ZWAVE_COUNTRY_FREQ:0xFF -// Default (Europe) -// Australia / New Zealand -// China -// Europe -// Hong Kong -// Israel -// India -// Japan -// Korea -// Russia -// United States -// United States Long Range -// Default: REGION_DEFAULT -#define ZW_REGION REGION_DEFAULT - -// - -// <<< end of configuration section >>> - -#endif /* _ZW_REGION_CONFIG_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/config/zw_version_config.h b/src/zwave_ncp_serial_api_controller/config/zw_version_config.h deleted file mode 100644 index ba8b15af..00000000 --- a/src/zwave_ncp_serial_api_controller/config/zw_version_config.h +++ /dev/null @@ -1,60 +0,0 @@ -/***************************************************************************//** - * # License - * Copyright 2023 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 the Silicon Labs Master Software License - * Agreement (MSLA) available at - * https://www.silabs.com/about-us/legal/master-software-license-agreement - * By installing, copying or otherwise using this software, you agree to the - * terms of the MSLA. - * - ******************************************************************************/ - -#ifndef _ZW_VERSION_CONFIG_H_ -#define _ZW_VERSION_CONFIG_H_ - -// <<< Use Configuration Wizard in Context Menu >>> - -// Override the default application version with USER_APP_* defines" - -// false: Use Default Z-Wave version numbering, true: Use Application Version Configuration numbering -// Default: 0 -#define USE_USER_APP_VERSION 0 - -// -// Application Version Configuration - -// Application Major Version <1..255:1> -// Default: 1 -#define USER_APP_VERSION 1 - -// Application Minor Version <1..255:1> -// Default: 0 -#define USER_APP_REVISION 0 - -// Application Patch Version <1..255:1> -// Default: 0 -#define USER_APP_PATCH 0 - -// - -// <<< end of configuration section >>> - -#if USE_USER_APP_VERSION - #define APP_VERSION USER_APP_VERSION - #define APP_REVISION USER_APP_REVISION - #define APP_PATCH USER_APP_PATCH -#else - #ifdef ZW_SLAVE - #define APP_VERSION ZAF_VERSION_MAJOR - #define APP_REVISION ZAF_VERSION_MINOR - #define APP_PATCH ZAF_VERSION_PATCH - #else - #define APP_VERSION SDK_VERSION_MAJOR - #define APP_REVISION SDK_VERSION_MINOR - #define APP_PATCH SDK_VERSION_PATCH - #endif -#endif -#endif /* _ZW_VERSION_CONFIG_H_ */ \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/controller_supported_func.h b/src/zwave_ncp_serial_api_controller/controller_supported_func.h deleted file mode 100644 index d2789b5a..00000000 --- a/src/zwave_ncp_serial_api_controller/controller_supported_func.h +++ /dev/null @@ -1,211 +0,0 @@ -/** - * @file - * @copyright 2022 Silicon Laboratories Inc. - */ - -/* Generated file copied from Sdk670 with std. functions supported by static controller. */ -/* Following defines has been disable for build purposes: - * SUPPORT_ZW_AES_ECB - * SUPPORT_ZW_SET_EXT_INT_LEVEL - */ -#define SUPPORT_GET_ROUTING_TABLE_LINE 1 /* ZW_GetRoutingInfo */ -#define SUPPORT_LOCK_ROUTE_RESPONSE 1 /* ZW_LockRoute */ -#define SUPPORT_MEMORY_GET_BUFFER 1 /* MemoryGetBuffer */ -#define SUPPORT_MEMORY_GET_BYTE 1 /* MemoryGetByte */ -#define SUPPORT_MEMORY_GET_ID 1 /* MemoryGetID */ -#define SUPPORT_MEMORY_PUT_BUFFER 1 /* MemoryPutBuffer */ -#define SUPPORT_MEMORY_PUT_BYTE 1 /* MemoryPutByte */ -#define SUPPORT_NVM_GET_ID 1 /* NVM_get_id */ -#define SUPPORT_NVM_EXT_READ_LONG_BUFFER 1 /* NVM_ext_read_long_buffer */ -#define SUPPORT_NVM_EXT_READ_LONG_BYTE 1 /* NVM_ext_read_long_byte */ -#define SUPPORT_NVM_EXT_WRITE_LONG_BYTE 0 /* NVM_ext_write_long_byte */ -#define SUPPORT_NVM_EXT_WRITE_LONG_BUFFER 0 /* NVM_ext_write_long_buffer*/ -#define SUPPORT_NVM_BACKUP_RESTORE 1 /* NVM_backup_restore */ -#define SUPPORT_PWR_CLK_PD 0 /* PWR_Clk_PD */ -#define SUPPORT_PWR_CLK_PUP 0 /* PWR_Clk_PUp */ -#define SUPPORT_PWR_SELECT_CLK 0 /* PWR_Select_Clk */ -#define SUPPORT_PWR_SETSTOPMODE 0 /* PWR_SetStopMode */ -#define SUPPORT_STORE_HOMEID 0 /* ZW_StoreHomeID */ -#define SUPPORT_STORE_NODEINFO 0 /* notUsed */ -#define SUPPORT_ZW_ADD_NODE_TO_NETWORK 1 /* ZW_AddNodeToNetwork */ -#define SUPPORT_ZW_AES_ECB 0 /* ZW_AES_ECB */ -#define SUPPORT_ZW_ARE_NODES_NEIGHBOURS 0 /* notUsed */ -#define SUPPORT_ZW_ASSIGN_RETURN_ROUTE 1 /* ZW_AssignReturnRoute */ -#define SUPPORT_ZW_ASSIGN_PRIORITY_RETURN_ROUTE 1 /* ZW_AssignPriorityReturnRoute */ -#define SUPPORT_ZW_ASSIGN_SUC_RETURN_ROUTE 1 /* ZW_AssignSUCReturnRoute */ -#define SUPPORT_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE 1 /* ZW_AssignPrioritySUCReturnRoute */ -#define SUPPORT_ZW_CONTROLLER_CHANGE 1 /* ZW_ControllerChange */ -#define SUPPORT_ZW_CREATE_NEW_PRIMARY 0 /* NotUsed */ -#define SUPPORT_ZW_DELETE_RETURN_ROUTE 1 /* ZW_DeleteReturnRoute */ -#define SUPPORT_ZW_DELETE_SUC_RETURN_ROUTE 1 /* ZW_DeleteSUCReturnRoute */ -#define SUPPORT_ZW_ENABLE_SUC 0 /* ZW_EnableSUC */ -#define SUPPORT_ZW_EXPLORE_REQUEST_INCLUSION 1 /* ZW_ExploreRequestInclusion */ -#define SUPPORT_ZW_EXPLORE_REQUEST_EXCLUSION 1 /* ZW_ExploreRequestExclusion */ -#define SUPPORT_ZW_GET_CONTROLLER_CAPABILITIES 1 /* ZW_GetControllerCapabilities */ -#define SUPPORT_ZW_GET_PRIORITY_ROUTE 1 /* ZW_GetPriorityRoute */ -#define SUPPORT_ZW_SET_PRIORITY_ROUTE 1 /* ZW_SetPriorityRoute */ -#define SUPPORT_ZW_GET_NEIGHBOR_COUNT 0 /*notUsed */ -#define SUPPORT_ZW_GET_NODE_PROTOCOL_INFO 1 /* ZW_GetNodeProtocolInfo */ -#define SUPPORT_ZW_GET_PROTOCOL_STATUS 1 /* ZW_GetProtocolStatus */ -#define SUPPORT_ZW_GET_PROTOCOL_VERSION 1 /* ZW_GetProtocolVersion */ -#define SUPPORT_ZW_GET_RANDOM 1 /* ZW_GetRandomWord */ -#define SUPPORT_ZW_GET_ROUTING_MAX 0 /* ZW_GetRoutingMAX */ -#define SUPPORT_ZW_GET_SUC_NODE_ID 1 /* ZW_GetSUCNodeID */ -#define SUPPORT_ZW_GET_VERSION 1 /* ZW_Version */ -#define SUPPORT_ZW_IS_FAILED_NODE_ID 1 /* ZW_isFailedNode */ -#define SUPPORT_ZW_IS_NODE_WITHIN_DIRECT_RANGE 0 /* NotUsed */ -#define SUPPORT_ZW_IS_PRIMARY_CTRL 0 /* NotUsed */ -#define SUPPORT_ZW_IS_WUT_KICKED 0 /* ZW_IsWutKicked */ -#define SUPPORT_ZW_NEW_CONTROLLER 0 /* ZW_NewController */ -#define SUPPORT_ZW_RANDOM 0 /* NotUsed */ -#define SUPPORT_ZW_REDISCOVERY_NEEDED 0 /* ZW_RediscoveryNeeded */ -#define SUPPORT_ZW_REMOVE_FAILED_NODE_ID 1 /* ZW_RemoveFailedNode */ -#define SUPPORT_ZW_REMOVE_NODE_FROM_NETWORK 1 /* ZW_RemoveNodeFromNetwork */ -#define SUPPORT_ZW_REMOVE_NODE_ID_FROM_NETWORK 1 /* ZW_RemoveNodeIDFromNetwork */ -#define SUPPORT_ZW_REPLACE_FAILED_NODE 1 /* ZW_ReplaceFailedNode */ -#define SUPPORT_ZW_REPLICATION_COMMAND_COMPLETE 1 /* ZW_ReplicationReceiveComplete */ -#define SUPPORT_ZW_REPLICATION_SEND_DATA 1 /* ZW_ReplicationSend */ -#define SUPPORT_ZW_REQUEST_NETWORK_UPDATE 1 /* ZW_RequestNetWorkUpdate */ -#define SUPPORT_ZW_REQUEST_NEW_ROUTE_DESTINATIONS 0 /* NotUsed */ -#define SUPPORT_ZW_REQUEST_NODE_INFO 1 /* ZW_RequestNodeInfo */ -#define SUPPORT_ZW_REQUEST_NODE_NEIGHBOR_UPDATE 1 /* ZW_RequestNodeNeighborUpdate */ -#define SUPPORT_ZW_RF_POWER_LEVEL_GET 0 /* ZW_RFPowerLevelGet */ -#define SUPPORT_ZW_RF_POWER_LEVEL_REDISCOVERY_SET 0 /* NotUsed */ -#define SUPPORT_ZW_RF_POWER_LEVEL_SET 0 /* ZW_RFPowerLevelSet */ -#define SUPPORT_ZW_SEND_DATA 1 /* ZW_SendData */ -#define SUPPORT_ZW_SEND_DATA_EX 0 /* ZW_SendDataEx */ -#define SUPPORT_ZW_SEND_DATA_ABORT 1 /* ZW_SendDataAbort */ -#define SUPPORT_ZW_SEND_DATA_META 0 /* ZW_SendDataMeta */ -#define SUPPORT_ZW_SEND_DATA_META_BRIDGE 0 /* ZW_SendDataMeta_Bridge */ -#define SUPPORT_ZW_SEND_DATA_META_MR 0 /* NotUsed */ -#define SUPPORT_ZW_SEND_DATA_MR 0 /* NotUsed */ -#define SUPPORT_ZW_SEND_DATA_MULTI 1 /* ZW_SendDataMulti */ -#define SUPPORT_ZW_SEND_DATA_MULTI_EX 0 /* ZW_SendDataMultiEx */ -#define SUPPORT_ZW_SET_NETWORK_KEY_S0 0 /* ZW_SetNetworkKeyS0 */ -#define SUPPORT_ZW_GET_SECURITY_KEYS 0 /* ZW_GetSecurityKeys */ -#define SUPPORT_ZW_SEND_NODE_INFORMATION 1 /* ZW_SendNodeInformation */ -#define SUPPORT_ZW_SEND_SLAVE_DATA 0 /* ZW_SendSlaveData */ -#define SUPPORT_ZW_SEND_SUC_ID 1 /* ZW_SendSUCID */ -#define SUPPORT_ZW_SEND_TEST_FRAME 1 /* ZW_SendTestFrame */ -#define SUPPORT_ZW_SET_DEFAULT 1 /* ZW_SetDefault */ -#define SUPPORT_ZW_SET_EXT_INT_LEVEL 0 /* ZW_SetExtIntLevel */ -#define SUPPORT_ZW_SET_LEARN_MODE 1 /* ZW_SetLearnMode */ -#define SUPPORT_ZW_SET_LEARN_NODE_STATE 0 /* ZW_SetLearnNodeState */ -#define SUPPORT_ZW_SET_PROMISCUOUS_MODE 0 /* ZW_SetPromiscuousMode */ -#define SUPPORT_ZW_SET_RF_RECEIVE_MODE 1 /* ZW_SetRFReceiveMode */ -#define SUPPORT_ZW_SET_ROUTING_INFO 0 /* NotUsed */ -#define SUPPORT_ZW_SET_ROUTING_MAX 1 /* ZW_SetRoutingMAX*/ -#define SUPPORT_ZW_SET_SLEEP_MODE 0 /* ZW_SetSleepMode */ -#define SUPPORT_ZW_SET_SUC_NODE_ID 1 /* ZW_SetSUCNodeID */ -#define SUPPORT_ZW_SET_WUT_TIMEOUT 0 /* ZW_SetWutTimeout */ -#define SUPPORT_ZW_SUPPORT9600_ONLY 0 /* ZW_Support9600Only */ -#define SUPPORT_ZW_TYPE_LIBRARY 1 /* ZW_Type_Library */ -#define SUPPORT_ZW_WATCHDOG_DISABLE 0 /* ZW_WatchDogDisable */ -#define SUPPORT_ZW_WATCHDOG_ENABLE 0 /* ZW_WatchDogEnable */ -#define SUPPORT_ZW_WATCHDOG_KICK 0 /* ZW_WatchDogKick */ -#define SUPPORT_ZW_WATCHDOG_START 1 /* ZW_WatchDogEnable */ -#define SUPPORT_ZW_WATCHDOG_STOP 1 /* ZW_WatchDogDisable */ -#define SUPPORT_ZW_NVR_GET_VALUE 1 /* ZW_NVRGetValue */ -#define SUPPORT_FUNC_ID_CLEAR_TX_TIMERS 1 /* ZW_ClearTxTimers */ -#define SUPPORT_FUNC_ID_GET_TX_TIMERS 1 /* ZW_GetTxTimer */ -#define SUPPORT_ZW_CLEAR_NETWORK_STATS 1 /* ZW_ClearNetworkStats */ -#define SUPPORT_ZW_GET_NETWORK_STATS 1 /* ZW_GetNetworkStats */ -#define SUPPORT_ZW_GET_BACKGROUND_RSSI 1 /* ZW_GetBackgroundRSSI */ -#define SUPPORT_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD 1 - -#define SUPPORT_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS 1 - -/* SerialAPI functionality support definitions */ -#define SUPPORT_SEND_DATA_TIMING 1 -/* Only Controllers can Add/Remove other nodes */ - -/* Enable support for SerialAPI Startup Notification */ -#define SUPPORT_SERIAL_API_STARTUP_NOTIFICATION 1 - -/* Common SerialAPI functionality support definitions */ -#define SUPPORT_SERIAL_API_GET_INIT_DATA 1 -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION 1 -#define SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE 1 -#define SUPPORT_APPLICATION_COMMAND_HANDLER 0 -#define SUPPORT_SERIAL_API_SET_TIMEOUTS 1 - -#define SUPPORT_SERIAL_API_SOFT_RESET 1 -#define SUPPORT_SERIAL_API_SETUP 1 -#define SUPPORT_ZW_INITIATE_SHUTDOWN 1 -#define SUPPORT_SERIAL_API_GET_LR_NODES 1 -#define SUPPORT_SERIAL_GET_LR_CHANNEL 1 -#define SUPPORT_SERIAL_SET_LR_CHANNEL 1 -#define SUPPORT_SERIAL_SET_LR_VIRTUAL_IDS 1 -#define SUPPORT_SERIAL_ENABLE_RADIO_PTI 1 - -/* */ -#define SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0 - -/**************************************************************************/ -/* Common for all Controllers */ -/* SerialAPI functionality support definitions */ -#define SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE 1 -#define SUPPORT_ZW_APPLICATION_UPDATE 1 - - -/**************************************************************************/ -/* Controller */ -/* Specific SerialAPI functionality support definitions */ -/**************************************************************************/ -/* Installer Controller */ -/* Specific SerialAPI functionality support definitions */ -#if defined(ZW_INSTALLER) - -#define SUPPORT_GET_TX_COUNTER 1 -#define SUPPORT_RESET_TX_COUNTER 1 - -#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 -#define SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER 0 -#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 0 - -/* Not supported by any controllers except controller portable and installer libs */ - -#endif /* ZW_INSTALLER */ - -/**************************************************************************/ -/* Bridge Controller */ -/* specific SerialAPI functionality support definitions */ -#ifdef ZW_CONTROLLER_BRIDGE -#define SUPPORT_ZW_SEND_DATA 1 /* ZW_SendData */ -#define SUPPORT_GET_TX_COUNTER 0 -#define SUPPORT_RESET_TX_COUNTER 0 -#define SUPPORT_ZW_GET_VIRTUAL_NODES 1 /* ZW_GetVirtualNodes */ -#define SUPPORT_ZW_IS_VIRTUAL_NODE 1 /* ZW_IsVirtualNode */ -#define SUPPORT_ZW_SEND_DATA_BRIDGE 1 /* ZW_SendData_Bridge */ -#define SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE 1 /* ZW_SendDataMulti_Bridge */ -#define SUPPORT_ZW_SET_SLAVE_LEARN_MODE 1 /* ZW_SetSlaveLearnMode */ -#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 1 - -#if SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE -#define SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER 0 -#else -#define SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER 1 -#endif -#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 1 - -/* Not supported by any controllers except controller portable and installer libs */ -#else -#define SUPPORT_ZW_SEND_DATA 1 /* ZW_SendData */ -#define SUPPORT_GET_TX_COUNTER 0 -#define SUPPORT_RESET_TX_COUNTER 0 -#define SUPPORT_ZW_GET_VIRTUAL_NODES 0 /* ZW_GetVirtualNodes */ -#define SUPPORT_ZW_IS_VIRTUAL_NODE 0 /* ZW_IsVirtualNode */ -#define SUPPORT_ZW_SEND_DATA_BRIDGE 0 /* ZW_SendData_Bridge */ -#define SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE 0 /* ZW_SendDataMulti_Bridge */ -#define SUPPORT_ZW_SET_SLAVE_LEARN_MODE 0 /* ZW_SetSlaveLearnMode */ -#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 -#define SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER 0 -#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 1 - -#endif /* ZW_CONTROLLER_BRIDGE */ - -#ifdef ZW_CONTROLLER_SINGLE -#define SUPPORT_SERIAL_API_TEST 1 -#else -#define SUPPORT_SERIAL_API_TEST 0 -#endif diff --git a/src/zwave_ncp_serial_api_controller/gbl_metadata.yaml b/src/zwave_ncp_serial_api_controller/gbl_metadata.yaml deleted file mode 100644 index 33221b6e..00000000 --- a/src/zwave_ncp_serial_api_controller/gbl_metadata.yaml +++ /dev/null @@ -1,6 +0,0 @@ -baudrate: 115200 -dynamic: [zwave_version] -fw_type: z-wave -compression: lz4 -sign_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key" -encrypt_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key" \ No newline at end of file diff --git a/src/zwave_ncp_serial_api_controller/nvm_backup_restore.c b/src/zwave_ncp_serial_api_controller/nvm_backup_restore.c deleted file mode 100644 index 7c0b848b..00000000 --- a/src/zwave_ncp_serial_api_controller/nvm_backup_restore.c +++ /dev/null @@ -1,292 +0,0 @@ -/** - * @file nvm_backup_restore.c - * @copyright 2022 Silicon Laboratories Inc. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//#define DEBUGPRINT -#include "DebugPrint.h" - -/*WARNING: The backup/restore feature is based on the thesis that the NVM area is one continuous block even if it consist of two blocks, - A protocol and an application block. These blocks are defined in the linker script. The blocks are addressed using the data structure below. - The definition of the NVM blocks should not be changed, changing the definition will result in breaking the backup/restore feature*/ - -#define WORK_BUFFER_SIZE 64 - -/* HOST->ZW: -operation [open=0|read=1|write=2|close=3] -length desired length of read/write operation -offset(MSB) pointer to NVM memory -offset(LSB) -buffer[] buffer only sent for operation=write -*/ -/* ZW->HOST: -retVal [OK=0|error=1|EOF=-1] -length actual length of read/written data -offset(MSB) pointer to NVM memory (EOF ptr for operation=open) -offset(LSB) -buffer[] buffer only returned for operation=read -*/ - -static eNVMBackupRestoreOperation NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationClose; - -/** - * Must be called to open the backup restore feature - * The function will shut down the RF, Z-Wave timer system , close the NVM system, and disable the watchdog timer - * - * @return true if backup/resotre is opened else false - */ -static bool NvmBackupOpen(void) -{ - SZwaveCommandPackage nvmOpen = { - .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_OPEN, - .uCommandParams.NvmBackupRestore.offset = 0, - .uCommandParams.NvmBackupRestore.length = 0, - }; - zpal_enable_watchdog(false); - uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmOpen); - if (EQUEUENOTIFYING_STATUS_SUCCESS == bReturn) - { - SZwaveCommandStatusPackage cmdStatus = { 0 }; - if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_NVM_BACKUP_RESTORE)) - { - if (cmdStatus.Content.NvmBackupRestoreStatus.status) - { - return true; - } - } - } - return false; -} - -/** - * Read data from the NVM area - * - * @param offset[in] The offset of the NVM area to read from - * @param length[in] the length of the NVM area to read - * @param pNvmData[out] the data read from the NVM area - * - * @return true if data is read else false - */ -static uint8_t NvmBackupRead( uint32_t offset, uint8_t length, uint8_t* pNvmData) -{ - SZwaveCommandPackage nvmRead = { - .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_READ, - .uCommandParams.NvmBackupRestore.offset = offset, - .uCommandParams.NvmBackupRestore.length = length, - .uCommandParams.NvmBackupRestore.nvmData = pNvmData - }; - DPRINTF("NVM_Read_ 0x%08x, 0x%08x, 0x%08x\r\n",offset, length, (uint32_t)pNvmData); - uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmRead); - if (EQUEUENOTIFYING_STATUS_SUCCESS == bReturn) - { - SZwaveCommandStatusPackage cmdStatus = { 0 }; - if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_NVM_BACKUP_RESTORE)) - { - if (cmdStatus.Content.NvmBackupRestoreStatus.status) - { - DPRINT("NVM_READ_OK\r\n"); - return true; - } - } - } - DPRINT("NVM_READ_ERR\r\n"); - return false; -} - -/** - * Close the open/restore feature - * - * @return true if backup/retore feature is closed else false - */ - -static uint8_t NvmBackupClose(void) -{ - SZwaveCommandPackage nvmClose = { - .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_CLOSE - }; - uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmClose); - - return ((EQUEUENOTIFYING_STATUS_SUCCESS == bReturn)? true: false); -} - -/** - * Restore the NVM data - * - * @param offset[in] The offset of the NVM area to wite backup data to - * @param length[in] the length of the backup data - * @param pNvmData[out] the data to be written to the NVM - * - * @return true if data is written else false - */ -static uint8_t NvmBackupRestore( uint32_t offset, uint8_t length, uint8_t* pNvmData) -{ - SZwaveCommandPackage nvmWrite = { - .eCommandType = EZWAVECOMMANDTYPE_NVM_BACKUP_WRITE, - .uCommandParams.NvmBackupRestore.offset = offset, - .uCommandParams.NvmBackupRestore.length = length, - .uCommandParams.NvmBackupRestore.nvmData = pNvmData - }; - uint8_t bReturn = QueueProtocolCommand((uint8_t*)&nvmWrite); - if (EQUEUENOTIFYING_STATUS_SUCCESS == bReturn) - { - SZwaveCommandStatusPackage cmdStatus = { 0 }; - if (GetCommandResponse(&cmdStatus, EZWAVECOMMANDSTATUS_NVM_BACKUP_RESTORE)) - { - if (cmdStatus.Content.NvmBackupRestoreStatus.status) - { - DPRINT("NVM_WRITE_OK\r\n"); - return true; - } - } - } - DPRINT("NVM_WRITE_ERR\r\n"); - return false; -} - -void func_id_serial_api_nvm_backup_restore(__attribute__((unused)) uint8_t inputLength, uint8_t *pInputBuffer, uint8_t *pOutputBuffer, uint8_t *pOutputLength) -{ - uint32_t NVM_WorkPtr; - uint8_t dataLength; - const uint32_t nvm_storage_size = zpal_nvm_backup_get_size(); - - dataLength = 0; /* Assume nothing is read or written */ - pOutputBuffer[0] = NVMBackupRestoreReturnValueOK; /* Assume not at EOF and no ERROR */ - pOutputBuffer[1] = 0; /* Assume no data */ - pOutputBuffer[2] = 0; - pOutputBuffer[3] = 0; - switch (pInputBuffer[0]) /* operation */ - { - case NVMBackupRestoreOperationOpen: /* open */ - { - if (NVMBackupRestoreOperationClose == NVMBackupRestoreOperationInProgress) - { - /* Lock everyone else out from making changes to the NVM content */ - /* Remember to have some kind of dead-mans-pedal to release lock again. */ - /* TODO */ - // here we have to shut down RF and disable power management and close NVM subsystem - if (NvmBackupOpen()) - { - NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationOpen; - NVM_WorkPtr = 0; - - /* Set the size of the backup/restore. (Number of bytes in flash used for file systems) */ - /* Please note that the special case where nvm_storage_size == 0x10000 is indicated by 0x00 0x00 */ - pOutputBuffer[2] = (uint8_t)(nvm_storage_size >> 8); - pOutputBuffer[3] = (uint8_t)nvm_storage_size; - } - else - { - pOutputBuffer[0] = NVMBackupRestoreReturnValueError; /*Report error we can't open backup restore feature*/ - } - } - } - break; - - case NVMBackupRestoreOperationRead: /* read */ - { - /* Validate input */ - DPRINT("NVM_Read_ \r\n"); - if ((NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationRead) && - (NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationOpen)) - { - DPRINT("NVM_Read_Mis \r\n"); - pOutputBuffer[0] = NVMBackupRestoreReturnValueOperationMismatch; - break; - } - NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationRead; - dataLength = pInputBuffer[1]; /* Requested dataLength */ - NVM_WorkPtr = (((uint32_t)pInputBuffer[2] << 8) + pInputBuffer[3]); - /* Make sure that length isn't larger than the available buffer size */ - if (dataLength > WORK_BUFFER_SIZE) - { - dataLength = WORK_BUFFER_SIZE; - } - /* Make sure that we don't go beyond valid NVM content */ - if ((NVM_WorkPtr + dataLength) >= nvm_storage_size) - { - DPRINT("NVM_Read_EOF \r\n"); - dataLength = (uint8_t)(nvm_storage_size - NVM_WorkPtr); - pOutputBuffer[0] = (uint8_t)NVMBackupRestoreReturnValueEOF; /* Indicate at EOF */ - } - pOutputBuffer[1] = dataLength; - pOutputBuffer[2] = pInputBuffer[2]; - pOutputBuffer[3] = pInputBuffer[3]; - NvmBackupRead(NVM_WorkPtr, dataLength, &pOutputBuffer[4]); - } - break; - - case NVMBackupRestoreOperationWrite: /* write */ - { - /* Validate input */ - if ((NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationWrite) && - (NVMBackupRestoreOperationInProgress != NVMBackupRestoreOperationOpen)) - { - DPRINT("NVM_Write_mis \r\n"); - pOutputBuffer[0] = NVMBackupRestoreReturnValueOperationMismatch; - break; - } - NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationWrite; - dataLength = pInputBuffer[1]; /* Requested dataLength */ - NVM_WorkPtr = (uint32_t)(((uint16_t)pInputBuffer[2] << 8) + pInputBuffer[3]); - if (dataLength > WORK_BUFFER_SIZE) - { - DPRINT("NVM_Write_buff_err \r\n"); - pOutputBuffer[0] = NVMBackupRestoreReturnValueError; /* ERROR: ignore request if length is larger than available buffer */ - } - else - { - /* Make sure that we don't go beyond valid NVM content */ - uint8_t tmp_buf[WORK_BUFFER_SIZE]; - if ((NVM_WorkPtr + dataLength) >= nvm_storage_size) - { - DPRINT("NVM_Write_EOF \r\n"); - dataLength = (uint8_t)(nvm_storage_size - NVM_WorkPtr); - pOutputBuffer[0] = (uint8_t)NVMBackupRestoreReturnValueEOF; /* Indicate at EOF */ - } - memcpy(tmp_buf, (uint8_t*)&pInputBuffer[4], dataLength); - NvmBackupRestore(NVM_WorkPtr , dataLength, tmp_buf); - pOutputBuffer[1] = dataLength; /* Data written */ - pOutputBuffer[2] = pInputBuffer[2]; - pOutputBuffer[3] = pInputBuffer[3]; - - } - dataLength = 0; - } - break; - - case NVMBackupRestoreOperationClose: /* close */ - { - /* Unlock NVM content, so everyone else can make changes again */ - // here we have to shut down RF and disable power management - /* TODO */ - if (NVMBackupRestoreOperationInProgress == NVMBackupRestoreOperationClose) - { - break; - } - if (NvmBackupClose()) - { - NVMBackupRestoreOperationInProgress = NVMBackupRestoreOperationClose; - } - else - { - pOutputBuffer[0] = NVMBackupRestoreReturnValueError; /*repoert error we canot close backup restore feature*/ - } - } - break; - - default: - break; - } - *pOutputLength = dataLength + 4; - -} diff --git a/src/zwave_ncp_serial_api_controller/postbuild.sh b/src/zwave_ncp_serial_api_controller/postbuild.sh deleted file mode 100644 index 46a8a27b..00000000 --- a/src/zwave_ncp_serial_api_controller/postbuild.sh +++ /dev/null @@ -1,174 +0,0 @@ -#!/bin/bash - -# Usage: bash postbuild.sh BOOTLOADER APPLICATION SERIES SDK -# BOOTLOADER: path/to/bootloader.s37 -# APPLICATION: path/to/application/hex (don't include .hex in your argument) -# SERIES: 1 | 2 -# SDK: path/to/sdk -# BUILD_GBL: True of False, depepending on should gbl file should be generated -# APPLICATION_GBL: Name of gbl file to be generated - -# Functions are kept above all global variables to ensure that they are pure -check_return() -{ - ret=$1 - message=$2 - if [ $ret -ne 0 ]; then - echo $message - exit $ret - fi -} -sign_verify_btl() -{ - bootloader="$1" - sign_key="$2" - - echo "Signing bootloader with ECDSA signature" - commander convert ${bootloader} --secureboot --keyfile ${sign_key} --outfile ${bootloader} - check_return $? "Signing bootloader failed" - - echo "Verifying bootloader signature" - commander util verifysign ${bootloader} --verify ${sign_key} - check_return $? "Bootloader signature verification failed" -} - -sign_verify_app() -{ - hex_file="$1" - sign_key="$2" - - echo "Signing application with ECDSA signature" - commander convert ${hex_file} --secureboot --keyfile ${sign_key} --outfile ${hex_file} - check_return $? "Signing application failed" - - echo "Verifying application signature" - commander util verifysign ${hex_file} --verify ${sign_key} - check_return $? "Verifying application signature failed" -} - -generate_gbl_files() -{ - build_gbl="$1" - series="$2" - gbl_file="$3" - hex_file="$4" - sign_key="$5" - encr_key="$6" - - if [[ "$build_gbl" == "False" ]]; then - # Nothing to do - return - fi - - if [[ "$series" == "1" ]]; then - compression="lz4" - fi - - if [[ "$series" == "2" ]]; then - compression="lzma" - fi - - commander gbl create ${gbl_file} --app ${hex_file} --sign ${sign_key} --encrypt ${encr_key} --compress ${compression} - check_return $? "Failed to generate GBL file" -} - -BOOTLOADER=$1 -APPLICATION=$2 -SERIES=$3 -SDK=$4 -BUILD_GBL=$5 -APPLICATION_GBL=$6 - -if [ $# -lt 5 ]; then - # If argument 5 and 6 are not provided, assume that gbl file should be created - # and use the same name as for application - BUILD_GBL="True" - APPLICATION_GBL=$APPLICATION -fi - -# Set this to YES if we want to enable secure boot on ocelot(series2) -# using ECDSA signature verification during startup and EM4 wakeup. -# SL_APPLICATION_SIGNATURE must be set to APPLICATION_SIGNATURE_ECDSA_P256 in the -# application_properties_config.h - -SECURE_BOOT="NO" - -# Use controller keys for Serial API Controller apps (series 2 and series 1, ZG14) and -# sample keys for other apps. -# We have shipped Serial API Controller signed with sample key for other variants than ZG14. -# We must continue doing that so that customers can firmware upgrade existing Serial API -# Controller apps running on ZG13 / ZGM13. -# To check for the variant we must use the bootloader since the application name might not -# contain the OPN name -if [[ "$SERIES" == "2" && $APPLICATION == *"zwave_ncp_serial_api_controller"* ]]; then - SIGN_KEY=${SDK}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key - ENCR_KEY=${SDK}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key -elif [[ "$SERIES" == "1" && $APPLICATION == *"zwave_ncp_serial_api_controller"* && $BOOTLOADER == *"EFR32ZG14"* ]]; then - SIGN_KEY=${SDK}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key - ENCR_KEY=${SDK}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key -else - SIGN_KEY=${SDK}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/sample-keys/sample_sign.key - ENCR_KEY=${SDK}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/sample-keys/sample_encrypt.key -fi - - -# Make a local copy of the bootloader -APPLICATION_DIR="$(dirname "${APPLICATION}")" -BOOTLOADER_NAME="$(basename "${BOOTLOADER}")" -cp -v ${BOOTLOADER} ${APPLICATION_DIR}/${BOOTLOADER_NAME} -BOOTLOADER=${APPLICATION_DIR}/${BOOTLOADER_NAME} - -# Enable secure boot by signing(ECDSA) the application and bootloader images. -if [[ "$SERIES" == "2" && "$SECURE_BOOT" == "YES" ]]; then - # SL_APPLICATION_SIGNATURE must be set to APPLICATION_SIGNATURE_ECDSA_P256 in the - # application_properties_config.h - sign_verify_btl ${BOOTLOADER} ${SIGN_KEY} - sign_verify_app "${APPLICATION}.hex" ${SIGN_KEY} -fi - -echo "Generating gbl file" -generate_gbl_files ${BUILD_GBL} ${SERIES} "${APPLICATION_GBL}.gbl" "${APPLICATION}.hex" ${SIGN_KEY} ${ENCR_KEY} - -# Check if make-v255-file.py exists -if [[ -e "${SDK}/protocol/z-wave/DevTools/internal/make-v255-file.py" ]]; then - echo "Making v255 hex and gbl file" - python ${SDK}/protocol/z-wave/DevTools/internal/make-v255-file.py ${APPLICATION}.out ${APPLICATION}_v255.out - check_return $? "Failed to run make-v255-file.py" - - ${ARM_GCC_DIR}/bin/arm-none-eabi-objcopy -O ihex ${APPLICATION}_v255.out ${APPLICATION}_v255.hex - check_return $? "Failed to run arm-none-eabi-objcopy" - - if [[ "$SERIES" == "2" && "$SECURE_BOOT" == "YES" ]]; then - sign_verify_app "${APPLICATION}_v255.hex" ${SIGN_KEY} - fi - - generate_gbl_files ${BUILD_GBL} ${SERIES} "${APPLICATION_GBL}_v255.gbl" "${APPLICATION}_v255.hex" ${SIGN_KEY} ${ENCR_KEY} - # Cleanup temporary file that was used to generate v255.gbl only - rm "${APPLICATION}_v255.out" -fi - -# Merge is only done for series 2 devices -if [[ "$SERIES" == "2" ]]; then - echo "Combining bootloader and application into one file" - commander convert $BOOTLOADER $APPLICATION.hex --outfile $APPLICATION.hex - check_return $? "Failed to merge bootloader and application" - - # Also merge the _v255 binary if it exists - if [[ -e "${APPLICATION}_v255.hex" ]]; then - echo "Combining bootloader and application v255 into one file" - commander convert $BOOTLOADER ${APPLICATION}_v255.hex --outfile ${APPLICATION}_v255.hex - check_return $? "Failed to merge bootloader and application v255" - fi -fi - -# Generate size report -echo "Generating size report" -${ARM_GCC_DIR}/bin/arm-none-eabi-size -A -x ${APPLICATION}.out > ${APPLICATION}_size.txt -check_return $? "Failed to run arm-none-eabi-size" - -python $SDK/protocol/z-wave/DevTools/size_info_gen.py -i ${APPLICATION}_size.txt -check_return $? "Failed to run size_info_gen.py" - -exit 0 - -# EOF diff --git a/src/zwave_ncp_serial_api_controller/slave_supported_func.h b/src/zwave_ncp_serial_api_controller/slave_supported_func.h deleted file mode 100644 index 2ed9c2ab..00000000 --- a/src/zwave_ncp_serial_api_controller/slave_supported_func.h +++ /dev/null @@ -1,181 +0,0 @@ -/** - * @file - * @copyright 2022 Silicon Laboratories Inc. - */ - -/* Generated file copied from Sdk670 with std. functions supported by static controller. */ -/* Following defines has been disable for build purposes: - * SUPPORT_ZW_AES_ECB - * SUPPORT_ZW_SET_EXT_INT_LEVEL - */ -#define SUPPORT_GET_ROUTING_TABLE_LINE 0 /* ZW_GetRoutingInfo */ -#define SUPPORT_LOCK_ROUTE_RESPONSE 1 /* ZW_LockRoute */ -#define SUPPORT_MEMORY_GET_BUFFER 1 /* MemoryGetBuffer */ -#define SUPPORT_MEMORY_GET_BYTE 1 /* MemoryGetByte */ -#define SUPPORT_MEMORY_GET_ID 1 /* MemoryGetID */ -#define SUPPORT_MEMORY_PUT_BUFFER 1 /* MemoryPutBuffer */ -#define SUPPORT_MEMORY_PUT_BYTE 1 /* MemoryPutByte */ -#define SUPPORT_NVM_GET_ID 1 /* NVM_get_id */ -#define SUPPORT_NVM_EXT_READ_LONG_BUFFER 1 /* NVM_ext_read_long_buffer */ -#define SUPPORT_NVM_EXT_READ_LONG_BYTE 1 /* NVM_ext_read_long_byte */ -#define SUPPORT_NVM_EXT_WRITE_LONG_BYTE 0 /* NVM_ext_write_long_byte */ -#define SUPPORT_NVM_EXT_WRITE_LONG_BUFFER 0 /* NVM_ext_write_long_buffer*/ -#define SUPPORT_NVM_BACKUP_RESTORE 0 /* MemoryGetBuffer */ -#define SUPPORT_PWR_CLK_PD 0 /* PWR_Clk_PD */ -#define SUPPORT_PWR_CLK_PUP 0 /* PWR_Clk_PUp */ -#define SUPPORT_PWR_SELECT_CLK 0 /* PWR_Select_Clk */ -#define SUPPORT_PWR_SETSTOPMODE 0 /* PWR_SetStopMode */ -#define SUPPORT_STORE_HOMEID 0 /* ZW_StoreHomeID */ -#define SUPPORT_STORE_NODEINFO 0 /* notUsed */ -#define SUPPORT_ZW_ADD_NODE_TO_NETWORK 0 /* ZW_AddNodeToNetwork */ -#define SUPPORT_ZW_AES_ECB 0 /* ZW_AES_ECB */ -#define SUPPORT_ZW_ARE_NODES_NEIGHBOURS 0 /* notUsed */ -#define SUPPORT_ZW_ASSIGN_RETURN_ROUTE 0 /* ZW_AssignReturnRoute */ -#define SUPPORT_ZW_ASSIGN_PRIORITY_RETURN_ROUTE 0 /* ZW_AssignPriorityReturnRoute */ -#define SUPPORT_ZW_ASSIGN_SUC_RETURN_ROUTE 0 /* ZW_AssignSUCReturnRoute */ -#define SUPPORT_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE 0 /* ZW_AssignPrioritySUCReturnRoute */ -#define SUPPORT_ZW_CONTROLLER_CHANGE 0 /* ZW_ControllerChange */ -#define SUPPORT_ZW_CREATE_NEW_PRIMARY 0 /* NotUsed */ -#define SUPPORT_ZW_DELETE_RETURN_ROUTE 0 /* ZW_DeleteReturnRoute */ -#define SUPPORT_ZW_DELETE_SUC_RETURN_ROUTE 0 /* ZW_DeleteSUCReturnRoute */ -#define SUPPORT_ZW_ENABLE_SUC 0 /* ZW_EnableSUC */ -#define SUPPORT_ZW_EXPLORE_REQUEST_INCLUSION 1 /* ZW_ExploreRequestInclusion */ -#define SUPPORT_ZW_EXPLORE_REQUEST_EXCLUSION 1 /* ZW_ExploreRequestExclusion */ -#define SUPPORT_ZW_GET_CONTROLLER_CAPABILITIES 0 /* ZW_GetControllerCapabilities */ -#define SUPPORT_ZW_GET_PRIORITY_ROUTE 0 /* ZW_GetPriorityRoute */ -#define SUPPORT_ZW_SET_PRIORITY_ROUTE 0 /* ZW_SetPriorityRoute */ -#define SUPPORT_ZW_GET_NEIGHBOR_COUNT 0 /*notUsed */ -#define SUPPORT_ZW_GET_NODE_PROTOCOL_INFO 1 /* ZW_GetNodeProtocolInfo */ -#define SUPPORT_ZW_GET_PROTOCOL_STATUS 1 /* ZW_GetProtocolStatus */ -#define SUPPORT_ZW_GET_PROTOCOL_VERSION 1 /* ZW_GetProtocolVersion */ -#define SUPPORT_ZW_GET_RANDOM 1 /* ZW_GetRandomWord */ -#define SUPPORT_ZW_GET_ROUTING_MAX 0 /* ZW_GetRoutingMAX */ -#define SUPPORT_ZW_GET_SUC_NODE_ID 1 /* ZW_GetSUCNodeID */ -#define SUPPORT_ZW_GET_VERSION 1 /* ZW_Version */ -#define SUPPORT_ZW_IS_FAILED_NODE_ID 0 /* ZW_isFailedNode */ -#define SUPPORT_ZW_IS_NODE_WITHIN_DIRECT_RANGE 0 /* NotUsed */ -#define SUPPORT_ZW_IS_PRIMARY_CTRL 0 /* NotUsed */ -#define SUPPORT_ZW_IS_WUT_KICKED 0 /* ZW_IsWutKicked */ -#define SUPPORT_ZW_NEW_CONTROLLER 0 /* ZW_NewController */ -#define SUPPORT_ZW_RANDOM 0 /* NotUsed */ -#define SUPPORT_ZW_REDISCOVERY_NEEDED 0 /* ZW_RediscoveryNeeded */ -#define SUPPORT_ZW_REMOVE_FAILED_NODE_ID 0 /* ZW_RemoveFailedNode */ -#define SUPPORT_ZW_REMOVE_NODE_FROM_NETWORK 0 /* ZW_RemoveNodeFromNetwork */ -#define SUPPORT_ZW_REMOVE_NODE_ID_FROM_NETWORK 0 /* ZW_RemoveNodeIDFromNetwork */ -#define SUPPORT_ZW_REPLACE_FAILED_NODE 0 /* ZW_ReplaceFailedNode */ -#define SUPPORT_ZW_REPLICATION_COMMAND_COMPLETE 0 /* ZW_ReplicationReceiveComplete */ -#define SUPPORT_ZW_REPLICATION_SEND_DATA 0 /* ZW_ReplicationSend */ -#define SUPPORT_ZW_REQUEST_NETWORK_UPDATE 1 /* ZW_RequestNetWorkUpdate */ -#define SUPPORT_ZW_REQUEST_NEW_ROUTE_DESTINATIONS 0 /* NotUsed */ -#define SUPPORT_ZW_REQUEST_NODE_INFO 0 /* ZW_RequestNodeInfo */ -#define SUPPORT_ZW_REQUEST_NODE_NEIGHBOR_UPDATE 0 /* ZW_RequestNodeNeighborUpdate */ -#define SUPPORT_ZW_RF_POWER_LEVEL_GET 0 /* ZW_RFPowerLevelGet */ -#define SUPPORT_ZW_RF_POWER_LEVEL_REDISCOVERY_SET 0 /* NotUsed */ -#define SUPPORT_ZW_RF_POWER_LEVEL_SET 0 /* ZW_RFPowerLevelSet */ -#define SUPPORT_ZW_SEND_DATA 1 /* ZW_SendData */ -#define SUPPORT_ZW_SEND_DATA_EX 1 /* ZW_SendDataEx */ -#define SUPPORT_ZW_SEND_DATA_ABORT 1 /* ZW_SendDataAbort */ -#define SUPPORT_ZW_SEND_DATA_META 0 /* ZW_SendDataMeta */ -#define SUPPORT_ZW_SEND_DATA_META_BRIDGE 0 /* ZW_SendDataMeta_Bridge */ -#define SUPPORT_ZW_SEND_DATA_META_MR 0 /* NotUsed */ -#define SUPPORT_ZW_SEND_DATA_MR 0 /* NotUsed */ -#define SUPPORT_ZW_SEND_DATA_MULTI 1 /* ZW_SendDataMulti */ -#define SUPPORT_ZW_SEND_DATA_MULTI_EX 1 /* ZW_SendDataMultiEx */ -#define SUPPORT_ZW_SET_NETWORK_KEY_S0 0 /* ZW_SetNetworkKeyS0 */ -#define SUPPORT_ZW_GET_SECURITY_KEYS 1 /* ZW_GetSecurityKeys */ -#define SUPPORT_ZW_SEND_NODE_INFORMATION 1 /* ZW_SendNodeInformation */ -#define SUPPORT_ZW_SEND_SLAVE_DATA 0 /* ZW_SendSlaveData */ -#define SUPPORT_ZW_SEND_SUC_ID 0 /* ZW_SendSUCID */ -#define SUPPORT_ZW_SEND_TEST_FRAME 0 /* ZW_SendTestFrame */ -#define SUPPORT_ZW_SET_DEFAULT 1 /* ZW_SetDefault */ -#define SUPPORT_ZW_SET_EXT_INT_LEVEL 0 /* ZW_SetExtIntLevel */ -#define SUPPORT_ZW_SET_LEARN_MODE 1 /* ZW_SetLearnMode */ -#define SUPPORT_ZW_SET_LEARN_NODE_STATE 0 /* ZW_SetLearnNodeState */ -#define SUPPORT_ZW_SET_PROMISCUOUS_MODE 0 /* ZW_SetPromiscuousMode */ -#define SUPPORT_ZW_SET_RF_RECEIVE_MODE 1 /* ZW_SetRFReceiveMode */ -#define SUPPORT_ZW_SET_ROUTING_INFO 0 /* NotUsed */ -#define SUPPORT_ZW_SET_ROUTING_MAX 0 /*notUsed*/ -#define SUPPORT_ZW_SET_SLEEP_MODE 0 /* ZW_SetSleepMode */ -#define SUPPORT_ZW_SET_SUC_NODE_ID 1 /* ZW_SetSUCNodeID */ -#define SUPPORT_ZW_SET_WUT_TIMEOUT 0 /* ZW_SetWutTimeout */ -#define SUPPORT_ZW_SUPPORT9600_ONLY 0 /* ZW_Support9600Only */ -#define SUPPORT_ZW_TYPE_LIBRARY 1 /* ZW_Type_Library */ -#define SUPPORT_ZW_WATCHDOG_DISABLE 0 /* ZW_WatchDogDisable */ -#define SUPPORT_ZW_WATCHDOG_ENABLE 0 /* ZW_WatchDogEnable */ -#define SUPPORT_ZW_WATCHDOG_KICK 0 /* ZW_WatchDogKick */ -#define SUPPORT_ZW_WATCHDOG_START 1 /* ZW_WatchDogEnable */ -#define SUPPORT_ZW_WATCHDOG_STOP 1 /* ZW_WatchDogDisable */ -#define SUPPORT_ZW_NVR_GET_VALUE 0 /* ZW_NVRGetValue */ -#define SUPPORT_FUNC_ID_CLEAR_TX_TIMERS 1 /* ZW_ClearTxTimers */ -#define SUPPORT_FUNC_ID_GET_TX_TIMERS 1 /* ZW_GetTxTimer */ -#define SUPPORT_ZW_CLEAR_NETWORK_STATS 1 /* ZW_ClearNetworkStats */ -#define SUPPORT_ZW_GET_NETWORK_STATS 1 /* ZW_GetNetworkStats */ -#define SUPPORT_ZW_GET_BACKGROUND_RSSI 1 /* ZW_GetBackgroundRSSI */ -/* SerialAPI functionality support definitions */ -#define SUPPORT_SEND_DATA_TIMING 1 -/* Enable support for SerialAPI Startup Notification */ -#define SUPPORT_SERIAL_API_STARTUP_NOTIFICATION 1 - -/* Common SerialAPI functionality support definitions */ -#define SUPPORT_SERIAL_API_GET_INIT_DATA 1 -#define SUPPORT_SERIAL_API_APPL_NODE_INFORMATION 1 - -#define SUPPORT_APPLICATION_COMMAND_HANDLER_BRIDGE 0 -#define SUPPORT_APPLICATION_COMMAND_HANDLER 1 - - -#define SUPPORT_SERIAL_API_SET_TIMEOUTS 1 - -#define SUPPORT_SERIAL_API_SOFT_RESET 1 -#define SUPPORT_SERIAL_API_SETUP 1 -#define SUPPORT_ZW_INITIATE_SHUTDOWN 0 -#define SUPPORT_SERIAL_API_GET_LR_NODES 0 -#define SUPPORT_SERIAL_GET_LR_CHANNEL 0 -#define SUPPORT_SERIAL_SET_LR_CHANNEL 0 -#define SUPPORT_SERIAL_SET_LR_VIRTUAL_IDS 0 -#define SUPPORT_SERIAL_ENABLE_RADIO_PTI 0 - -/* ZW_EnableSUC() no longer exists in the library */ - -/* */ -#define SUPPORT_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0 - -#define SUPPORT_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD 1 - -#define SUPPORT_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS 1 - -/**************************************************************************/ -/* Common for all slaves */ -/* SerialAPI functionality support definitions */ -#define SUPPORT_ZW_APPLICATION_UPDATE 1 -#define SUPPORT_APPLICATION_RF_NOTIFY 0 - -#define SUPPORT_ZW_GET_VIRTUAL_NODES 0 /* ZW_GetVirtualNodes */ -#define SUPPORT_ZW_IS_VIRTUAL_NODE 0 /* ZW_IsVirtualNode */ -#define SUPPORT_ZW_SEND_DATA_BRIDGE 0 /* ZW_SendData_Bridge */ -#define SUPPORT_ZW_SEND_DATA_MULTI_BRIDGE 0 /* ZW_SendDataMulti_Bridge */ -#define SUPPORT_ZW_SET_SLAVE_LEARN_MODE 0 /* ZW_SetSlaveLearnMode */ -#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 -/**************************************************************************/ -/* Slave enhanced */ -/* Specific SerialAPI functionality support definitions */ - -#define SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE 0 - -#define SUPPORT_GET_TX_COUNTER 0 -#define SUPPORT_RESET_TX_COUNTER 0 - -#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 -#define SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER 0 -#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 0 - - -#define SUPPORT_SERIAL_API_TEST 0 -#define SUPPORT_ZW_APPLICATION_CONTROLLER_UPDATE 0 - -#define SUPPORT_GET_TX_COUNTER 0 -#define SUPPORT_RESET_TX_COUNTER 0 - -#define SUPPORT_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0 -#define SUPPORT_APPLICATION_SLAVE_COMMAND_HANDLER 0 -#define SUPPORT_ZW_SEND_SLAVE_NODE_INFORMATION 0 diff --git a/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.pintool b/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.pintool deleted file mode 100644 index 28168e56..00000000 --- a/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.pintool +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.slcp b/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.slcp deleted file mode 100644 index 421a99d7..00000000 --- a/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.slcp +++ /dev/null @@ -1,147 +0,0 @@ -# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. -project_name: zwave_ncp_serial_api_controller -label: zwave_ncp_serial_api_controller -description: | - The Serial Applications Programming Interface (Serial API) allows a host to communicate with a Z-Wave chip. The host may be a PC or a less powerful embedded host CPU, such as in a remote control or in a gateway device, and so on. -category: Z-Wave|Apps -filter: -- name: Device Type - value: [NCP] -- name: Project Difficulty - value: [Beginner] -- name: Wireless Technology - value: [Z-Wave] -package: Z-Wave -quality: production -readme: -- {path: README.md} -source: -- {path: app_node_info.c} -- {path: cmd_handlers_invoker.c} -- {path: cmd_handlers.c} -- {path: cmd_get_capabilities.c} -- {path: cmds_dcdc.c} -- {path: cmds_power_management.c} -- {path: cmds_management.c} -- {path: cmds_rf.c} -- {path: cmds_security.c} -- {path: comm_interface.c} -- {path: nvm_backup_restore.c} -- {path: serialapi_file.c} -- {path: app.c} -- {path: utils.c} -- {path: virtual_slave_node_info.c} -- {path: main.c} -tag: [prebuilt_demo] -include: -- path: . - file_list: - - {path: app_node_info.h} - - {path: cmd_handlers.h} - - {path: cmds_management.h} - - {path: cmds_rf.h} - - {path: cmds_security.h} - - {path: comm_interface.h} - - {path: controller_supported_func.h} - - {path: nvm_backup_restore.h} - - {path: serialapi_file.h} - - {path: app.h} - - {path: slave_supported_func.h} - - {path: utils.h} - - {path: virtual_slave_node_info.h} - - {path: zaf_config_security.h} -sdk: {id: gecko_sdk, version: 4.4.4} -toolchain_settings: [] -component: -- {id: ZGM130S037HGN} -- {id: ZW_MIGRATION_FROM_7_20} -- {id: brd4207a} -- {id: device_init} -- {id: emlib_letimer} -- {id: emlib_msc} -- {id: emlib_timer} -- {id: gpiointerrupt} -- {id: mpu} -- {id: sl_system} -- {id: zaf_ncp} -- {id: zw_api_controller} -- {id: zw_api_serialapi} -- {id: zw_api_zw} -- {id: zw_app_timer_deep_sleep} -- {id: zw_appshw_serialapi} -- {id: zw_apputilities_minimal} -- {id: zw_core} -- {id: zw_dcdc_override} -- {id: zw_role_type_central_static_controller} -other_file: -- {path: postbuild.sh} -define: -- {name: APP_PROPERTIES_CONFIG_FILE, value: } -- condition: [device_sdid_95] - name: MAX_CALLBACK_QUEUE - value: '4' -- condition: [device_sdid_95] - name: MAX_UNSOLICITED_QUEUE - value: '4' -config_file: -- {path: config/zaf_config.h} -- {path: config/zaf_config.h} -configuration: -- {name: ZAF_CONFIG_GENERIC_TYPE, value: '0'} -- {name: ZAF_CONFIG_SPECIFIC_TYPE, value: '0'} -- {name: ZAF_CONFIG_PRODUCT_ID, value: '4'} -- {name: NVM3_DEFAULT_MAX_OBJECT_SIZE, value: '1900'} -- {name: NVM3_DEFAULT_CACHE_SIZE, value: '100'} -- {name: SL_BOARD_ENABLE_VCOM, value: '1'} -- {name: SL_DEVICE_INIT_EMU_EM4_STATE, value: emuEM4Hibernate} -- {name: SL_DEVICE_INIT_EMU_EM4_RETAIN_LFRCO, value: '1'} -- {name: SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE, value: emuPinRetentionLatch} -- {name: SL_IOSTREAM_USART_VCOM_CONVERT_BY_DEFAULT_LF_TO_CRLF, value: '1'} -- {name: SL_IOSTREAM_USART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION, value: '0'} -- {name: SL_IOSTREAM_EUSART_VCOM_CONVERT_BY_DEFAULT_LF_TO_CRLF, value: '1'} -- {name: SL_IOSTREAM_EUSART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION, value: '0'} -- {name: configUSE_IDLE_HOOK, value: '1'} -- {name: configTIMER_TASK_PRIORITY, value: '55'} -- condition: [device_series_1] - name: configMAX_SYSCALL_INTERRUPT_PRIORITY - value: '32' -- condition: [device_series_1] - name: configKERNEL_INTERRUPT_PRIORITY - value: '224' -- condition: [device_series_2] - name: configMAX_SYSCALL_INTERRUPT_PRIORITY - value: '16' -- condition: [device_series_2] - name: configKERNEL_INTERRUPT_PRIORITY - value: '112' -- {name: configTIMER_QUEUE_LENGTH, value: '8'} -- {name: SL_DEVICE_INIT_DCDC_BYPASS, value: '1'} -- condition: [device_series_2, device_security_vault] - name: SL_PSA_ITS_USER_MAX_FILES - value: '32' -- condition: [device_series_2, device_security_vault] - name: SL_PSA_KEY_USER_SLOT_COUNT - value: '14' -- condition: [device_series_2] - name: SL_SLEEPTIMER_PERIPHERAL - value: SL_SLEEPTIMER_PERIPHERAL_BURTC -- condition: [device_sdid_95] - name: configTIMER_QUEUE_LENGTH - value: '4' -- condition: [device_sdid_95] - name: configTOTAL_HEAP_SIZE - value: '0' -- condition: [device_sdid_95] - name: SL_STACK_SIZE - value: '1024' -- unless: [device_sdid_95] - name: SL_STACK_SIZE - value: '1280' -- {name: SL_HEAP_SIZE, value: '128'} -- {name: ZAF_CONFIG_INSTALLER_ICON_TYPE, value: '0'} -- {name: ZAF_APP_NAME, value: '"serial_api_controller"'} -- {name: SL_RAIL_UTIL_RAIL_POWER_MANAGER_INIT, value: '0'} -ui_hints: - highlight: - - {path: README.md, focus: true} - diff --git a/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.slps b/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.slps deleted file mode 100644 index 2ec13eff..00000000 --- a/src/zwave_ncp_serial_api_controller/zwave_ncp_serial_api_controller.slps +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/build_project.py b/tools/build_project.py index 5dba1adf..bf9b044a 100755 --- a/tools/build_project.py +++ b/tools/build_project.py @@ -6,7 +6,6 @@ import re import ast import sys -import copy import json import time import shutil @@ -19,21 +18,8 @@ import subprocess import multiprocessing -from xml.etree import ElementTree from ruamel.yaml import YAML -# Matches all known chip and board names. Some varied examples: -# MGM210PB32JIA EFM32GG890F512 MGM12P22F1024GA EZR32WG330F128R69 EFR32FG14P231F256GM32 -CHIP_REGEX = re.compile(r"^(?:[a-z]+\d+){2,5}[a-z]*$", flags=re.IGNORECASE) -BOARD_REGEX = re.compile(r"^brd\d+[a-z](?:_.+)?$", flags=re.IGNORECASE) -GRAPH_COMPONENT_REGEX = re.compile(r"^(\w+)|- (\w+)", flags=re.MULTILINE) - -CHIP_SPECIFIC_COMPONENTS = { - "sl_system": "sl_system", - "sl_memory": "sl_memory", - # There are only a few components whose filename doesn't match the component name - "freertos": "freertos_kernel", -} SLC = ["slc", "--daemon", "--daemon-timeout", "1"] @@ -76,9 +62,7 @@ def get_toolchain_default_paths() -> list[pathlib.Path]: def get_sdk_default_paths() -> list[pathlib.Path]: """Return the path to the SDK.""" if sys.platform == "darwin": - return list( - pathlib.Path("~/SimplicityStudio/SDKs").expanduser().glob("gecko_sdk*") - ) + return list(pathlib.Path("~/SimplicityStudio/SDKs").expanduser().glob("*_sdk*")) return [] @@ -140,48 +124,48 @@ def git(*args: str) -> str: return commit_id -def determine_chip_specific_config_filenames( - slcp_path: pathlib.Path, sdk: pathlib.Path -) -> list[str]: - """Determine the chip-specific config files to remove.""" - proc = subprocess.run( - SLC - + [ - "graph", - "--project-file", - str(slcp_path.absolute()), - "--sdk", - str(sdk.absolute()), - ], - cwd=str(slcp_path.parent), - check=True, - text=True, - capture_output=True, - ) +def load_sdks(paths: list[pathlib.Path]) -> dict[pathlib.Path, str]: + """Load the SDK metadata from the SDKs.""" + sdks = {} - all_components = {a or b for a, b in GRAPH_COMPONENT_REGEX.findall(proc.stdout)} + for sdk in paths: + sdk_file = next(sdk.glob("*_sdk.slcs")) - # Some configs don't seem to be present explicitly in the component graph - config_files = {"sl_memory_config.h"} + try: + sdk_meta = yaml.load(sdk_file.read_text()) + except FileNotFoundError: + LOGGER.warning("SDK %s is not valid, skipping", sdk) + continue - # List all of the SLCC files. There are neary 4,000. - slcc_paths = {slcc.stem.lower(): slcc for slcc in sdk.glob("**/*.slcc")} + sdk_id = sdk_meta["id"] + sdk_version = sdk_meta["sdk_version"] + sdks[sdk] = f"{sdk_id}:{sdk_version}" - for component_id in all_components: - if CHIP_REGEX.match(component_id) or BOARD_REGEX.match(component_id): - pass - elif component_id in CHIP_SPECIFIC_COMPONENTS: - component_id = CHIP_SPECIFIC_COMPONENTS[component_id] - else: - continue + return sdks - slcc = yaml.load(slcc_paths[component_id.lower()].read_text()) - for config_file in slcc.get("config_file", []): - path = pathlib.PurePosixPath(config_file["path"]).name - config_files.add(path) +def load_toolchains(paths: list[pathlib.Path]) -> dict[pathlib.Path, str]: + """Load the toolchain metadata from the toolchains.""" + toolchains = {} - return config_files + for toolchain in paths: + gcc_plugin_version_h = next( + toolchain.glob("lib/gcc/arm-none-eabi/*/plugin/include/plugin-version.h") + ) + version_info = {} + + for line in gcc_plugin_version_h.read_text().split("\n"): + # static char basever[] = "10.3.1"; + if line.startswith("static char") and line.endswith(";"): + name = line.split("[]", 1)[0].split()[-1] + value = ast.literal_eval(line.split(" = ", 1)[1][:-1]) + version_info[name] = value + + toolchains[toolchain] = ( + version_info["basever"] + "." + version_info["datestamp"] + ) + + return toolchains def main(): @@ -278,8 +262,6 @@ def main(): if args.build_dir is None: args.build_dir = pathlib.Path(f"build/{time.time():.0f}_{args.manifest.stem}") - LOGGER.info("Building in %s", args.build_dir.resolve()) - # argparse defaults should be replaced, not extended if args.sdks != get_sdk_default_paths(): args.sdks = args.sdks[len(get_sdk_default_paths()) :] @@ -289,35 +271,66 @@ def main(): manifest = yaml.load(args.manifest.read_text()) + # Ensure we can load the correct SDK and toolchain + sdks = load_sdks(args.sdks) + sdk, sdk_version = next( + (path, version) for path, version in sdks.items() if version == manifest["sdk"] + ) + sdk_name = sdk_version.split(":", 1)[0] + + toolchains = load_toolchains(args.toolchains) + toolchain = next( + path for path, version in toolchains.items() if version == manifest["toolchain"] + ) + for key, override in args.overrides: manifest[key] = override - # First, load the base project + # First, copy the base project into the build dir, under `template/` projects_root = pathlib.Path(__file__).parent.parent base_project_path = projects_root / manifest["base_project"] assert base_project_path.is_relative_to(projects_root) - (base_project_slcp,) = base_project_path.glob("*.slcp") - base_project = yaml.load(base_project_slcp.read_text()) - base_project_name = base_project_path.stem - output_project = copy.deepcopy(base_project) + build_template_path = args.build_dir / "template" - # Strip chip- and board-specific components to modify the base device type - output_project["component"] = [ - c - for c in output_project["component"] - if not CHIP_REGEX.match(c["id"]) and not BOARD_REGEX.match(c["id"]) - ] - output_project["component"].append({"id": manifest["device"]}) + LOGGER.info("Building in %s", args.build_dir.resolve()) + + if args.clean_build_dir: + with contextlib.suppress(OSError): + shutil.rmtree(args.build_dir) + + shutil.copytree( + base_project_path, + build_template_path, + dirs_exist_ok=True, + ignore=lambda dir, contents: [ + "autogen", + ".git", + ".settings", + ".projectlinkstore", + ".project", + ".pdm", + ".cproject", + ".uceditor", + ], + ) + + # We extend the base project with the manifest, since added components could have + # extra dependencies + (base_project_slcp,) = build_template_path.glob("*.slcp") + base_project_name = base_project_slcp.stem + base_project = yaml.load(base_project_slcp.read_text()) # Add new components - output_project["component"].extend(manifest.get("add_components", [])) - output_project["toolchain_settings"].extend(manifest.get("toolchain_settings", [])) + base_project["component"].extend(manifest.get("add_components", [])) + base_project.setdefault("toolchain_settings", []).extend( + manifest.get("toolchain_settings", []) + ) # Remove components for component in manifest.get("remove_components", []): try: - output_project["component"].remove(component) + base_project["component"].remove(component) except ValueError: LOGGER.warning( "Component %s is not present in manifest, cannot remove", component @@ -328,11 +341,11 @@ def main(): for input_config, output_config in [ ( manifest.get("configuration", {}), - output_project.setdefault("configuration", []), + base_project.setdefault("configuration", []), ), ( manifest.get("slcp_defines", {}), - output_project.setdefault("define", []), + base_project.setdefault("define", []), ), ]: for name, value in input_config.items(): @@ -348,115 +361,34 @@ def main(): # Otherwise, append it output_config.append({"name": name, "value": value}) - # Template variables for C defines - value_template_env = { - "git_repo_hash": get_git_commit_id(repo=pathlib.Path(__file__).parent.parent), - "manifest_name": args.manifest.stem, - } - - # Copy the base project into the output directory - if args.clean_build_dir: - with contextlib.suppress(OSError): - shutil.rmtree(args.build_dir) - - args.build_dir.mkdir(exist_ok=True, parents=True) - - shutil.copytree( - base_project_path, - args.build_dir, - dirs_exist_ok=True, - ignore=lambda dir, contents: [ - # XXX: pruning `autogen` is extremely important! - "autogen", - ".git", - ".settings", - ".projectlinkstore", - ".project", - ".pdm", - ".cproject", - ".uceditor", - ], - ) - - # Delete the original project file - (args.build_dir / base_project_slcp.name).unlink() - - # Write the new project SLCP file - with (args.build_dir / f"{base_project_name}.slcp").open("w") as f: - yaml.dump(output_project, f) + # Finally, write out the modified base project + with base_project_slcp.open("w") as f: + yaml.dump(base_project, f) # Create a GBL metadata file with (args.build_dir / "gbl_metadata.yaml").open("w") as f: yaml.dump(manifest["gbl"], f) - # Generate a build directory - cmake_build_root = args.build_dir / f"{base_project_name}_cmake" - shutil.rmtree(cmake_build_root, ignore_errors=True) - - # Find the SDK version required by the project - for sdk in args.sdks: - try: - sdk_meta = yaml.load((sdk / "gecko_sdk.slcs").read_text()) - except FileNotFoundError: - LOGGER.warning("SDK %s is not valid, skipping", sdk) - continue - - assert base_project["sdk"]["id"] == "gecko_sdk" - - LOGGER.info("SDK %s has version %s", sdk, sdk_meta["sdk_version"]) + # Next, generate a chip-specific project from the modified base project + print(f"Generating project for {manifest['device']}") - if base_project["sdk"]["version"] == sdk_meta["sdk_version"]: - LOGGER.info("Version is correct, picking %s", sdk) - break - else: - LOGGER.error("Project SDK version %s not found", base_project["sdk"]["version"]) - sys.exit(1) - - LOGGER.info("Building component graph and identifying board-specific files") - for name in determine_chip_specific_config_filenames( - slcp_path=base_project_slcp, sdk=sdk - ): - try: - (args.build_dir / f"config/{name}").unlink() - except FileNotFoundError: - pass - else: - LOGGER.info("Deleted device-specific config: %s", name) - - # Find the toolchain required by the project - slps_path = (args.build_dir / base_project_name).with_suffix(".slps") - slps_xml = ElementTree.parse(slps_path) - slps_toolchain_id = ( - slps_xml.getroot() - .find(".//properties[@key='projectCommon.toolchainId']") - .attrib["value"] - .split(":")[-1] + # fmt: off + subprocess.run( + SLC + + [ + "generate", + "--with", manifest["device"], + "--project-file", base_project_slcp.resolve(), + "--export-destination", args.build_dir.resolve(), + "--copy-proj-sources", + "--new-project", + "--toolchain", "toolchain_gcc", + "--sdk", sdk, + "--output-type", args.build_system, + ], + check=True, ) - - # Find the correct toolchain - for toolchain in args.toolchains: - gcc_plugin_version_h = next( - toolchain.glob("lib/gcc/arm-none-eabi/*/plugin/include/plugin-version.h") - ) - version_info = {} - - for line in gcc_plugin_version_h.read_text().split("\n"): - # static char basever[] = "10.3.1"; - if line.startswith("static char") and line.endswith(";"): - name = line.split("[]", 1)[0].split()[-1] - value = ast.literal_eval(line.split(" = ", 1)[1][:-1]) - version_info[name] = value - - toolchain_id = version_info["basever"] + "." + version_info["datestamp"] - - LOGGER.info("Toolchain %s has version %s", toolchain, toolchain_id) - - if toolchain_id == slps_toolchain_id: - LOGGER.info("Version is correct, picking %s", toolchain) - break - else: - LOGGER.error("Project toolchain version %s not found", slps_toolchain_id) - sys.exit(1) + # fmt: on # Make sure all extensions are valid for sdk_extension in base_project.get("sdk_extension", []): @@ -466,23 +398,11 @@ def main(): LOGGER.error("Referenced extension not present in SDK: %s", expected_dir) sys.exit(1) - subprocess.run( - SLC - + [ - "generate", - "--project-file", - (args.build_dir / f"{base_project_name}.slcp").resolve(), - "--export-destination", - args.build_dir.resolve(), - "--sdk", - sdk, - "--toolchain", - "toolchain_gcc", - "--output-type", - args.build_system, - ], - check=True, - ) + # Template variables for C defines + value_template_env = { + "git_repo_hash": get_git_commit_id(repo=pathlib.Path(__file__).parent.parent), + "manifest_name": args.manifest.stem, + } # Actually search for C defines within config unused_defines = set(manifest.get("c_defines", {}).keys()) @@ -512,8 +432,7 @@ def main(): # Make sure that we do not have conflicting defines provided over the command line assert not any( - c["name"] == define - for c in output_project.get("define", []) + c["name"] == define for c in base_project.get("define", []) ) new_config_h_lines[index - 1] = "#if 1" elif "#warning" in prev_line: @@ -565,7 +484,7 @@ def main(): extra_compiler_flags = [ f"-ffile-prefix-map={str(src.absolute())}={dst}" for src, dst in { - sdk: "/gecko_sdk", + sdk: f"/{sdk_name}", args.build_dir: "/src", toolchain: "/toolchain", }.items() @@ -599,13 +518,12 @@ def main(): makefile.write_text(makefile_contents) + # fmt: off subprocess.run( - [ + [ "make", - "-C", - args.build_dir, - "-f", - f"{base_project_name}.Makefile", + "-C", args.build_dir, + "-f", f"{base_project_name}.Makefile", f"-j{multiprocessing.cpu_count()}", f"ARM_GCC_DIR={toolchain}", f"POST_BUILD_EXE={args.postbuild}", @@ -613,6 +531,7 @@ def main(): ], check=True, ) + # fmt: on # Read the metadata extracted from the source and build trees extracted_gbl_metadata = json.loads( diff --git a/tools/create_gbl.py b/tools/create_gbl.py index 282d3b06..4167c56a 100755 --- a/tools/create_gbl.py +++ b/tools/create_gbl.py @@ -147,14 +147,15 @@ def main(): # Prepare the GBL metadata metadata = { - "metadata_version": 1, + "metadata_version": 2, "sdk_version": slcp["sdk"]["version"], "fw_type": gbl_metadata.get("fw_type"), + "fw_variant": gbl_metadata.get("fw_variant"), "baudrate": gbl_metadata.get("baudrate"), } # Compute the dynamic metadata - gbl_dynamic = gbl_metadata.get("dynamic", []) + gbl_dynamic = [k for k, v in gbl_metadata.items() if v == "dynamic"] if "ezsp_version" in gbl_dynamic: gbl_dynamic.remove("ezsp_version") @@ -190,10 +191,10 @@ def main(): if "zwave_version" in gbl_dynamic: gbl_dynamic.remove("zwave_version") - zwave_esf_props = parse_properties_file( - (gsdk_path / "protocol/z-wave/esf.properties").read_text() + zwave_props = parse_properties_file( + next((gsdk_path / "protocol/z-wave/").glob("*.properties")).read_text() ) - metadata["zwave_version"] = zwave_esf_props["version"][0] + metadata["zwave_version"] = zwave_props["version"][0] if "ot_rcp_version" in gbl_dynamic: gbl_dynamic.remove("ot_rcp_version") diff --git a/tools/normalize_cproject.py b/tools/normalize_cproject.py deleted file mode 100644 index 70a67dda..00000000 --- a/tools/normalize_cproject.py +++ /dev/null @@ -1,73 +0,0 @@ -import re -import sys -import json -import pathlib -import xml.etree.ElementTree as ET - - -NEWLINE_SENTINEL = "7200872e315d2518866d8a02e8258034" - - -def json_dumps(obj: dict | list) -> str: - """Compactly dump JSON into a string.""" - return json.dumps(obj, separators=(", ", ": "), indent=4) - - -cproject_path = pathlib.Path(sys.argv[1]) -cproject = cproject_path.read_text() - -# Capture all preprocessing directives verbatim -match = re.search(r"(<\?.*\?>)", cproject[:200], flags=re.DOTALL) -processing_instructions = match.group(0) - -tree = ET.fromstring(cproject) - -for storage_module in tree.findall(".//storageModule"): - if "projectCommon.copiedFiles" in storage_module.attrib: - copied_files = json.loads(storage_module.attrib["projectCommon.copiedFiles"]) - copied_files.sort( - key=lambda f: (f["generated"], f["projectPath"], f["version"]) - ) - storage_module.attrib["projectCommon.copiedFiles"] = json_dumps(copied_files) - - if "cppBuildConfig.projectBuiltInState" in storage_module.attrib: - project_built_in_state = json.loads( - storage_module.attrib["cppBuildConfig.projectBuiltInState"] - ) - - for state in project_built_in_state: - if "resolvedOptionsStr" in state: - resolved_options = json.loads(state["resolvedOptionsStr"]) - resolved_options.sort(key=lambda o: o["optionId"]) - - state["resolvedOptionsStr"] = json_dumps(resolved_options) - - if "builtinIncludesStr" in state: - state["builtinIncludesStr"] = NEWLINE_SENTINEL.join( - state["builtinIncludesStr"].split() - ) - - storage_module.attrib["cppBuildConfig.projectBuiltInState"] = json_dumps( - project_built_in_state - ) - - if "projectCommon.referencedModules" in storage_module.attrib: - referenced_modules = json.loads( - storage_module.attrib["projectCommon.referencedModules"] - ) - storage_module.attrib["projectCommon.referencedModules"] = json_dumps( - referenced_modules - ) - -# Normalize self-closing tag spacing -xml_text = ET.tostring(tree, encoding="unicode", xml_declaration=False) -xml_text = xml_text.replace(" />", "/>") - -# Replace newlines with literals -xml_text = xml_text.replace(" ", "\n") -xml_text = xml_text.replace(NEWLINE_SENTINEL, "\n") -xml_text = re.sub(r"\s*\\n\s*", "\n\\n", xml_text, flags=re.MULTILINE) - -# Only touch the filesystem if we need to -if processing_instructions + xml_text != cproject: - cproject_path.write_text(processing_instructions + xml_text)