HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
tle92466ed_handler_comprehensive_test.cpp File Reference

Comprehensive test suite for Tle92466edHandler. More...

#include "TestFramework.h"
#include "esp32_bus_setup.hpp"
#include "esp32_test_config.hpp"
#include "handlers/tle92466ed/Tle92466edHandler.h"
#include <memory>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Include dependency graph for tle92466ed_handler_comprehensive_test.cpp:

Functions

static bool create_handler () noexcept
 
static bool test_construction () noexcept
 
static bool test_initialize () noexcept
 
static bool test_is_initialized () noexcept
 
static bool test_enable_channel () noexcept
 
static bool test_disable_channel () noexcept
 
static bool test_enable_all_channels () noexcept
 
static bool test_disable_all_channels () noexcept
 
static bool test_set_channel_current () noexcept
 
static bool test_configure_pwm_raw () noexcept
 
static bool test_channel_range_guard () noexcept
 
static bool test_get_status () noexcept
 
static bool test_get_channel_diagnostics () noexcept
 
static bool test_get_fault_report () noexcept
 
static bool test_has_fault () noexcept
 
static bool test_clear_faults () noexcept
 
static bool test_kick_watchdog () noexcept
 
static bool test_enter_mission_mode () noexcept
 
static bool test_get_chip_id () noexcept
 
static bool test_get_driver_access () noexcept
 
static bool test_dump_diagnostics () noexcept
 
static bool test_operations_before_init () noexcept
 
static bool test_deinitialize () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "TLE92466ED_Handler_Test"
 
static TestResults g_test_results
 
static constexpr bool ENABLE_CONSTRUCTION_TESTS = true
 
static constexpr bool ENABLE_INITIALIZATION_TESTS = true
 
static constexpr bool ENABLE_CHANNEL_CONTROL_TESTS = true
 
static constexpr bool ENABLE_STATUS_TESTS = true
 
static constexpr bool ENABLE_WATCHDOG_TESTS = true
 
static constexpr bool ENABLE_DEVICE_INFO_TESTS = true
 
static constexpr bool ENABLE_DIAGNOSTICS_TESTS = true
 
static constexpr bool ENABLE_ERROR_HANDLING_TESTS = true
 
static std::unique_ptr< EspGpio > g_resn_gpio
 
static std::unique_ptr< EspGpio > g_en_gpio
 
static std::unique_ptr< EspGpio > g_faultn_gpio
 
static BaseSpi * g_spi_device = nullptr
 
static std::unique_ptr< Tle92466edHandlerg_handler
 
static bool g_hw_present = false
 

Detailed Description

Comprehensive test suite for Tle92466edHandler.

Tests: CRTP SPI adapter, initialization (default + GlobalConfig), 6-channel enable/disable/current/PWM, channel diagnostics, fault report/clear, watchdog kick/disable, device ID readback, GetDriver() direct access, diagnostics dump, and pre-init error handling.

Note
This test requires a TLE92466ED evaluation board connected via SPI. Without hardware, initialization will fail gracefully and remaining tests will be skipped.
Author
HardFOC Team
Date
2025-2026

Function Documentation

◆ app_main()

void app_main ( void )
Here is the call graph for this function:

◆ create_handler()

static bool create_handler ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_channel_range_guard()

static bool test_channel_range_guard ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_clear_faults()

static bool test_clear_faults ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_configure_pwm_raw()

static bool test_configure_pwm_raw ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_construction()

static bool test_construction ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_deinitialize()

static bool test_deinitialize ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_disable_all_channels()

static bool test_disable_all_channels ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_disable_channel()

static bool test_disable_channel ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_dump_diagnostics()

static bool test_dump_diagnostics ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_enable_all_channels()

static bool test_enable_all_channels ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_enable_channel()

static bool test_enable_channel ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_enter_mission_mode()

static bool test_enter_mission_mode ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_get_channel_diagnostics()

static bool test_get_channel_diagnostics ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_get_chip_id()

static bool test_get_chip_id ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_get_driver_access()

static bool test_get_driver_access ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_get_fault_report()

static bool test_get_fault_report ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_get_status()

static bool test_get_status ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_has_fault()

static bool test_has_fault ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_initialize()

static bool test_initialize ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_is_initialized()

static bool test_is_initialized ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_kick_watchdog()

static bool test_kick_watchdog ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_operations_before_init()

static bool test_operations_before_init ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_set_channel_current()

static bool test_set_channel_current ( )
staticnoexcept
Here is the caller graph for this function:

Variable Documentation

◆ ENABLE_CHANNEL_CONTROL_TESTS

constexpr bool ENABLE_CHANNEL_CONTROL_TESTS = true
staticconstexpr

◆ ENABLE_CONSTRUCTION_TESTS

constexpr bool ENABLE_CONSTRUCTION_TESTS = true
staticconstexpr

◆ ENABLE_DEVICE_INFO_TESTS

constexpr bool ENABLE_DEVICE_INFO_TESTS = true
staticconstexpr

◆ ENABLE_DIAGNOSTICS_TESTS

constexpr bool ENABLE_DIAGNOSTICS_TESTS = true
staticconstexpr

◆ ENABLE_ERROR_HANDLING_TESTS

constexpr bool ENABLE_ERROR_HANDLING_TESTS = true
staticconstexpr

◆ ENABLE_INITIALIZATION_TESTS

constexpr bool ENABLE_INITIALIZATION_TESTS = true
staticconstexpr

◆ ENABLE_STATUS_TESTS

constexpr bool ENABLE_STATUS_TESTS = true
staticconstexpr

◆ ENABLE_WATCHDOG_TESTS

constexpr bool ENABLE_WATCHDOG_TESTS = true
staticconstexpr

◆ g_en_gpio

std::unique_ptr<EspGpio> g_en_gpio
static

◆ g_faultn_gpio

std::unique_ptr<EspGpio> g_faultn_gpio
static

◆ g_handler

std::unique_ptr<Tle92466edHandler> g_handler
static

◆ g_hw_present

bool g_hw_present = false
static

◆ g_resn_gpio

std::unique_ptr<EspGpio> g_resn_gpio
static

◆ g_spi_device

BaseSpi* g_spi_device = nullptr
static

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "TLE92466ED_Handler_Test"
static