Add time of flight controller firmware

The tof controller uses 2 lidar sensors to estimate the center of the held cone
in the end effector and communicates it back to the roborio over pwm so that
we can compensate.

This change also vendors in ST's library for the VL53L1X and adds a
platform specific i2c implementation for the raspberry pi pico.

Signed-off-by: Ravago Jones <ravagojones@gmail.com>
Change-Id: Id05c3b539df9c5a1ee4591e0abaf0a07df85674a
diff --git a/y2023/tof_controller/BUILD b/y2023/tof_controller/BUILD
new file mode 100644
index 0000000..e3045b0
--- /dev/null
+++ b/y2023/tof_controller/BUILD
@@ -0,0 +1,27 @@
+load("//third_party/pico-sdk:hex.bzl", "uf2_from_elf")
+
+cc_binary(
+    name = "tof_controller.elf",
+    srcs = [
+        "tof_controller.cc",
+        "//third_party/pico-sdk/src/rp2_common/boot_stage2:bs2_default_padded_checksummed.S",
+    ],
+    additional_linker_inputs = [
+        "//third_party/pico-sdk:src/rp2_common/pico_standard_link/memmap_default.ld",
+    ],
+    linkopts = [
+        "-Wl,--script=third_party/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld",
+    ],
+    target_compatible_with = [
+        "@platforms//os:none",
+        "//tools/platforms/hardware:cortex_m0plus",
+    ],
+    deps = [
+        "//third_party/pico-sdk",
+        "@vl53l1x_ultra_lite_driver_api//:VL53L1X",
+    ],
+)
+
+uf2_from_elf(
+    name = "tof_controller",
+)