blob: c8b63e9c8b572f40ee02daf19d7d2f30bbccb39d [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",
Brian Silverman4f958792019-02-16 18:20:04 -080074 "//aos/containers:sized_array",
Brian Silverman55c62022018-09-03 19:13:44 -070075 "//motors:util",
76 "//motors/core",
77 "//third_party/GSL",
78 ],
Brian Silverman8d3816a2017-07-03 18:52:15 -070079)
Brian Silvermancabadaf2018-09-03 19:36:44 -070080
81cc_library(
82 name = "adc_dma",
83 srcs = ["adc_dma.cc"],
84 hdrs = ["adc_dma.h"],
85 restricted_to = mcu_cpus,
86 visibility = ["//visibility:public"],
87 deps = [
88 ":configuration",
89 "//motors:util",
90 "//motors/core",
91 ],
92)
Brian Silverman333fc9e2019-02-24 15:09:17 -080093
94cc_library(
95 name = "spi",
96 srcs = ["spi.cc"],
97 hdrs = ["spi.h"],
98 restricted_to = mcu_cpus,
99 visibility = ["//visibility:public"],
100 deps = [
101 ":uart_buffer",
102 "//motors:util",
103 "//motors/core",
104 "//third_party/GSL",
105 ],
106)