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

Function rt_dma_free

components/drivers/dma/dma_pool.c:446–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446void rt_dma_free(struct rt_device *dev, rt_size_t size,
447 void *cpu_addr, rt_ubase_t dma_handle, rt_ubase_t flags)
448{
449 const struct rt_dma_map_ops *ops;
450
451 if (!dev || !size || !cpu_addr)
452 {
453 return;
454 }
455
456 ops = device_dma_ops(dev);
457
458 if (ops->free)
459 {
460 ops->free(dev, size, cpu_addr, dma_handle, flags);
461 }
462 else
463 {
464 dma_free(dev, size, cpu_addr, dma_handle, flags);
465 }
466}
467
468rt_err_t rt_dma_sync_out_data(struct rt_device *dev, void *data, rt_size_t size,
469 rt_ubase_t *dma_handle, rt_ubase_t flags)

Callers 2

nvme_free_queueFunction · 0.85
rt_dma_free_coherentFunction · 0.85

Calls 2

device_dma_opsFunction · 0.85
dma_freeFunction · 0.70

Tested by

no test coverage detected