libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
hpm_i2c.hpp File Reference

HPM I2C 主机驱动适配头文件 / Adapter header for the HPM I2C master driver. More...

#include <atomic>
#include "hpm_clock_drv.h"
#include "hpm_soc.h"
#include "i2c.hpp"
#include "libxr_rw.hpp"
Include dependency graph for hpm_i2c.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  LibXR::HPMI2C
 HPM SDK I2C 主机驱动,适配 LibXR I2C 接口 / HPM SDK based I2C master driver for the LibXR I2C interface. More...
 
struct  LibXR::HPMI2C::WaitPolicy
 HPM I2C 忙等超时策略 / HPM I2C busy-wait timeout policy. More...
 

Namespaces

namespace  LibXR
 LibXR 命名空间
 

Macros

#define LIBXR_HPM_I2C_SUPPORTED   0
 
#define LIBXR_HPM_I2C_HAS_DMA_MGR   0
 

Typedefs

using LibXRHpmI2cType = void
 

Functions

void libxr_hpm_i2c_process_interrupt (LibXRHpmI2cType *ptr)
 

Detailed Description

HPM I2C 主机驱动适配头文件 / Adapter header for the HPM I2C master driver.

本文件在 HPM SDK hpm_i2c_drv 之上实现 LibXR I2C 抽象,覆盖 blocking 字节流、寄存器地址式传输、可选 DMA helper 后台路径,以及 ADDRHITCMPL 等关键主机状态的错误映射。多系列兼容依赖 HPMSOC_HAS_HPMSDK_I2C__has_include("hpm_i2c_drv.h")、实例/IRQ/DMA request header 宏和 I2C_SOC_TRANSFER_COUNT_MAX 等 SDK 限制宏;硬件时序和 bus recovery 仍待上板验证。

This file implements the LibXR I2C abstraction on top of the HPM SDK hpm_i2c_drv APIs, covering blocking byte-stream transfers, register-address transfers, an optional DMA-helper background path, and error mapping for key master states such as ADDRHIT and CMPL. Multi-series compatibility relies on HPMSOC_HAS_HPMSDK_I2C, __has_include("hpm_i2c_drv.h"), instance/IRQ/DMA request header macros, and SDK limit macros such as I2C_SOC_TRANSFER_COUNT_MAX; hardware timing and bus recovery still require board validation.

Definition in file hpm_i2c.hpp.

Macro Definition Documentation

◆ LIBXR_HPM_I2C_HAS_DMA_MGR

#define LIBXR_HPM_I2C_HAS_DMA_MGR   0

Definition at line 43 of file hpm_i2c.hpp.

◆ LIBXR_HPM_I2C_SUPPORTED

#define LIBXR_HPM_I2C_SUPPORTED   0

Definition at line 35 of file hpm_i2c.hpp.

Typedef Documentation

◆ LibXRHpmI2cType

using LibXRHpmI2cType = void

Definition at line 36 of file hpm_i2c.hpp.

Function Documentation

◆ libxr_hpm_i2c_process_interrupt()

void libxr_hpm_i2c_process_interrupt ( LibXRHpmI2cType * ptr)

Definition at line 2298 of file hpm_i2c.cpp.

2298{ UNUSED(ptr); }