| # Copyright 2023 Google LLC |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| filegroup( |
| name = "headers", |
| srcs = glob(["*.h"]), |
| ) |
| |
| filegroup( |
| name = "image_files", |
| srcs = glob(["*.jpg"]), |
| ) |
| |
| # grayscale, 320*240 |
| # TODO(ykwang): Load image from spi instead of using c include file. |
| genrule( |
| name = "hps_images", |
| srcs = [ |
| ":hps_0.jpg", |
| ":hps_1.jpg", |
| ":hps_2.jpg", |
| ":hps_3.jpg", |
| ":hps_4.jpg", |
| ":hps_5.jpg", |
| ":hps_6.jpg", |
| ], |
| outs = [ |
| "hps_images.h", |
| ], |
| cmd = """$(location //util:image_to_c) \ |
| --input_shape 320 240 \ |
| --input_mode L \ |
| --input=$(location :hps_0.jpg) \ |
| --input=$(location :hps_1.jpg) \ |
| --input=$(location :hps_2.jpg) \ |
| --input=$(location :hps_3.jpg) \ |
| --input=$(location :hps_4.jpg) \ |
| --input=$(location :hps_5.jpg) \ |
| --input=$(location :hps_6.jpg) \ |
| --output=$@""", |
| tools = [ |
| "//util:image_to_c", |
| ], |
| ) |