dmadrv.c File Reference
DMADRV API implementation.
License
Copyright 2018 Silicon Laboratories Inc. www.silabs.com
SPDX-License-Identifier: Zlib
The licensor of this software is Silicon Laboratories Inc.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
Definition in file
dmadrv.c
.
#include <stdbool.h>
#include <stddef.h>
#include "em_device.h"
#include "
em_cmu.h
"
#include "
em_core.h
"
#include "
dmadrv.h
"
#include "
dmactrl.h
"
Functions |
|
Ecode_t | DMADRV_AllocateChannel (unsigned int *channelId, void *capabilities) |
Allocate (reserve) a DMA channel.
|
|
Ecode_t | DMADRV_DeInit (void) |
Deinitialize DMADRV.
|
|
Ecode_t | DMADRV_FreeChannel (unsigned int channelId) |
Free an allocated (reserved) DMA channel.
|
|
Ecode_t | DMADRV_Init (void) |
Initialize DMADRV.
|
|
Ecode_t | DMADRV_MemoryPeripheral (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src, bool srcInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a memory to a peripheral DMA transfer.
|
|
Ecode_t | DMADRV_MemoryPeripheralPingPong (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src0, void *src1, bool srcInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a memory to a peripheral ping-pong DMA transfer.
|
|
Ecode_t | DMADRV_PauseTransfer (unsigned int channelId) |
Pause an ongoing DMA transfer.
|
|
Ecode_t | DMADRV_PeripheralMemory (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src, bool dstInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a peripheral to memory DMA transfer.
|
|
Ecode_t | DMADRV_PeripheralMemoryPingPong (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst0, void *dst1, void *src, bool dstInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a peripheral to memory ping-pong DMA transfer.
|
|
Ecode_t | DMADRV_ResumeTransfer (unsigned int channelId) |
Resume an ongoing DMA transfer.
|
|
Ecode_t | DMADRV_StopTransfer (unsigned int channelId) |
Stop an ongoing DMA transfer.
|
|
Ecode_t | DMADRV_TransferActive (unsigned int channelId, bool *active) |
Check if a transfer is running.
|
|
Ecode_t | DMADRV_TransferCompletePending (unsigned int channelId, bool *pending) |
Check if a transfer complete is pending.
|
|
Ecode_t | DMADRV_TransferDone (unsigned int channelId, bool *done) |
Check if a transfer has completed.
|
|
Ecode_t | DMADRV_TransferRemainingCount (unsigned int channelId, int *remaining) |
Get number of items remaining in a transfer.
|
|