|
TLE92466ED Driver 0.1.0-dev
Modern C++20 driver for Infineon TLE92466ED Six-Channel Low-Side Solenoid Driver
|
Comprehensive Integration Test Suite for TLE92466ED Driver. More...
#include <stdio.h>#include <memory>#include <array>#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "esp_log.h"#include "esp_system.h"#include "tle92466ed.hpp"#include "esp32_tle92466ed_bus.hpp"#include "TestFramework.h"Macros | |
| #define | ENABLE_INITIALIZATION_TESTS 1 |
| #define | ENABLE_MODE_CONTROL_TESTS 1 |
| #define | ENABLE_GLOBAL_CONFIG_TESTS 1 |
| #define | ENABLE_CHANNEL_CONTROL_TESTS 1 |
| #define | ENABLE_CURRENT_CONTROL_TESTS 1 |
| #define | ENABLE_PWM_CONFIG_TESTS 1 |
| #define | ENABLE_DITHER_CONFIG_TESTS 1 |
| #define | ENABLE_DIAGNOSTICS_TESTS 1 |
| #define | ENABLE_FAULT_MANAGEMENT_TESTS 1 |
| #define | ENABLE_WATCHDOG_TESTS 1 |
| #define | ENABLE_GPIO_CONTROL_TESTS 1 |
| #define | ENABLE_MULTI_CHANNEL_TESTS 1 |
| #define | ENABLE_PARALLEL_OPERATION_TESTS 1 |
| #define | ENABLE_ERROR_CONDITION_TESTS 1 |
Functions | |
| static bool | ensure_config_mode () noexcept |
| Ensure device is in Config Mode. | |
| static bool | ensure_mission_mode () noexcept |
| Ensure device is in Mission Mode. | |
| static void | print_device_status (const DeviceStatus &status) noexcept |
| Print device status. | |
| static void | print_channel_diagnostics (Channel channel, const ChannelDiagnostics &diag) noexcept |
| Print channel diagnostics. | |
| static bool | test_hal_initialization () noexcept |
| Test HAL initialization. | |
| static bool | test_driver_initialization () noexcept |
| Test TLE92466ED driver initialization. | |
| static bool | test_chip_id () noexcept |
| Test chip ID reading. | |
| static bool | test_ic_version () noexcept |
| Test IC version reading. | |
| static bool | test_device_verification () noexcept |
| Test device verification. | |
| static bool | test_enter_mission_mode () noexcept |
| Test entering Mission Mode. | |
| static bool | test_enter_config_mode () noexcept |
| Test entering Config Mode. | |
| static bool | test_mode_transitions () noexcept |
| Test mode transitions. | |
| static bool | test_crc_control () noexcept |
| Test CRC enable/disable. | |
| static bool | test_vbat_thresholds () noexcept |
| Test VBAT threshold configuration. | |
| static bool | test_global_configuration () noexcept |
| Test global configuration. | |
| static bool | test_single_channel_control () noexcept |
| Test single channel enable/disable. | |
| static bool | test_all_channels_control () noexcept |
| Test all channels enable/disable. | |
| static bool | test_channel_mask_control () noexcept |
| Test channel mask control. | |
| static bool | test_channel_mode_configuration () noexcept |
| Test channel mode configuration. | |
| static bool | test_current_setpoint () noexcept |
| Test current setpoint setting. | |
| static bool | test_current_ramping () noexcept |
| Test current ramping. | |
| static bool | test_pwm_period_configuration () noexcept |
| Test PWM period configuration (high-level API) | |
| static bool | test_pwm_period_raw () noexcept |
| Test PWM period configuration (raw API) | |
| static bool | test_dither_configuration () noexcept |
| Test dither configuration (high-level API) | |
| static bool | test_dither_raw () noexcept |
| Test dither configuration (raw API) | |
| static bool | test_device_status () noexcept |
| Test device status reading. | |
| static bool | test_channel_diagnostics () noexcept |
| Test channel diagnostics reading. | |
| static bool | test_voltage_reading () noexcept |
| Test voltage reading. | |
| static bool | test_current_reading () noexcept |
| Test current and duty cycle reading. | |
| static bool | test_all_channels_telemetry () noexcept |
| Test comprehensive telemetry for all channels. | |
| static bool | test_device_telemetry () noexcept |
| Test comprehensive device telemetry. | |
| static bool | test_telemetry_with_active_channel () noexcept |
| Test telemetry with channel enabled and current set. | |
| static bool | test_fault_reporting () noexcept |
| Test comprehensive fault reporting. | |
| static bool | test_fault_clearing () noexcept |
| Test fault clearing. | |
| static bool | test_software_reset () noexcept |
| Test software reset. | |
| static bool | test_spi_watchdog () noexcept |
| Test SPI watchdog reload. | |
| static bool | test_gpio_control () noexcept |
| Test GPIO control (Reset, Enable, Fault) | |
| static bool | test_all_channels_individually () noexcept |
| Test all channels individually. | |
| static bool | test_parallel_operation () noexcept |
| Test parallel operation configuration. | |
| static bool | test_error_conditions () noexcept |
| Test error conditions (wrong mode operations) | |
| void | app_main () |
Variables | |
| static const char * | TAG = "TLE92466ED_Test" |
| static TestResults | g_test_results |
| static std::unique_ptr< Esp32Tle92466edSpiBus > | g_hal |
| static tle92466ed::Driver< Esp32Tle92466edSpiBus > * | g_driver = nullptr |
Comprehensive Integration Test Suite for TLE92466ED Driver.
This is a complete integration test suite that tests all functionality of the TLE92466ED driver with actual hardware.
Test Categories:
| #define ENABLE_CHANNEL_CONTROL_TESTS 1 |
| #define ENABLE_CURRENT_CONTROL_TESTS 1 |
| #define ENABLE_DIAGNOSTICS_TESTS 1 |
| #define ENABLE_DITHER_CONFIG_TESTS 1 |
| #define ENABLE_ERROR_CONDITION_TESTS 1 |
| #define ENABLE_FAULT_MANAGEMENT_TESTS 1 |
| #define ENABLE_GLOBAL_CONFIG_TESTS 1 |
| #define ENABLE_GPIO_CONTROL_TESTS 1 |
| #define ENABLE_INITIALIZATION_TESTS 1 |
| #define ENABLE_MODE_CONTROL_TESTS 1 |
| #define ENABLE_MULTI_CHANNEL_TESTS 1 |
| #define ENABLE_PARALLEL_OPERATION_TESTS 1 |
| #define ENABLE_PWM_CONFIG_TESTS 1 |
| #define ENABLE_WATCHDOG_TESTS 1 |
| void app_main | ( | ) |
|
staticnoexcept |
Ensure device is in Config Mode.
|
staticnoexcept |
Ensure device is in Mission Mode.
|
staticnoexcept |
Print channel diagnostics.
|
staticnoexcept |
Print device status.
|
staticnoexcept |
Test all channels enable/disable.
|
staticnoexcept |
Test all channels individually.
|
staticnoexcept |
Test comprehensive telemetry for all channels.
|
staticnoexcept |
Test channel diagnostics reading.
|
staticnoexcept |
Test channel mask control.
|
staticnoexcept |
Test channel mode configuration.
|
staticnoexcept |
Test chip ID reading.
|
staticnoexcept |
Test CRC enable/disable.
|
staticnoexcept |
Test current ramping.
|
staticnoexcept |
Test current and duty cycle reading.
|
staticnoexcept |
Test current setpoint setting.
|
staticnoexcept |
Test device status reading.
|
staticnoexcept |
Test comprehensive device telemetry.
|
staticnoexcept |
Test device verification.
|
staticnoexcept |
Test dither configuration (high-level API)
|
staticnoexcept |
Test dither configuration (raw API)
|
staticnoexcept |
Test TLE92466ED driver initialization.
|
staticnoexcept |
Test entering Config Mode.
|
staticnoexcept |
Test entering Mission Mode.
|
staticnoexcept |
Test error conditions (wrong mode operations)
|
staticnoexcept |
Test fault clearing.
|
staticnoexcept |
Test comprehensive fault reporting.
|
staticnoexcept |
Test global configuration.
|
staticnoexcept |
Test GPIO control (Reset, Enable, Fault)
|
staticnoexcept |
Test HAL initialization.
|
staticnoexcept |
Test IC version reading.
|
staticnoexcept |
Test mode transitions.
|
staticnoexcept |
Test parallel operation configuration.
|
staticnoexcept |
Test PWM period configuration (high-level API)
|
staticnoexcept |
Test PWM period configuration (raw API)
|
staticnoexcept |
Test single channel enable/disable.
|
staticnoexcept |
Test software reset.
|
staticnoexcept |
Test SPI watchdog reload.
|
staticnoexcept |
Test telemetry with channel enabled and current set.
|
staticnoexcept |
Test VBAT threshold configuration.
|
staticnoexcept |
Test voltage reading.
|
static |
|
static |
|
static |
|
static |