MG32F10x Standard Peripherals Firmware Library
Functions
mg32f10x_dmac.c File Reference

This file provides all the DMAC firmware functions. More...

#include "mg32f10x_dmac.h"
#include "mg32f10x_rcc.h"

Functions

void DMAC_DeInit (DMAC_TypeDef *DMACx)
 Deinitializes the DMACx peripheral registers to their default reset values. More...
 
void DMAC_Channel_Init (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, DMAC_Channel_InitTypeDef *DMAC_Channel_InitStruct)
 Initializes the DMACx Channely according to the specified parameters in the DMAC_Channel_InitStruct structure. More...
 
void DMAC_Channel_StructInit (DMAC_Channel_InitTypeDef *DMAC_Channel_InitStruct)
 Fills each DMAC_Channel_InitStruct member with its default value. More...
 
void DMAC_Channel_SourceGatherConfig (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, DMAC_SourceGatherInitTypeDef *DMAC_SourceGatherInitStruct)
 Initializes the source gather of DMACx Channely. More...
 
void DMAC_Channel_DestinationScatterConfig (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, DMAC_DestinationScatterInitTypeDef *DMAC_DestinationScatterInitStruct)
 Initializes the destination scatter of DMACx Channely. More...
 
void DMAC_Channel_SetSourceAddress (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint32_t SourceAddress)
 Sets the source address of the specified DMACx Channely. More...
 
void DMAC_Channel_SetDestinationAddress (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint32_t DestinationAddress)
 Sets the destination address of the specified DMACx Channely. More...
 
void DMAC_Channel_SetBlockTransferSize (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint16_t DMAC_BlockTransferSize)
 Sets the number of data units to be transferred on the block transfer. More...
 
uint16_t DMAC_Channel_GetBlockTransferSize (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the number of remaining data units in the current DMACx Channely block transfer. More...
 
void DMAC_Channel_SuspendCmd (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, FunctionalState NewState)
 Forces or releases the current DMACx Channely transfer suspend. More...
 
FlagStatus DMAC_Channel_IsFIFOEmpty (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Checks whether the DMACx Channely FIFO is empty or not. More...
 
void DMAC_Cmd (DMAC_TypeDef *DMACx, FunctionalState NewState)
 Enables or disables the specified DMACx peripheral. More...
 
FunctionalState DMAC_GetCmdStatus (DMAC_TypeDef *DMACx)
 Returns the status of EN bit for the specified DMACx. More...
 
void DMAC_ChannelCmd (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, FunctionalState NewState)
 Enables or disables the specified DMACx Channely. More...
 
FunctionalState DMAC_GetChannelCmdStatus (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the status of EN bit for the specified DMACx Channely. More...
 
void DMAC_ITConfig (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint16_t DMAC_IT, FunctionalState NewState)
 Enables or disables the specified DMACx Channely interrupts. More...
 
ITStatus DMAC_GetRawITStatus (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint16_t DMAC_IT)
 Checks whether the specified DMACx Channely raw interrupt status. More...
 
ITStatus DMAC_GetITStatus (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint16_t DMAC_IT)
 Checks whether the specified DMACx Channely interrupt has occurred or not. More...
 
ITStatus DMAC_GetCombinedITStatus (DMAC_TypeDef *DMACx, uint16_t DMAC_IT)
 Checks whether the specified DMACx interrupt has occurred or not. More...
 
void DMAC_ClearITPendingBit (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, uint16_t DMAC_IT)
 Clears the DMACx's interrupt pending bits. More...
 
void DMAC_SWHS_SetReqSrcSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, SignalState NewState)
 Controls the state of ReqSrc signal for the corresponding channels. More...
 
void DMAC_SWHS_SetReqDstSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, SignalState NewState)
 Controls the state of ReqDst signal for the corresponding channels. More...
 
void DMAC_SWHS_SetSglReqSrcSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, SignalState NewState)
 Controls the state of SglReqSrc signal for the corresponding channels. More...
 
void DMAC_SWHS_SetSglReqDstSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, SignalState NewState)
 Controls the state of SglReqDst signal for the corresponding channels. More...
 
void DMAC_SWHS_SetLstSrcSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, SignalState NewState)
 Controls the state of LstSrc signal for the corresponding channels. More...
 
void DMAC_SWHS_SetLstDstSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel, SignalState NewState)
 Controls the state of LstDst signal for the corresponding channels. More...
 
SignalState DMAC_SWHS_GetReqSrcSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the state of ReqSrc signal for the corresponding channel. More...
 
SignalState DMAC_SWHS_GetReqDstSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the state of ReqDst signal for the corresponding channel. More...
 
SignalState DMAC_SWHS_GetSglReqSrcSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the state of SglReqSrc signal for the corresponding channel. More...
 
SignalState DMAC_SWHS_GetSglReqDstSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the state of SglReqDst signal for the corresponding channel. More...
 
SignalState DMAC_SWHS_GetLstSrcSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the state of LstSrc signal for the corresponding channel. More...
 
SignalState DMAC_SWHS_GetLstDstSignalState (DMAC_TypeDef *DMACx, uint8_t DMAC_Channel)
 Returns the state of LstDst signal for the corresponding channel. More...
 

Detailed Description

This file provides all the DMAC firmware functions.

Author
megawin Application Team
Version
V0.1.10
Date
05-January-2023