How infineon/mtb-hal-cat1 works
Project type and purpose
• This is a cross-platform Hardware Abstraction Layer (HAL) library for Infineon/Cypress MCUs (ModusToolbox™).
• It provides a uniform, high-level C interface (cyhal_*.h) for peripheral drivers, power management, resource arbitration, and event callbacks.
File structure
• Top-level directories:
• / – public HAL headers (cyhal.h, cyhal_<peripheral>.h)
• include_pvt/ – private headers and internal hardware-type definitions
• source/ – core HAL implementation (.c)
• COMPONENT_CAT1A, COMPONENT_CAT1B, COMPONENT_CAT1C – platform-specific sub-modules for different MCU families (pin packages & trigger mappings)
• docs/ – generated API reference (Doxygen HTML)
• Key patterns:
• Layered API → core → platform
• “Hardware Manager” for resource arbitration (cyhal_hwmgr_*)
• “Syspm” for system power management (cyhal_syspm_*)
• Pin-package modules (per MCU package) and trigger mapping modules
README for additional insights
• HAL public interface vs. platform-specific implementation
• Resource management via Hardware Manager
• Power‐management strategies via Syspm driver
• Optional RTOS integration via RTOS_AWARE component
• Compile‐time binding to a specific device family