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

Comprehensive test suite for Pcal95555Handler. More...

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

Functions

static bool create_handler () noexcept
 
static bool test_initialize () noexcept
 
static bool test_chip_variant () noexcept
 
static bool test_pin_direction () noexcept
 
static bool test_pin_write_read () noexcept
 
static bool test_toggle_pin () noexcept
 
static bool test_batch_write () noexcept
 
static bool test_supports_interrupts () noexcept
 
static bool test_drain_pending_interrupts () noexcept
 
static bool test_gpio_pin_wrapper () noexcept
 
static bool test_error_invalid_pin () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "PCAL95555_Handler_Test"
 
static TestResults g_test_results
 
static constexpr bool ENABLE_INITIALIZATION_TESTS = true
 
static constexpr bool ENABLE_PIN_DIRECTION_TESTS = true
 
static constexpr bool ENABLE_PIN_READ_WRITE_TESTS = true
 
static constexpr bool ENABLE_BATCH_OPERATIONS_TESTS = true
 
static constexpr bool ENABLE_INTERRUPT_TESTS = true
 
static constexpr bool ENABLE_CHIP_VARIANT_TESTS = true
 
static constexpr bool ENABLE_AGILE_IO_TESTS = true
 
static constexpr bool ENABLE_GPIO_PIN_WRAPPER_TESTS = true
 
static constexpr bool ENABLE_ERROR_HANDLING_TESTS = true
 
static std::unique_ptr< EspGpio > g_int_gpio
 
static std::unique_ptr< Pcal95555Handlerg_handler
 

Detailed Description

Comprehensive test suite for Pcal95555Handler.

Tests: I2C comm, EnsureInitialized, per-pin direction/read/write/toggle, batch 16-bit operations, interrupt management (deferred ISR), chip variant detection (PCA9555 vs PCAL9555A), Agile I/O features, and GpioPin wrapper.

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_batch_write()

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

◆ test_chip_variant()

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

◆ test_drain_pending_interrupts()

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

◆ test_error_invalid_pin()

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

◆ test_gpio_pin_wrapper()

static bool test_gpio_pin_wrapper ( )
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_pin_direction()

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

◆ test_pin_write_read()

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

◆ test_supports_interrupts()

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

◆ test_toggle_pin()

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

Variable Documentation

◆ ENABLE_AGILE_IO_TESTS

constexpr bool ENABLE_AGILE_IO_TESTS = true
staticconstexpr

◆ ENABLE_BATCH_OPERATIONS_TESTS

constexpr bool ENABLE_BATCH_OPERATIONS_TESTS = true
staticconstexpr

◆ ENABLE_CHIP_VARIANT_TESTS

constexpr bool ENABLE_CHIP_VARIANT_TESTS = true
staticconstexpr

◆ ENABLE_ERROR_HANDLING_TESTS

constexpr bool ENABLE_ERROR_HANDLING_TESTS = true
staticconstexpr

◆ ENABLE_GPIO_PIN_WRAPPER_TESTS

constexpr bool ENABLE_GPIO_PIN_WRAPPER_TESTS = true
staticconstexpr

◆ ENABLE_INITIALIZATION_TESTS

constexpr bool ENABLE_INITIALIZATION_TESTS = true
staticconstexpr

◆ ENABLE_INTERRUPT_TESTS

constexpr bool ENABLE_INTERRUPT_TESTS = true
staticconstexpr

◆ ENABLE_PIN_DIRECTION_TESTS

constexpr bool ENABLE_PIN_DIRECTION_TESTS = true
staticconstexpr

◆ ENABLE_PIN_READ_WRITE_TESTS

constexpr bool ENABLE_PIN_READ_WRITE_TESTS = true
staticconstexpr

◆ g_handler

std::unique_ptr<Pcal95555Handler> g_handler
static

◆ g_int_gpio

std::unique_ptr<EspGpio> g_int_gpio
static

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "PCAL95555_Handler_Test"
static