47#include "dma_interface.h"
65#define DMA_SPI_Initialize DMA_Initialize
70#define DMA_SPI_Deinitialize DMA_Deinitialize
75#define DMA_SPI_ChannelEnable DMA_ChannelEnable
80#define DMA_SPI_TransferCountSet DMA_TransferCountSet
85#define DMA_SPI_TransferCountGet DMA_TransferCountGet
90#define DMA_SPI_SoftwareTriggerEnable DMA_SoftwareTriggerEnable
95#define DMA_SPI_SourceAddressSet DMA_SourceAddressSet
100#define DMA_SPI_DestinationAddressSet DMA_DestinationAddressSet
105#define DMA_SPI_IsSoftwareRequestPending DMA_IsSoftwareRequestPending
110#define DMA_SPI_ChannelTasks DMA_ChannelTasks
115#define DMA_SPI_ChannelCallbackRegister DMA_ChannelCallbackRegister
214 DMACNT0 = transferCount;
218 DMACNT1 = transferCount;
222 DMACNT2 = transferCount;
226 DMACNT3 = transferCount;
230 DMACNT4 = transferCount;
234 DMACNT5 = transferCount;
250 uint16_t transferCount = 0U;
254 transferCount = DMACNT0;
257 transferCount = DMACNT1;
260 transferCount = DMACNT2;
263 transferCount = DMACNT3;
266 transferCount = DMACNT4;
269 transferCount = DMACNT5;
274 return transferCount;
289 DMACH0bits.CHREQ = 1;
292 DMACH1bits.CHREQ = 1;
295 DMACH2bits.CHREQ = 1;
298 DMACH3bits.CHREQ = 1;
301 DMACH4bits.CHREQ = 1;
304 DMACH5bits.CHREQ = 1;
393 status = DMACH0bits.CHREQ;
396 status = DMACH1bits.CHREQ;
399 status = DMACH2bits.CHREQ;
402 status = DMACH3bits.CHREQ;
405 status = DMACH4bits.CHREQ;
408 status = DMACH5bits.CHREQ;
This is the generated driver types header file for the DMA driver.
void DMA_Initialize(void)
Initializes the DMA module.
void DMA_ChannelTasks(void)
This function is used to implement the tasks for polled implementations of DMA Channel.
static void DMA_SourceAddressSet(enum DMA_CHANNEL channel, uint16_t address)
This inline function sets the source address to specified DMA channel.
DMA_CHANNEL
Defines the DMA channles that are selected from the MCC Melody User Interface for the DMA transfers....
static void DMA_TransferCountSet(enum DMA_CHANNEL channel, uint16_t transferCount)
This inline function sets the number of transfer counts to DMA channel.
void DMA_Deinitialize(void)
Deinitializes the DMA to POR values.
static bool DMA_IsSoftwareRequestPending(enum DMA_CHANNEL channel)
This inline function returns the status of the software request of the DMA channel.
static uint16_t DMA_TransferCountGet(enum DMA_CHANNEL channel)
This inline function returns the number of transfer counts from DMA channel.
void DMA_ChannelCallback(enum DMA_CHANNEL channel)
This is the default callback with weak attribute. The user can override and implement the default cal...
static void DMA_SoftwareTriggerEnable(enum DMA_CHANNEL channel)
This inline function sets the software trigger of the DMA channel.
const struct DMA_INTERFACE DMA_SPI
Structure object of type DMA_INTERFACE with the custom name given by the user in the Melody Driver Us...
static void DMA_ChannelDisable(enum DMA_CHANNEL channel)
This inline function disables the DMA channel.
void DMA_ChannelCallbackRegister(void(*callback)(enum DMA_CHANNEL channel))
This function can be used to override default callback and to define custom callback for DMA Channel ...
static void DMA_ChannelEnable(enum DMA_CHANNEL channel)
This inline function enables the DMA channel.
static void DMA_DestinationAddressSet(enum DMA_CHANNEL channel, uint16_t address)
This inline function sets the destination address to specified DMA channel.
Structure containing the function pointers of DMA driver.