|
HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
|
Unified handler for the PCA9555 / PCAL9555A 16-bit I2C GPIO expander. More...
#include <atomic>#include <cstdint>#include <memory>#include <array>#include <functional>#include "base/BaseGpio.h"#include "base/BaseI2c.h"#include "core/hf-core-drivers/external/hf-pcal95555-driver/inc/pcal95555.hpp"#include "RtosMutex.h"Go to the source code of this file.
Classes | |
| class | HalI2cPcal95555Comm |
| Concrete I2C communication adapter for PCAL95555 using BaseI2c. More... | |
| class | Pcal95555GpioPin |
| BaseGpio adapter for a single PCAL95555 GPIO expander pin. More... | |
| class | Pcal95555Handler |
| Unified, non-templated handler for a single PCA9555 / PCAL9555A device. More... | |
Unified handler for the PCA9555 / PCAL9555A 16-bit I2C GPIO expander.
This file provides the complete HAL-level integration for a single PCA9555 / PCAL9555A GPIO expander device. It bridges the HardFOC base interfaces (BaseI2c, BaseGpio) with the templated pcal95555::PCAL95555<I2cType> driver from the hf-pcal95555-driver library.
The file contains three layers:
The handler owns all its internal resources:
External managers (GpioManager) obtain shared_ptr<BaseGpio> references to pins via CreateGpioPin(). The handler and pin registry co-own the pin objects.
The handler uses RtosMutex for thread-safe access to:
A single handler_mutex_ protects all state because all hardware access is serialized through I2C anyway, making finer-grained locking unnecessary overhead.