libxr
Embedded C++ framework for bare-metal, RTOS and Linux
Loading...
Searching...
No Matches
LibXR::HPMDmaManager Class Reference

HPM SDK dma_mgr 一次性初始化入口 / One-time initialization entry for the HPM SDK dma_mgr. More...

#include <hpm_dma.hpp>

Static Public Member Functions

static void EnsureInitialized ()
 确保 dma_mgr_init() 已执行且只执行一次 / Ensure dma_mgr_init() has run, exactly once.
 

Detailed Description

HPM SDK dma_mgr 一次性初始化入口 / One-time initialization entry for the HPM SDK dma_mgr.

dma_mgr_init() 每个程序只能执行一次;使用 DMA 的 LibXR HPM 驱动在构造函数中调用 EnsureInitialized(),不得自行调用 dma_mgr_init()。应用代码若也使用 dma_mgr,同样应调用 EnsureInitialized() 而不是 dma_mgr_init()。 dma_mgr_init() must run exactly once per program. LibXR HPM drivers that use DMA call EnsureInitialized() from their constructors and never call dma_mgr_init() directly. Application code that also uses dma_mgr should call EnsureInitialized() instead of dma_mgr_init() as well.

Definition at line 46 of file hpm_dma.hpp.

Member Function Documentation

◆ EnsureInitialized()

void HPMDmaManager::EnsureInitialized ( )
static

确保 dma_mgr_init() 已执行且只执行一次 / Ensure dma_mgr_init() has run, exactly once.

Note
仅在线程或启动上下文(如驱动构造函数)调用,不可在中断中调用 / Call only from thread or startup context such as driver constructors, never from an ISR.

Definition at line 13 of file hpm_dma.cpp.

14{
15 if (dma_mgr_initialized)
16 {
17 return;
18 }
19
20 dma_mgr_init();
21 dma_mgr_initialized = true;
22}

The documentation for this class was generated from the following files: