diff --git a/nordic/trezor/README.md b/nordic/trezor/README.md index 8b29a220f7..b8aa6c798b 100644 --- a/nordic/trezor/README.md +++ b/nordic/trezor/README.md @@ -58,13 +58,13 @@ west update ### Building the Application -Build the application for the t3w1_revA_nrf52832 board: -```sh -cd trezor west build ./trezor-ble -b t3w1_revA_nrf52832 --sysbuild ``` Debug builds can be built using the debug overlay configuration: +Build the application for the t3w1_revA_nrf52832 board: +```sh +cd trezor ```sh west build ./trezor-ble -b t3w1_revA_nrf52832 --sysbuild -- -DOVERLAY_CONFIG=debug.conf ``` diff --git a/nordic/trezor/dts/bindings/sensor/zephyr,example-sensor.yaml b/nordic/trezor/dts/bindings/sensor/zephyr,example-sensor.yaml deleted file mode 100644 index 879fea9ccf..0000000000 --- a/nordic/trezor/dts/bindings/sensor/zephyr,example-sensor.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2021 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -description: | - An example sensor that reads the GPIO level defined in input-gpios. The - purpose of this sensor is to demonstrate how to create out-of-tree drivers. - - Example definition in devicetree: - - example-sensor { - compatible = "zephyr,example-sensor"; - input-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; - }; - -compatible: "zephyr,example-sensor" - -include: base.yaml - -properties: - input-gpios: - type: phandle-array - required: true - description: Input GPIO to be sensed. diff --git a/nordic/trezor/scripts/example_west_command.py b/nordic/trezor/scripts/example_west_command.py deleted file mode 100644 index 7f68d7f4eb..0000000000 --- a/nordic/trezor/scripts/example_west_command.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2019 Foundries.io -# Copyright (c) 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -'''example_west_command.py - -Example of a west extension in the example-application repository.''' - -from west.commands import WestCommand # your extension must subclass this -from west import log # use this for user output - -class ExampleWestCommand(WestCommand): - - def __init__(self): - super().__init__( - 'example-west-command', # gets stored as self.name - 'an example west extension command', # self.help - # self.description: - '''\ -A multi-line description of example-west-command. - -You can split this up into multiple paragraphs and they'll get -reflowed for you. You can also pass -formatter_class=argparse.RawDescriptionHelpFormatter when calling -parser_adder.add_parser() below if you want to keep your line -endings.''') - - def do_add_parser(self, parser_adder): - # This is a bit of boilerplate, which allows you full control over the - # type of argparse handling you want. The "parser_adder" argument is - # the return value of an argparse.ArgumentParser.add_subparsers() call. - parser = parser_adder.add_parser(self.name, - help=self.help, - description=self.description) - - # Add some example options using the standard argparse module API. - parser.add_argument('-o', '--optional', help='an optional argument') - parser.add_argument('required', help='a required argument') - - return parser # gets stored as self.parser - - def do_run(self, args, unknown_args): - # This gets called when the user runs the command, e.g.: - # - # $ west my-command-name -o FOO BAR - # --optional is FOO - # required is BAR - log.inf('--optional is', args.optional) - log.inf('required is', args.required) diff --git a/nordic/trezor/scripts/west-commands.yml b/nordic/trezor/scripts/west-commands.yml deleted file mode 100644 index e32692a901..0000000000 --- a/nordic/trezor/scripts/west-commands.yml +++ /dev/null @@ -1,6 +0,0 @@ -west-commands: - - file: scripts/example_west_command.py - commands: - - name: example-west-command - class: ExampleWestCommand - help: an example west extension command diff --git a/nordic/trezor/tests/lib/custom/CMakeLists.txt b/nordic/trezor/tests/lib/custom/CMakeLists.txt deleted file mode 100644 index 3942740423..0000000000 --- a/nordic/trezor/tests/lib/custom/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2021, Legrand North America, LLC. -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.20.0) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(app_lib_custom_test) - -target_sources(app PRIVATE src/main.c) diff --git a/nordic/trezor/tests/lib/custom/prj.conf b/nordic/trezor/tests/lib/custom/prj.conf deleted file mode 100644 index 512194b109..0000000000 --- a/nordic/trezor/tests/lib/custom/prj.conf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_ZTEST=y -CONFIG_CUSTOM=y diff --git a/nordic/trezor/tests/lib/custom/src/main.c b/nordic/trezor/tests/lib/custom/src/main.c deleted file mode 100644 index c99c798fed..0000000000 --- a/nordic/trezor/tests/lib/custom/src/main.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Legrand North America, LLC. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * @file test custom_lib library - * - * This suite verifies that the methods provided with the custom_lib - * library works correctly. - */ - -#include - -#include - -#include - -ZTEST(custom_lib, test_get_value) { - /* Verify standard behavior */ - zassert_equal(custom_get_value(INT_MIN), INT_MIN, - "get_value failed input of INT_MIN"); - zassert_equal(custom_get_value(INT_MIN + 1), INT_MIN + 1, - "get_value failed input of INT_MIN + 1"); - zassert_equal(custom_get_value(-1), -1, "get_value failed input of -1"); - zassert_equal(custom_get_value(1), 1, "get_value failed input of 1"); - zassert_equal(custom_get_value(INT_MAX - 1), INT_MAX - 1, - "get_value failed input of INT_MAX - 1"); - zassert_equal(custom_get_value(INT_MAX), INT_MAX, - "get_value failed input of INT_MAX"); - - /* Verify override behavior */ - zassert_equal(custom_get_value(0), CONFIG_CUSTOM_GET_VALUE_DEFAULT, - "get_value failed input of 0"); -} - -ZTEST_SUITE(custom_lib, NULL, NULL, NULL, NULL, NULL); diff --git a/nordic/trezor/tests/lib/custom/testcase.yaml b/nordic/trezor/tests/lib/custom/testcase.yaml deleted file mode 100644 index 27f3d8d2c1..0000000000 --- a/nordic/trezor/tests/lib/custom/testcase.yaml +++ /dev/null @@ -1,9 +0,0 @@ -common: - tags: extensibility - integration_platforms: - - custom_plank - - qemu_cortex_m0 -tests: - lib.custom: {} - lib.custom.non_default: - extra_args: CONFIG_CUSTOM_GET_VALUE_DEFAULT=6 diff --git a/nordic/trezor/trezor-ble/VERSION b/nordic/trezor/trezor-ble/VERSION index 16a13732e3..1457d6adb7 100644 --- a/nordic/trezor/trezor-ble/VERSION +++ b/nordic/trezor/trezor-ble/VERSION @@ -1,5 +1,5 @@ -VERSION_MAJOR = 1 -VERSION_MINOR = 0 +VERSION_MAJOR = 0 +VERSION_MINOR = 1 PATCHLEVEL = 0 VERSION_TWEAK = 0 EXTRAVERSION = diff --git a/nordic/trezor/trezor-ble/boards/t3w1_d1_nrf52833.overlay b/nordic/trezor/trezor-ble/boards/t3w1_d1_nrf52833.overlay index 5e8b3f1cda..4ca8c2e550 100644 --- a/nordic/trezor/trezor-ble/boards/t3w1_d1_nrf52833.overlay +++ b/nordic/trezor/trezor-ble/boards/t3w1_d1_nrf52833.overlay @@ -5,7 +5,7 @@ */ / { chosen { - nordic,nus-uart = &uart0; + trezor,trz-uart = &uart0; }; }; diff --git a/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay b/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay index 5e8b3f1cda..4ca8c2e550 100644 --- a/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay +++ b/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay @@ -5,7 +5,7 @@ */ / { chosen { - nordic,nus-uart = &uart0; + trezor,trz-uart = &uart0; }; }; diff --git a/nordic/trezor/trezor-ble/src/trz_comm/uart.c b/nordic/trezor/trezor-ble/src/trz_comm/uart.c index aa39075417..6bd4d4e4ed 100644 --- a/nordic/trezor/trezor-ble/src/trz_comm/uart.c +++ b/nordic/trezor/trezor-ble/src/trz_comm/uart.c @@ -36,7 +36,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #define UART_WAIT_FOR_BUF_DELAY K_MSEC(50) #define UART_WAIT_FOR_RX CONFIG_BT_NUS_UART_RX_WAIT_TIME -static const struct device *uart = DEVICE_DT_GET(DT_CHOSEN(nordic_nus_uart)); +static const struct device *uart = DEVICE_DT_GET(DT_CHOSEN(trezor_trz_uart)); static K_FIFO_DEFINE(fifo_uart_tx_data);