wut/include/dmae/mem.h
rw-r-r-0644 34bfddb581 dmae: Add DMAECopyMem, DMAEFillMem and DMAEWaitDone (#102)
* dmae: Add DMAECopyMem, DMAEFillMem and DMAEWaitDone

* tests: Add dmae to header compile test list
2019-02-28 17:10:10 +11:00

77 lines
1.2 KiB
C

#pragma once
#include <wut.h>
#include "sync.h"
/**
* \defgroup dmae_mem Memory Operations
* \ingroup dmae
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
//! DMAE Memory endian swappng mode.
typedef enum
{
//! No memory swapping.
DMAE_SWAP_NONE = 0,
//! 16 bit memory swapping.
DMAE_SWAP_16 = 1,
//! 32 bit memory swapping.
DMAE_SWAP_32 = 2,
//! 64 bit memory swapping.
DMAE_SWAP_64 = 3,
} DMAESwapMode;
/**
* Starts a DMAE copy operation.
*
* \param dst
* Pointer to the destination buffer.
*
* \param src
* Pointer to the source buffer.
*
* \param wordCount
* Number of 32 bit words to copy.
*
* \param swap
* Memory endian swapping mode.
*
* \return
* DMAE operations queue timestamp.
*/
DMAETimeStamp
DMAECopyMem(void *dst,
const void *src,
uint32_t wordCount,
DMAESwapMode swap);
/**
* Starts a DMAE fill operation.
*
* \param dst
* Pointer to the destination buffer.
*
* \param val
* The value to fill the destination buffer.
*
* \param wordCount
* Number of 32 bit words to fill.
*
* \return
* DMAE operations queue timestamp.
*/
DMAETimeStamp
DMAEFillMem(void *dst,
uint32_t val,
uint32_t wordCount);
#ifdef __cplusplus
}
#endif
/** @} */