Make the standard time code work on a Teensy
This is a much nicer API to work with.
Change-Id: I5a654e8d953e5b64b76192d5b4ddb947b666d22f
diff --git a/aos/time/BUILD b/aos/time/BUILD
index b76cd99..7fbd0fb 100644
--- a/aos/time/BUILD
+++ b/aos/time/BUILD
@@ -1,5 +1,7 @@
package(default_visibility = ["//visibility:public"])
+load("//tools:environments.bzl", "mcu_cpus")
+
cc_library(
name = "time",
srcs = [
@@ -8,12 +10,24 @@
hdrs = [
"time.h",
],
+ compatible_with = mcu_cpus,
deps = [
"//aos:macros",
- "//aos/mutex:mutex",
- "//aos/logging",
- "//aos/ipc_lib:shared_mem",
- ],
+ "//aos/type_traits",
+ ] + select({
+ # TODO(Brian): Deduplicate this (both CPU names and values).
+ "//tools:cpu_cortex_m4f": [
+ "//motors/core",
+ ],
+ "//tools:cpu_cortex_m4f_k22": [
+ "//motors/core",
+ ],
+ "//conditions:default": [
+ "//aos/ipc_lib:shared_mem",
+ "//aos/logging",
+ "//aos/mutex",
+ ],
+ }),
)
cc_test(
@@ -24,7 +38,7 @@
deps = [
":time",
"//aos/logging",
- "//aos/util:death_test_log_implementation",
"//aos/testing:googletest",
+ "//aos/util:death_test_log_implementation",
],
)