anonymous_namespace{I2CBusDMA.cpp}
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:70.1.0+855c407f828e20 / 54 个公开 API 符号没有说明。
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:7上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:17上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:20
void HAL_I2C_ErrorCallback (I2C_HandleTypeDef *hi2c)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:415
void HAL_I2C_MasterRxCpltCallback (I2C_HandleTypeDef *hi2c)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:397
void HAL_I2C_MasterTxCpltCallback (I2C_HandleTypeDef *hi2c)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:390
void HAL_I2C_MemRxCpltCallback (I2C_HandleTypeDef *hi2c)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:409
void HAL_I2C_MemTxCpltCallback (I2C_HandleTypeDef *hi2c)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:403
I2CBusDMA::I2CBusDMA (I2C_HandleTypeDef *hi2c, BusPins pins)
使用 HAL I2C 句柄构造总线对象 hi2c 要绑定的 HAL I2C 句柄 pins 当前总线的 SCL/SDA 引脚定义
bsp/i2c_driver/I2CBusDMA.hpp:49
void I2CBusDMA::clearTransferState ()
清空当前事务的软件状态
bsp/i2c_driver/I2CBusDMA.hpp:171
void I2CBusDMA::completeFromISR (bool success, uint32_t hal_error)
在 ISR 中记录完成状态并唤醒等待线程 success 本次完成是否成功 hal_error HAL 层返回的错误码
bsp/i2c_driver/I2CBusDMA.hpp:166
bool I2CBusDMA::failAndRecover (Error error, uint32_t hal_error)
记录失败原因并执行恢复流程 error 本次失败的抽象错误码 hal_error 本次失败对应的 HAL 错误码 始终返回 false,便于直接作为失败出口
bsp/i2c_driver/I2CBusDMA.hpp:179
I2CBusDMA * I2CBusDMA::fromHandle (I2C_HandleTypeDef *hi2c)
I2CBusDMA 根据 HAL 句柄反查实例 hi2c HAL I2C 句柄 I2CBusDMA 对应的实例,不存在则返回空指针
bsp/i2c_driver/I2CBusDMA.hpp:130
I2C_HandleTypeDef * I2CBusDMA::handle () const
获取底层 HAL I2C 句柄 当前绑定的 HAL I2C 句柄
bsp/i2c_driver/I2CBusDMA.hpp:55
bool I2CBusDMA::isBusy () const
查询总线当前是否忙碌 当前是否仍有事务未完成,或 HAL 状态尚未回到 READY
bsp/i2c_driver/I2CBusDMA.hpp:61
Error I2CBusDMA::lastError () const
获取最近一次事务的抽象错误码 最近一次事务记录的错误状态
bsp/i2c_driver/I2CBusDMA.hpp:67
uint32_t I2CBusDMA::lastHalError () const
获取最近一次事务的 HAL 原始错误码 最近一次事务记录的 HAL 错误码
bsp/i2c_driver/I2CBusDMA.hpp:72
bool I2CBusDMA::memRead (uint8_t device_addr_7bit, uint8_t reg, uint8_t *data, uint16_t len, uint32_t timeout_ms)
发起一次带寄存器地址的 DMA 读事务 device_addr_7bit 7 位设备地址 reg 目标寄存器地址 data 读数据缓冲区 len 读取字节数 timeout_ms 等待完成超时时间,单位毫秒 事务是否成功完成
bsp/i2c_driver/I2CBusDMA.hpp:83
bool I2CBusDMA::memWrite (uint8_t device_addr_7bit, uint8_t device_reg, const uint8_t *data, uint16_t len, uint32_t timeout_ms)
发起一次带寄存器地址的 DMA 写事务 device_addr_7bit 7 位设备地址 device_reg 目标寄存器地址 data 写数据缓冲区 len 写入字节数 timeout_ms 等待完成超时时间,单位毫秒 事务是否成功完成
bsp/i2c_driver/I2CBusDMA.hpp:94
void I2CBusDMA::onErrorFromISR ()
在 ISR 中上报事务错误
bsp/i2c_driver/I2CBusDMA.hpp:143
void I2CBusDMA::onRxCompleteFromISR ()
在 ISR 中上报接收完成
bsp/i2c_driver/I2CBusDMA.hpp:139
void I2CBusDMA::onTxCompleteFromISR ()
在 ISR 中上报发送完成
bsp/i2c_driver/I2CBusDMA.hpp:135
bool I2CBusDMA::prepareTransfer ()
在启动 DMA 前准备一次事务 当前是否允许启动新事务
bsp/i2c_driver/I2CBusDMA.hpp:152
bool I2CBusDMA::read (uint8_t device_addr_7bit, uint8_t *data, uint16_t len, uint32_t timeout_ms)
发起一次原始 DMA 读事务 device_addr_7bit 7 位设备地址 data 读数据缓冲区 len 读取字节数 timeout_ms 等待完成超时时间,单位毫秒 事务是否成功完成
bsp/i2c_driver/I2CBusDMA.hpp:108
bool I2CBusDMA::recover ()
尝试恢复当前 I2C 总线 恢复后总线是否重新回到可用状态
bsp/i2c_driver/I2CBusDMA.hpp:123
bool I2CBusDMA::recoverBusLines ()
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:181
bool I2CBusDMA::registerInstance (I2CBusDMA *instance)
把实例注册到静态反查表 instance 要注册的总线对象 注册是否成功
bsp/i2c_driver/I2CBusDMA.hpp:188
bool I2CBusDMA::waitForTransfer (uint32_t timeout_ms)
阻塞等待当前事务完成 timeout_ms 等待完成超时时间,单位毫秒 当前事务是否成功完成
bsp/i2c_driver/I2CBusDMA.hpp:159
bool I2CBusDMA::write (uint8_t device_addr_7bit, const uint8_t *data, uint16_t len, uint32_t timeout_ms)
发起一次原始 DMA 写事务 device_addr_7bit 7 位设备地址 data 写数据缓冲区 len 写入字节数 timeout_ms 等待完成超时时间,单位毫秒 事务是否成功完成
bsp/i2c_driver/I2CBusDMA.hpp:117
bool anonymous_namespace{I2CBusDMA.cpp}::isThreadFlagsError (const uint32_t flags)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:25
uint32_t anonymous_namespace{I2CBusDMA.cpp}::kernelTicksFromMs (uint32_t timeout_ms)
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:12
void anonymous_namespace{I2CBusDMA.cpp}::shortDelay ()
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:30描述一次总线事务的最终错误状态
BusyHalErrorInvalidContextInvalidHandleNoneRecoveryFailedStartFailedTimeout
uint32_t I2CBusDMA::BusPins::alternate_function
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:26
uint16_t I2CBusDMA::BusPins::scl_pin
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:23
GPIO_TypeDef* I2CBusDMA::BusPins::scl_port
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:22
uint16_t I2CBusDMA::BusPins::sda_pin
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:25
GPIO_TypeDef* I2CBusDMA::BusPins::sda_port
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:24
std::size_t I2CBusDMA::MaxInstances
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.hpp:146
volatile bool I2CBusDMA::completed_
当前事务是否已收到完成记录
bsp/i2c_driver/I2CBusDMA.hpp:194
volatile uint32_t I2CBusDMA::completed_transfer_id_
最近一次完成记录对应的事务编号
bsp/i2c_driver/I2CBusDMA.hpp:197
volatile uint32_t I2CBusDMA::current_transfer_id_
当前正在等待的事务编号
bsp/i2c_driver/I2CBusDMA.hpp:196
I2C_HandleTypeDef* I2CBusDMA::hi2c_
绑定的 HAL I2C 句柄
bsp/i2c_driver/I2CBusDMA.hpp:190
I2CBusDMA * I2CBusDMA::instances_ [MaxInstances]
所有 bus 实例共享的 HAL 句柄反查表
bsp/i2c_driver/I2CBusDMA.hpp:201
volatile Error I2CBusDMA::last_error_
最近一次事务记录的抽象错误状态
bsp/i2c_driver/I2CBusDMA.hpp:198
volatile uint32_t I2CBusDMA::last_hal_error_
最近一次事务记录的 HAL 错误码
bsp/i2c_driver/I2CBusDMA.hpp:199
volatile uint32_t I2CBusDMA::next_transfer_id_
下一次启动事务时要分配的事务编号
bsp/i2c_driver/I2CBusDMA.hpp:195
BusPins I2CBusDMA::pins_
当前总线的引脚定义
bsp/i2c_driver/I2CBusDMA.hpp:191
volatile bool I2CBusDMA::transmitting_
当前是否已有事务启动且尚未完成收敛
bsp/i2c_driver/I2CBusDMA.hpp:193
osThreadId_t I2CBusDMA::waiting_thread_
当前阻塞等待事务完成的线程句柄
bsp/i2c_driver/I2CBusDMA.hpp:192
uint32_t anonymous_namespace{I2CBusDMA.cpp}::BusPulseDelayCycles
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:10
uint32_t anonymous_namespace{I2CBusDMA.cpp}::TransferCompleteFlag
上游未提供说明。
bsp/i2c_driver/I2CBusDMA.cpp:9I2C DMA 总线封装实现
bsp/i2c_driver/I2CBusDMA.cpp基于 STM32 HAL DMA 和 CMSIS-RTOS v2 线程标志的单 owner I2C 总线封装
bsp/i2c_driver/I2CBusDMA.hpp