blob: 360fc935a2caca60d9cad106e4f3e9f1f6880ad7 [file] [log] [blame]
Kevin Zeng62683b62021-03-18 12:22:08 -07001# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_build/target_types.gni")
18import("$dir_pw_chrono/backend.gni")
19import("$dir_pw_docgen/docs.gni")
20import("$dir_pw_unit_test/test.gni")
21
22config("public_include_path") {
23 include_dirs = [ "public" ]
24}
25
26pw_source_set("pw_analog") {
27 public_configs = [ ":public_include_path" ]
28 public_deps = [
29 "$dir_pw_chrono:system_clock",
30 "$dir_pw_result",
31 ]
32 public = [ "public/pw_analog/analog_input.h" ]
33}
34
Kevin Zengc24e3322021-05-04 20:20:53 -070035pw_source_set("microvolt_input") {
36 public_configs = [ ":public_include_path" ]
37 public_deps = [
38 ":pw_analog",
39 "$dir_pw_chrono:system_clock",
40 "$dir_pw_result",
41 "$dir_pw_status",
42 ]
43 public = [ "public/pw_analog/microvolt_input.h" ]
44}
45
Kevin Zeng62683b62021-03-18 12:22:08 -070046pw_test_group("tests") {
Kevin Zengc24e3322021-05-04 20:20:53 -070047 tests = [
48 ":analog_input_test",
49 ":microvolt_input_test",
50 ]
Kevin Zeng62683b62021-03-18 12:22:08 -070051}
52
53pw_test("analog_input_test") {
54 enable_if = pw_chrono_SYSTEM_CLOCK_BACKEND != ""
55 sources = [ "analog_input_test.cc" ]
56 deps = [ ":pw_analog" ]
57}
58
Kevin Zengc24e3322021-05-04 20:20:53 -070059pw_test("microvolt_input_test") {
60 enable_if = pw_chrono_SYSTEM_CLOCK_BACKEND != ""
61 sources = [ "microvolt_input_test.cc" ]
62 deps = [ ":pw_analog" ]
63}
64
Kevin Zeng62683b62021-03-18 12:22:08 -070065pw_doc_group("docs") {
66 sources = [ "docs.rst" ]
67}