# ESP32 TLE92466ED Driver - 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 TLE92466ED Driver Examples"
  default_app: "driver_integration_test"
  target: "esp32c6"
  idf_versions: ["release/v5.5", "release/v5.4"]
  build_types: [["Debug", "Release"], ["Debug"]]

apps:
  # --------------------------------------------------------------------------
  # Driver Integration Test Suite
  # --------------------------------------------------------------------------
  driver_integration_test:
    description: "Comprehensive driver integration test suite (no hardware required)"
    source_file: "driver_integration_test.cpp"
    category: "test"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: true
    featured: true
    documentation: "docs/readme_driver_integration_test.md"
    test_sections:
      - "INITIALIZATION_TESTS"
      - "MODE_CONTROL_TESTS"
      - "GLOBAL_CONFIGURATION_TESTS"
      - "CHANNEL_CONTROL_TESTS"
      - "CURRENT_CONTROL_TESTS"
      - "PWM_CONFIGURATION_TESTS"
      - "DITHER_CONFIGURATION_TESTS"
      - "DIAGNOSTICS_TESTS"
      - "FAULT_MANAGEMENT_TESTS"
      - "WATCHDOG_TESTS"
      - "GPIO_CONTROL_TESTS"
      - "MULTI_CHANNEL_TESTS"
      - "PARALLEL_OPERATION_TESTS"
      - "ERROR_CONDITION_TESTS"
    features:
      - "Complete driver API validation (40+ tests)"
      - "13 test sections covering all functionality"
      - "Initialization, configuration, control, diagnostics"
      - "Multi-channel and parallel operation testing"
      - "Error condition validation"
      - "FreeRTOS task-based test execution"
      - "GPIO14 progress indicator"
      - "Automatic pass/fail tracking"
      - "No actual solenoids required (driver test only)"

  # --------------------------------------------------------------------------
  # Solenoid Control Test (Real Hardware)
  # --------------------------------------------------------------------------
  solenoid_control_test:
    description: "Real hardware solenoid control test with ADC-based current control"
    source_file: "solenoid_control_test.cpp"
    category: "test"
    idf_versions: ["release/v5.5"]
    build_types: ["Debug", "Release"]
    ci_enabled: false
    featured: true
    documentation: "docs/readme_solenoid_control_test.md"
    hardware_required: true
    features:
      - "Two solenoids: one single channel, one parallel pair"
      - "ADC-based current control (0-3.3V maps to 0-100% current)"
      - "Independent min/max current limits per solenoid"
      - "Real-time current adjustment based on ADC reading"
      - "Proper parallel channel operation validation"
      - "Real hardware testing with actual solenoids"
      - "Continuous monitoring and diagnostics"

# ============================================================================
# BUILD CONFIGURATION (ESP-IDF Standard Build Types)
# ============================================================================

build_config:
  # Standard ESP-IDF/CMake build types
  # These match CMAKE_BUILD_TYPE values in ESP-IDF
  build_types:
    Debug:
      description: "Debug build with symbols, verbose logging, assertions"
      cmake_build_type: "Debug"
      optimization: "-O0"
      debug_level: "-g3"
      defines: ["DEBUG", "TLE92466ED_DEBUG"]

    Release:
      description: "Release build optimized for performance"
      cmake_build_type: "Release"
      optimization: "-O2"
      debug_level: "-g0"
      defines: ["NDEBUG", "TLE92466ED_RELEASE"]

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

ci_config:
  # CI build timeout
  timeout_minutes: 30
  # Fail fast on first error
  fail_fast: false
  # Apps to exclude from specific build types (if needed)
  exclude_combinations: []
  # Apps that require special handling
  special_apps: []
