blob: ef2e833f445611e071058e30a0c42a8715ce7560 [file] [log] [blame]
Brian Silverman8d3816a2017-07-03 18:52:15 -07001load("//tools:environments.bzl", "mcu_cpus")
2
3cc_library(
Brian Silverman55c62022018-09-03 19:13:44 -07004 name = "adc",
5 srcs = [
6 "adc.cc",
7 ],
8 hdrs = [
9 "adc.h",
10 ],
11 restricted_to = mcu_cpus,
12 visibility = ["//visibility:public"],
13 deps = [
14 ":configuration",
15 "//motors:util",
16 "//motors/core",
17 ],
Brian Silverman8d3816a2017-07-03 18:52:15 -070018)
19
20cc_library(
Brian Silverman55c62022018-09-03 19:13:44 -070021 name = "configuration",
22 hdrs = [
23 "configuration.h",
24 ],
25 restricted_to = mcu_cpus,
26 visibility = ["//visibility:public"],
Brian Silverman8d3816a2017-07-03 18:52:15 -070027)
28
29cc_library(
Brian Silverman55c62022018-09-03 19:13:44 -070030 name = "can",
31 srcs = [
32 "can.c",
33 ],
34 hdrs = [
35 "can.h",
36 ],
37 restricted_to = mcu_cpus,
38 visibility = ["//visibility:public"],
39 deps = [
40 "//motors:util",
41 "//motors/core",
42 ],
43)
44
45cc_library(
46 name = "uart_buffer",
47 hdrs = ["uart_buffer.h"],
48 compatible_with = mcu_cpus,
49 visibility = ["//visibility:public"],
50 deps = [
51 "//third_party/GSL",
52 ],
53)
54
55cc_test(
56 name = "uart_buffer_test",
57 srcs = [
58 "uart_buffer_test.cc",
59 ],
60 deps = [
61 ":uart_buffer",
62 "//aos/testing:googletest",
63 ],
64)
65
66cc_library(
67 name = "uart",
68 srcs = ["uart.cc"],
69 hdrs = ["uart.h"],
70 restricted_to = mcu_cpus,
71 visibility = ["//visibility:public"],
72 deps = [
73 ":uart_buffer",
74 "//motors:util",
75 "//motors/core",
76 "//third_party/GSL",
77 ],
Brian Silverman8d3816a2017-07-03 18:52:15 -070078)
Brian Silvermancabadaf2018-09-03 19:36:44 -070079
80cc_library(
81 name = "adc_dma",
82 srcs = ["adc_dma.cc"],
83 hdrs = ["adc_dma.h"],
84 restricted_to = mcu_cpus,
85 visibility = ["//visibility:public"],
86 deps = [
87 ":configuration",
88 "//motors:util",
89 "//motors/core",
90 ],
91)