diff options
Diffstat (limited to 'zephyr/test/i2c')
-rw-r--r-- | zephyr/test/i2c/CMakeLists.txt | 9 | ||||
-rw-r--r-- | zephyr/test/i2c/overlay.dts | 23 | ||||
-rw-r--r-- | zephyr/test/i2c/prj.conf | 22 | ||||
-rw-r--r-- | zephyr/test/i2c/src/main.c | 34 | ||||
-rw-r--r-- | zephyr/test/i2c/zmake.yaml | 14 |
5 files changed, 0 insertions, 102 deletions
diff --git a/zephyr/test/i2c/CMakeLists.txt b/zephyr/test/i2c/CMakeLists.txt deleted file mode 100644 index 214177013f..0000000000 --- a/zephyr/test/i2c/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2020 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -cmake_minimum_required(VERSION 3.13.1) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(i2c) - -target_sources(app PRIVATE src/main.c) diff --git a/zephyr/test/i2c/overlay.dts b/zephyr/test/i2c/overlay.dts deleted file mode 100644 index 2c56ee3b7a..0000000000 --- a/zephyr/test/i2c/overlay.dts +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2020 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/ { - named-i2c-ports { - compatible = "named-i2c-ports"; - accel-0 { - i2c-port = <&bmi_i2c>; - enum-name = "I2C_PORT_ACCEL"; - label = "ACCEL_0"; - }; - }; -}; - -&i2c0 { - bmi_i2c: bmi@68 { - compatible = "bosch,bmi160"; - reg = <0x68>; - label = "accel-i2c"; - }; -}; diff --git a/zephyr/test/i2c/prj.conf b/zephyr/test/i2c/prj.conf deleted file mode 100644 index 8023c0492b..0000000000 --- a/zephyr/test/i2c/prj.conf +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2020 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -CONFIG_ZTEST=y -CONFIG_LOG=y - -CONFIG_EMUL=y -CONFIG_I2C=y -CONFIG_I2C_EMUL=y -CONFIG_BMI160=y -CONFIG_EMUL_BMI160=y -CONFIG_SENSOR=y -CONFIG_BMI160_TRIGGER_NONE=y - -CONFIG_PLATFORM_EC=y -CONFIG_PLATFORM_EC_I2C=y -CONFIG_CROS_EC=y - -# TODO(b/173711210) figure out why SPI is required here when we're not using it. -CONFIG_SPI=y -CONFIG_SPI_EMUL=y diff --git a/zephyr/test/i2c/src/main.c b/zephyr/test/i2c/src/main.c deleted file mode 100644 index 064ce78816..0000000000 --- a/zephyr/test/i2c/src/main.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include <devicetree.h> -#include <ztest.h> - -#include "common.h" -#include "i2c/i2c.h" - -/* Unused: required for shimming i2c. */ -void watchdog_reload(void) -{ -} - -static void test_i2c_port_count(void) -{ - zassert_equal(NAMED_I2C(accel_0), 0, - "accel_0 expected to be 0 but was %d", - NAMED_I2C(accel_0)); - zassert_equal(I2C_PORT_COUNT, 1, - "I2C_PORT_COUNT expected to be 1 but was %d", - I2C_PORT_COUNT); -} - -/* Test case main entry. */ -void test_main(void) -{ - ztest_test_suite(test_i2c, - ztest_user_unit_test(test_i2c_port_count)); - ztest_run_test_suite(test_i2c); -} - diff --git a/zephyr/test/i2c/zmake.yaml b/zephyr/test/i2c/zmake.yaml deleted file mode 100644 index f5e794c0f8..0000000000 --- a/zephyr/test/i2c/zmake.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2020 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -board: native_posix -supported-zephyr-versions: - - v2.6 -supported-toolchains: - - llvm - - host -output-type: elf -is-test: true -dts-overlays: - - overlay.dts |