Refactor common IMU code into frc971
This lets us have different main functions for different years to manage
the hardware complexity.
Change-Id: Ia0fbef081265b6301e1d9e9ecc4f1d496f43a9cc
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/imu_reader/BUILD b/frc971/imu_reader/BUILD
new file mode 100644
index 0000000..7d424c4
--- /dev/null
+++ b/frc971/imu_reader/BUILD
@@ -0,0 +1,21 @@
+cc_library(
+ name = "imu",
+ srcs = [
+ "imu.cc",
+ ],
+ hdrs = [
+ "imu.h",
+ ],
+ target_compatible_with = ["@platforms//os:linux"],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//aos/events:epoll",
+ "//aos/events:shm_event_loop",
+ "//aos/util:crc32",
+ "//frc971/wpilib:imu_batch_fbs",
+ "//frc971/wpilib:imu_fbs",
+ "//y2022:constants",
+ "@com_github_google_glog//:glog",
+ "@com_google_absl//absl/types:span",
+ ],
+)