| 662 | |
| 663 | #if defined(RT_USING_CONSOLE) && defined(RT_USING_MSH) |
| 664 | static 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 | } |
| 690 | MSH_CMD_EXPORT(list_dma_pool, dump all dma memory pool); |
| 691 | #endif /* RT_USING_CONSOLE && RT_USING_MSH */ |
nothing calls this directly
no test coverage detected