# Copyright 2022 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

import("//build_overrides/pi_pico.gni")
import("//build_overrides/pigweed.gni")
import("$dir_pigweed_experimental/third_party/imgui/imgui.gni")
import("$dir_pw_build/target_types.gni")
import("$dir_pw_third_party/mcuxpresso/mcuxpresso.gni")
import("app_common_vars.gni")

config("common_flags") {
  cflags = [
    "-DDISPLAY_WIDTH=" + pw_app_common_DISPLAY_WIDTH,
    "-DDISPLAY_HEIGHT=" + pw_app_common_DISPLAY_HEIGHT,
    "-DDISPLAY_RESET_GPIO=" + pw_app_common_DISPLAY_RESET_GPIO,
    "-DBACKLIGHT_GPIO=" + pw_app_common_BACKLIGHT_GPIO,
    "-DFRAMEBUFFER_WIDTH=" + pw_app_common_FRAMEBUFFER_WIDTH,
    "-DFRAMEBUFFER_START_X=" + pw_app_common_FRAMEBUFFER_START_X,
    "-DFRAMEBUFFER_START_Y=" + pw_app_common_FRAMEBUFFER_START_Y,
  ]
}

config("spi_flags") {
  cflags = [
    "-DDISPLAY_CS_GPIO=" + pw_app_common_DISPLAY_CS_GPIO,
    "-DDISPLAY_DC_GPIO=" + pw_app_common_DISPLAY_DC_GPIO,
    "-DSPI_MISO_GPIO=" + pw_app_common_SPI_MISO_GPIO,
    "-DSPI_MOSI_GPIO=" + pw_app_common_SPI_MOSI_GPIO,
    "-DSPI_CLOCK_GPIO=" + pw_app_common_SPI_CLOCK_GPIO,
  ]
}

# STM32 uses a macro to concatenate two strings to create a new constant that
# is from the SDK. These "LCD*" constants are substrings in those SDK constants
# and therefore must have specific names.
config("spi_stm32_flags") {
  cflags = [
    "-DSPI_MISO_GPIO=" + pw_app_common_SPI_MISO_GPIO,
    "-DSPI_MOSI_GPIO=" + pw_app_common_SPI_MOSI_GPIO,
    "-DSPI_CLOCK_GPIO=" + pw_app_common_SPI_CLOCK_GPIO,
    "-DLCD_CS_PORT_CHAR=" + pw_app_common_STM32_DISPLAY_CS_PORT,
    "-DLCD_CS_PIN_NUM=" + pw_app_common_DISPLAY_CS_GPIO,
    "-DLCD_DC_PORT_CHAR=" + pw_app_common_STM32_DISPLAY_DC_PORT,
    "-DLCD_DC_PIN_NUM=" + pw_app_common_DISPLAY_DC_GPIO,
    "-DLCD_RST_PIN_NUM=" + pw_app_common_DISPLAY_RESET_GPIO,
  ]
}

pw_source_set("stm32cube") {
  public_configs = [
    ":common_flags",
    ":spi_stm32_flags",
  ]
  deps = [
    "$dir_pigweed_experimental/applications/app_common:app_common.facade",
    "$dir_pw_digital_io_stm32cube",
    "$dir_pw_display",
    "$dir_pw_display_driver_ili9341",
    "$dir_pw_framebuffer_pool",
    "$dir_pw_spi_stm32cube",
    "$dir_pw_sync:borrow",
    "$dir_pw_sync:mutex",
  ]
  sources = [ "common_stm32cube.cc" ]
}

pw_source_set("stm32") {
  deps = [
    "$dir_pigweed_experimental/applications/app_common:app_common.facade",
    "$dir_pw_display_driver_null",
  ]
  sources = [ "common_stm32.cc" ]
}

