MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / list_dma_pool

Function list_dma_pool

components/drivers/dma/dma_pool.c:664–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662
663#if defined(RT_USING_CONSOLE) && defined(RT_USING_MSH)
664static int list_dma_pool(int argc, char**argv)
665{
666 int count = 0;
667 rt_region_t *region;
668 struct rt_dma_pool *pool;
669
670 rt_kprintf("%-*.s Region\n", RT_NAME_MAX, "Name");
671
672 region_pool_lock();
673
674 rt_list_for_each_entry(pool, &dma_pool_nodes, list)
675 {
676 region = &pool->region;
677
678 rt_kprintf("%-*.s [%p, %p]\n", RT_NAME_MAX, region->name,
679 region->start, region->end);
680
681 ++count;
682 }
683
684 rt_kprintf("%d DMA memory found\n", count);
685
686 region_pool_unlock();
687
688 return 0;
689}
690MSH_CMD_EXPORT(list_dma_pool, dump all dma memory pool);
691#endif /* RT_USING_CONSOLE && RT_USING_MSH */

Callers

nothing calls this directly

Calls 3

rt_kprintfFunction · 0.85
region_pool_lockFunction · 0.85
region_pool_unlockFunction · 0.85

Tested by

no test coverage detected