/* param base PXP peripheral base address. retval kStatus_Success Successfully started the copy process. retval kStatus_InvalidArgument Invalid argument.  */
status_t PXP_StartMemCopy(PXP_Type *base, uint32_t srcAddr, uint32_t destAddr, uint32_t size)
/* param base PXP peripheral base address. retval kStatus_Success Successfully started the copy process. retval kStatus_InvalidArgument Invalid argument.  */
status_t PXP_StartMemCopy(PXP_Type *base, uint32_t srcAddr, uint32_t destAddr, uint32_t size)
{
    uint16_t pitchBytes;
    uint32_t height;
    if ((0U == size) || ((size % 512U) != 0U))
    {
        return kStatus_InvalidArgument;
    }
    if (size < 8U * 512U)
    {
        height     = 8U;
        pitchBytes = (uint16_t)(size / height);
    }
    else
    {
        pitchBytes = 512U;
        height     = size / pitchBytes;
    }
    if (height > PXP_MAX_HEIGHT)
    {
        return kStatus_InvalidArgument;
    }
    PXP_StartRectCopy(base, srcAddr, pitchBytes, destAddr, pitchBytes, pitchBytes / 4U, (uint16_t)height,
                      kPXP_AsPixelFormatARGB8888);
    return kStatus_Success;
}