STM8L15x Standard Peripherals Drivers
|
DMA driver modules. More...
Modules | |
DMA_Private_Functions | |
DMA_Exported_Types | |
DMA_Exported_Macros | |
Functions | |
void | DMA_ClearFlag (DMA_FLAG_TypeDef DMA_FLAG) |
Clears the DMA Channels selected flags. | |
void | DMA_ClearITPendingBit (DMA_IT_TypeDef DMA_IT) |
Clears the DMA Channelx�s interrupt pending bits. | |
void | DMA_Cmd (DMA_Channel_TypeDef *DMA_Channelx, FunctionalState NewState) |
Enables or disables the specified DMA Channelx. | |
void | DMA_DeInit (DMA_Channel_TypeDef *DMA_Channelx) |
Deinitializes the DMA Channelx registers to their default reset values. | |
uint8_t | DMA_GetCurrDataCounter (DMA_Channel_TypeDef *DMA_Channelx) |
Returns the number of remaining data units in the current DMA Channelx transfer. | |
FlagStatus | DMA_GetFlagStatus (DMA_FLAG_TypeDef DMA_FLAG) |
Checks whether the specified DMA Channelx flag is set or not. | |
ITStatus | DMA_GetITStatus (DMA_IT_TypeDef DMA_IT) |
Checks whether the specified DMA Channelx interrupt has occurred or not. | |
void | DMA_GlobalCmd (FunctionalState NewState) |
Enables or disables All the DMA. | |
void | DMA_GlobalDeInit (void) |
Deinitializes the DMA Global Status register to its default reset values. | |
void | DMA_Init (DMA_Channel_TypeDef *DMA_Channelx, uint32_t DMA_Memory0BaseAddr, uint16_t DMA_PeripheralMemory1BaseAddr, uint8_t DMA_BufferSize, DMA_DIR_TypeDef DMA_DIR, DMA_Mode_TypeDef DMA_Mode, DMA_MemoryIncMode_TypeDef DMA_MemoryIncMode, DMA_Priority_TypeDef DMA_Priority, DMA_MemoryDataSize_TypeDef DMA_MemoryDataSize) |
Initializes the DMA Channelx according to the specified parameters. | |
void | DMA_ITConfig (DMA_Channel_TypeDef *DMA_Channelx, DMA_ITx_TypeDef DMA_ITx, FunctionalState NewState) |
Enables or disables the specified DMA Channelx interrupts. | |
void | DMA_SetCurrDataCounter (DMA_Channel_TypeDef *DMA_Channelx, uint8_t DataNumber) |
Set the number of data units to transfer for DMA Channelx. | |
void | DMA_SetTimeOut (uint8_t DMA_TimeOut) |
Sets the Time out Value. |
Detailed Description
DMA driver modules.
Function Documentation
void DMA_ClearFlag | ( | DMA_FLAG_TypeDef | DMA_FLAG | ) |
Clears the DMA Channels selected flags.
Definition at line 591 of file stm8l15x_dma.c.
References DMA_Channel_struct::CSPR, DMA1_Channel0, DMA1_Channel1, DMA1_Channel2, DMA1_Channel3, IS_DMA_CLEAR_FLAG, and RESET.
void DMA_ClearITPendingBit | ( | DMA_IT_TypeDef | DMA_IT | ) |
Clears the DMA Channelx�s interrupt pending bits.
Definition at line 698 of file stm8l15x_dma.c.
References DMA_Channel_struct::CSPR, DMA1_Channel0, DMA1_Channel1, DMA1_Channel2, DMA1_Channel3, IS_DMA_CLEAR_IT, and RESET.
void DMA_Cmd | ( | DMA_Channel_TypeDef * | DMA_Channelx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified DMA Channelx.
- Note:
- DMA_GlobalCmd function must be called first to enable or disable the global DMA.
Definition at line 308 of file stm8l15x_dma.c.
References DMA_Channel_struct::CCR, DISABLE, DMA_CCR_CE, IS_DMA_CHANNEL, and IS_FUNCTIONAL_STATE.
void DMA_DeInit | ( | DMA_Channel_TypeDef * | DMA_Channelx | ) |
Deinitializes the DMA Channelx registers to their default reset values.
Definition at line 149 of file stm8l15x_dma.c.
References DMA_Channel_struct::CCR, DMA_Channel_struct::CM0ARH, DMA_Channel_struct::CM0ARL, DMA_Channel_struct::CM0EAR, DMA_Channel_struct::CNBTR, DMA_Channel_struct::CPARH, DMA_Channel_struct::CPARL, DMA_Channel_struct::CSPR, DMA1_Channel3, DMA_C3M0EAR_RESET_VALUE, DMA_C3PARH_RESET_VALUE, DMA_CCR_CE, DMA_CCR_RESET_VALUE, DMA_CM0ARH_RESET_VALUE, DMA_CM0ARL_RESET_VALUE, DMA_CNBTR_RESET_VALUE, DMA_CPARH_RESET_VALUE, DMA_CPARL_RESET_VALUE, DMA_CSPR_RESET_VALUE, and IS_DMA_CHANNEL.
uint8_t DMA_GetCurrDataCounter | ( | DMA_Channel_TypeDef * | DMA_Channelx | ) |
Returns the number of remaining data units in the current DMA Channelx transfer.
Definition at line 409 of file stm8l15x_dma.c.
References DMA_Channel_struct::CNBTR, and IS_DMA_CHANNEL.
FlagStatus DMA_GetFlagStatus | ( | DMA_FLAG_TypeDef | DMA_FLAG | ) |
Checks whether the specified DMA Channelx flag is set or not.
Definition at line 524 of file stm8l15x_dma.c.
References DMA_Channel_struct::CSPR, DMA1, DMA1_Channel0, DMA1_Channel1, DMA1_Channel2, DMA1_Channel3, DMA_GCSR_GB, IS_DMA_GET_FLAG, and RESET.
ITStatus DMA_GetITStatus | ( | DMA_IT_TypeDef | DMA_IT | ) |
Checks whether the specified DMA Channelx interrupt has occurred or not.
Definition at line 640 of file stm8l15x_dma.c.
References DMA_Channel_struct::CCR, DMA_Channel_struct::CSPR, DMA1_Channel0, DMA1_Channel1, DMA1_Channel2, DMA1_Channel3, DMA_CCR_HTIE, DMA_CCR_TCIE, IS_DMA_GET_IT, and RESET.
void DMA_GlobalCmd | ( | FunctionalState | NewState | ) |
Enables or disables All the DMA.
Definition at line 282 of file stm8l15x_dma.c.
References DISABLE, DMA1, DMA_GCSR_GE, and IS_FUNCTIONAL_STATE.
void DMA_GlobalDeInit | ( | void | ) |
Deinitializes the DMA Global Status register to its default reset values.
Definition at line 134 of file stm8l15x_dma.c.
References DMA1, DMA_GCSR_GE, and DMA_GCSR_RESET_VALUE.
void DMA_Init | ( | DMA_Channel_TypeDef * | DMA_Channelx, |
uint32_t | DMA_Memory0BaseAddr, | ||
uint16_t | DMA_PeripheralMemory1BaseAddr, | ||
uint8_t | DMA_BufferSize, | ||
DMA_DIR_TypeDef | DMA_DIR, | ||
DMA_Mode_TypeDef | DMA_Mode, | ||
DMA_MemoryIncMode_TypeDef | DMA_MemoryIncMode, | ||
DMA_Priority_TypeDef | DMA_Priority, | ||
DMA_MemoryDataSize_TypeDef | DMA_MemoryDataSize | ||
) |
Initializes the DMA Channelx according to the specified parameters.
Definition at line 218 of file stm8l15x_dma.c.
References DMA_Channel_struct::CCR, DMA_Channel_struct::CM0ARH, DMA_Channel_struct::CM0ARL, DMA_Channel_struct::CM0EAR, DMA_Channel_struct::CNBTR, DMA_Channel_struct::CPARH, DMA_Channel_struct::CPARL, DMA_Channel_struct::CSPR, DMA1_Channel3, DMA_CCR_CE, DMA_CCR_RESET_VALUE, DMA_CSPR_16BM, DMA_CSPR_PL, IS_DMA_BUFFER_SIZE, IS_DMA_CHANNEL, IS_DMA_DIR, IS_DMA_MEMORY_INC_MODE, IS_DMA_MODE, and IS_DMA_PRIORITY.
void DMA_ITConfig | ( | DMA_Channel_TypeDef * | DMA_Channelx, |
DMA_ITx_TypeDef | DMA_ITx, | ||
FunctionalState | NewState | ||
) |
Enables or disables the specified DMA Channelx interrupts.
Definition at line 476 of file stm8l15x_dma.c.
References DMA_Channel_struct::CCR, DISABLE, IS_DMA_CHANNEL, IS_DMA_CONFIG_ITX, and IS_FUNCTIONAL_STATE.
void DMA_SetCurrDataCounter | ( | DMA_Channel_TypeDef * | DMA_Channelx, |
uint8_t | DataNumber | ||
) |
Set the number of data units to transfer for DMA Channelx.
- Note:
- It is advised to use this function rather than DMA_Init() in situations where only the Data buffer needs to be reloaded.
Definition at line 395 of file stm8l15x_dma.c.
References DMA_Channel_struct::CNBTR, and IS_DMA_CHANNEL.
void DMA_SetTimeOut | ( | uint8_t | DMA_TimeOut | ) |
Sets the Time out Value.
- Note:
- If timeout duration >0 (number of wait cycles starting from the latest request), the DMA waits until this timeout has elapsed before requesting from the core a high priority access to the bus.
- If timeout duration =0, there is no timeout and once a request is served, the DMA immediately asks to the CPU a high priority access to the bus.
Definition at line 336 of file stm8l15x_dma.c.
References DMA1, and IS_DMA_TIMEOUT.