# ESP32 HardFOC Interface Wrapper - Apps Configuration
# This file centralizes all app definitions, their source files, and metadata
# Used by build scripts, flash scripts, CI workflows, and CMake
#
# HIERARCHICAL CONFIGURATION:
# - Global settings in 'metadata' section apply to all apps by default
# - Individual apps can override 'idf_versions' and 'build_types' if needed
# - Apps without overrides use global settings automatically

version: "1.0"
metadata:
  project: "ESP32 HardFOC Interface Wrapper"
  default_app: "ascii_art"
  target: "esp32c6"
  idf_versions: ["release/v5.5", "release/v5.4"]
  build_types: [["Debug", "Release"], ["Debug"]]

apps:
  ascii_art:
    description: "ASCII art generator example"
    source_file: "AsciiArtComprehensiveTest.cpp"
    category: "utility"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true

  gpio_test:
    description: "GPIO peripheral comprehensive testing"
    source_file: "GpioComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true

  adc_test:
    description: "ADC peripheral comprehensive testing"
    source_file: "AdcComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true

  uart_test:
    description: "UART peripheral comprehensive testing"
    source_file: "UartComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  spi_test:
    description: "SPI peripheral comprehensive testing"
    source_file: "SpiComprehensiveTest.cpp"
    category: "peripheral"
    # Override global: use only ESP-IDF v5.5 with Debug and Release
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  i2c_test:
    description: "I2C peripheral comprehensive testing"
    source_file: "I2cComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  pwm_test:
    description: "PWM peripheral comprehensive testing"
    source_file: "PwmComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  can_test:
    description: "CAN peripheral comprehensive testing"
    source_file: "CanComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  pio_test:
    description: "PIO/RMT comprehensive testing"
    source_file: "PioComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true
    documentation: "docs/README_PIO_TEST.md"
    enhanced_features:
      - "Channel-specific callbacks with user data"
      - "Resolution_hz usage for direct ESP-IDF compatibility"
      - "ESP32 variant-specific channel validation (all variants supported)"
      - "Enhanced clock divider calculation with overflow protection"
      - "ASCII Art test result decoration"
      - "Comprehensive WS2812 timing validation"
      - "Automated loopback testing capabilities"

  temperature_test:
    description: "Temperature sensor comprehensive testing"
    source_file: "TemperatureComprehensiveTest.cpp"
    category: "sensor"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  nvs_test:
    description: "NVS (Non-Volatile Storage) comprehensive testing"
    source_file: "NvsComprehensiveTest.cpp"
    category: "storage"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false
    documentation: "docs/README_NVS_TEST.md"

  timer_test:
    description: "Timer peripheral comprehensive testing"
    source_file: "TimerComprehensiveTest.cpp"
    category: "peripheral"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  logger_test:
    description: "Logger system comprehensive testing"
    source_file: "LoggerComprehensiveTest.cpp"
    category: "utility"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  wifi_test:
    description: "WiFi connectivity comprehensive testing"
    source_file: "WifiComprehensiveTest.cpp"
    category: "connectivity"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: false

  bluetooth_test:
    description: "Comprehensive Bluetooth testing suite"
    source_file: "BluetoothComprehensiveTest.cpp"
    category: "connectivity"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true

  dog_test:
    description: "DigitalOutputGuard comprehensive testing suite"
    source_file: "DigitalOutputGuardComprehensiveTest.cpp"
    category: "utility"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true

build_config:
  build_types:
    Debug:
      description: "Debug symbols, verbose logging, assertions enabled"
      cmake_build_type: "Debug"
      optimization: "-O0"
      debug_level: "-g3"
      defines: ["DEBUG"]
    Release:
      description: "Release build optimized for performance and size"
      cmake_build_type: "Release"
      optimization: "-O2"
      debug_level: "-g0"
      defines: ["NDEBUG"]
    RelWithDebInfo:
      description: "Release build with debug info"
      cmake_build_type: "RelWithDebInfo"
      optimization: "-O2"
      debug_level: "-g2"
      defines: ["NDEBUG"]
    MinSizeRel:
      description: "Release build optimized for size"
      cmake_build_type: "MinSizeRel"
      optimization: "-Os"
      debug_level: "-g0"
      defines: ["NDEBUG"]

  build_directory_pattern: "build-app-{app_type}-type-{build_type}-target-{target}-idf-{idf_version}"
  project_name_pattern: "esp32_iid_{app_type}_app"

ci_config:
  timeout_minutes: 30
  fail_fast: false
  # Apps to exclude from specific build types (if needed)
  exclude_combinations: []
  # Apps that require special handling
  special_apps: []

