Skip to main content

spi_bus_dma_memory_alloc

Function spi_bus_dma_memory_alloc 

Source
pub unsafe extern "C" fn spi_bus_dma_memory_alloc(
    host_id: u32,
    size: usize,
    extra_heap_caps: u32,
) -> *mut c_void
Expand description

@brief Helper function for malloc DMA capable memory for SPI driver

@note This API will take care of the cache and hardware alignment internally. To free/release memory allocated by this helper function, simply calling free()

@param[in] host_id SPI peripheral who will using the memory @param[in] size Size in bytes, the amount of memory to allocate @param[in] extra_heap_caps Extra heap caps based on MALLOC_CAP_DMA

@return Pointer to the memory if allocated successfully