pw_source_set("arduino") {
  public_configs = [
    ":common_flags",
    ":spi_flags",
  ]
  deps = [
    "$dir_pigweed_experimental/applications/app_common:app_common.facade",
    "$dir_pw_digital_io_arduino",
    "$dir_pw_display",
    "$dir_pw_display_driver_ili9341",
    "$dir_pw_spi_arduino",
    "$dir_pw_sync:borrow",
    "$dir_pw_sync:mutex",
    "$dir_pw_third_party/arduino:arduino_core_sources",
  ]
  sources = [ "common_arduino.cc" ]
  remove_configs = [ "$dir_pw_build:strict_warnings" ]
}

if (pw_third_party_mcuxpresso_SDK != "") {
  pw_source_set("mimxrt595") {
    public_configs = [ ":common_flags" ]
    deps = [
      "$dir_pigweed_experimental/applications/app_common:app_common.facade",
      "$dir_pw_display",
      "$dir_pw_display_driver_mipi_dsi",
      "$dir_pw_framebuffer_pool_mcuxpresso",
      "$dir_pw_mipi_dsi_mcuxpresso",
      "$pw_third_party_mcuxpresso_SDK",
    ]
    sources = [ "common_mimxrt595.cc" ]
  }
}

_pico_common_deps = [
  "$PICO_ROOT/src/common/pico_base",
  "$PICO_ROOT/src/common/pico_stdlib",
  "$PICO_ROOT/src/rp2_common/hardware_pwm",
  "$PICO_ROOT/src/rp2_common/hardware_spi",
  "$dir_pigweed_experimental/applications/app_common:app_common.facade",
  "$dir_pw_digital_io_pico",
  "$dir_pw_display",
  "$dir_pw_framebuffer_pool",
  "$dir_pw_log",
  "$dir_pw_spi_pico",
  "$dir_pw_sync:borrow",
  "$dir_pw_sync:mutex",
]

pw_source_set("pico_ili9341") {
  public_configs = [
    ":common_flags",
    ":spi_flags",
  ]
  cflags = [ "-DDISPLAY_TYPE_ILI9341" ]
  deps = _pico_common_deps
  deps += [ "$dir_pw_display_driver_ili9341" ]
  sources = [ "common_pico.cc" ]
  remove_configs = [ "$dir_pw_build:strict_warnings" ]
}

pw_source_set("pico_st7789") {
  public_configs = [
    ":common_flags",
    ":spi_flags",
  ]
  cflags = [ "-DDISPLAY_TYPE_ST7789" ]
  deps = _pico_common_deps
  deps += [ "$dir_pw_display_driver_st7789" ]
  sources = [ "common_pico.cc" ]
  remove_configs = [ "$dir_pw_build:strict_warnings" ]
}

pw_source_set("pico_st7735") {
  public_configs = [
    ":common_flags",
    ":spi_flags",
  ]
  cflags = [ "-DDISPLAY_TYPE_ST7735" ]
  deps = _pico_common_deps
  deps += [ "$dir_pw_display_driver_st7735" ]
  sources = [ "common_pico.cc" ]
  remove_configs = [ "$dir_pw_build:strict_warnings" ]
}

pw_source_set("host_imgui") {
  public_configs = [ ":common_flags" ]
  deps = [
    "$dir_pigweed_experimental/applications/app_common:app_common.facade",
    "$dir_pw_display_driver_imgui",
    "$dir_pw_display_imgui",
    "$dir_pw_framebuffer_pool",
  ]
  sources = [ "common_host_imgui.cc" ]
  remove_configs = []
  if (host_os == "linux") {
    remove_configs += [ "$dir_pw_toolchain/host_clang:linux_sysroot" ]
  }
}

pw_source_set("host_null") {
  public_configs = [ ":common_flags" ]
  deps = [
    "$dir_pigweed_experimental/applications/app_common:app_common.facade",
    "$dir_pw_display",
    "$dir_pw_display_driver_null",
  ]
  sources = [ "common_host_null.cc" ]
}
