RTEMS 6.1-rc1
stm32h7xx_hal_mdma.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_HAL_MDMA_H
21#define STM32H7xx_HAL_MDMA_H
22
23#ifdef __cplusplus
24 extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx_hal_def.h"
29
38/* Exported types ------------------------------------------------------------*/
39
49typedef struct
50{
51
52 uint32_t Request;
59 uint32_t Priority;
62 uint32_t Endianness;
65 uint32_t SourceInc;
68 uint32_t DestinationInc;
71 uint32_t SourceDataSize;
74 uint32_t DestDataSize;
78 uint32_t DataAlignment;
84 uint32_t SourceBurst;
92 uint32_t DestBurst;
114
122typedef struct
123{
124 __IO uint32_t CTCR;
125 __IO uint32_t CBNDTR;
126 __IO uint32_t CSAR;
127 __IO uint32_t CDAR;
128 __IO uint32_t CBRUR;
129 __IO uint32_t CLAR;
130 __IO uint32_t CTBR;
131 __IO uint32_t Reserved;
132 __IO uint32_t CMAR;
133 __IO uint32_t CMDR;
136
141typedef struct
142{
144 uint32_t SrcAddress;
145 uint32_t DstAddress;
147 uint32_t BlockCount;
157
158
162typedef enum
163{
171
175typedef enum
176{
183
187typedef enum
188{
198
199
204{
213 void *Parent;
215 void (* XferCpltCallback)( struct __MDMA_HandleTypeDef * hmdma);
219 void (* XferBlockCpltCallback)( struct __MDMA_HandleTypeDef * hmdma);
223 void (* XferErrorCallback)( struct __MDMA_HandleTypeDef * hmdma);
225 void (* XferAbortCallback)( struct __MDMA_HandleTypeDef * hmdma);
240 __IO uint32_t ErrorCode;
243
248/* Exported constants --------------------------------------------------------*/
249
261#define HAL_MDMA_ERROR_NONE ((uint32_t)0x00000000U)
262#define HAL_MDMA_ERROR_READ_XFER ((uint32_t)0x00000001U)
263#define HAL_MDMA_ERROR_WRITE_XFER ((uint32_t)0x00000002U)
264#define HAL_MDMA_ERROR_MASK_DATA ((uint32_t)0x00000004U)
265#define HAL_MDMA_ERROR_LINKED_LIST ((uint32_t)0x00000008U)
266#define HAL_MDMA_ERROR_ALIGNMENT ((uint32_t)0x00000010U)
267#define HAL_MDMA_ERROR_BLOCK_SIZE ((uint32_t)0x00000020U)
268#define HAL_MDMA_ERROR_TIMEOUT ((uint32_t)0x00000040U)
269#define HAL_MDMA_ERROR_NO_XFER ((uint32_t)0x00000080U)
270#define HAL_MDMA_ERROR_BUSY ((uint32_t)0x00000100U)
282#define MDMA_REQUEST_DMA1_Stream0_TC ((uint32_t)0x00000000U)
283#define MDMA_REQUEST_DMA1_Stream1_TC ((uint32_t)0x00000001U)
284#define MDMA_REQUEST_DMA1_Stream2_TC ((uint32_t)0x00000002U)
285#define MDMA_REQUEST_DMA1_Stream3_TC ((uint32_t)0x00000003U)
286#define MDMA_REQUEST_DMA1_Stream4_TC ((uint32_t)0x00000004U)
287#define MDMA_REQUEST_DMA1_Stream5_TC ((uint32_t)0x00000005U)
288#define MDMA_REQUEST_DMA1_Stream6_TC ((uint32_t)0x00000006U)
289#define MDMA_REQUEST_DMA1_Stream7_TC ((uint32_t)0x00000007U)
290#define MDMA_REQUEST_DMA2_Stream0_TC ((uint32_t)0x00000008U)
291#define MDMA_REQUEST_DMA2_Stream1_TC ((uint32_t)0x00000009U)
292#define MDMA_REQUEST_DMA2_Stream2_TC ((uint32_t)0x0000000AU)
293#define MDMA_REQUEST_DMA2_Stream3_TC ((uint32_t)0x0000000BU)
294#define MDMA_REQUEST_DMA2_Stream4_TC ((uint32_t)0x0000000CU)
295#define MDMA_REQUEST_DMA2_Stream5_TC ((uint32_t)0x0000000DU)
296#define MDMA_REQUEST_DMA2_Stream6_TC ((uint32_t)0x0000000EU)
297#define MDMA_REQUEST_DMA2_Stream7_TC ((uint32_t)0x0000000FU)
298#if defined (LTDC)
299#define MDMA_REQUEST_LTDC_LINE_IT ((uint32_t)0x00000010U)
300#endif /* LTDC */
301#if defined (JPEG)
302#define MDMA_REQUEST_JPEG_INFIFO_TH ((uint32_t)0x00000011U)
303#define MDMA_REQUEST_JPEG_INFIFO_NF ((uint32_t)0x00000012U)
304#define MDMA_REQUEST_JPEG_OUTFIFO_TH ((uint32_t)0x00000013U)
305#define MDMA_REQUEST_JPEG_OUTFIFO_NE ((uint32_t)0x00000014U)
306#define MDMA_REQUEST_JPEG_END_CONVERSION ((uint32_t)0x00000015U)
307#endif /* JPEG */
308#if defined (OCTOSPI1)
309#define MDMA_REQUEST_OCTOSPI1_FIFO_TH ((uint32_t)0x00000016U)
310#define MDMA_REQUEST_OCTOSPI1_TC ((uint32_t)0x00000017U)
311#endif /* OCTOSPI1 */
312#if defined (QUADSPI)
313#define MDMA_REQUEST_QUADSPI_FIFO_TH ((uint32_t)0x00000016U)
314#define MDMA_REQUEST_QUADSPI_TC ((uint32_t)0x00000017U)
315#endif /* QUADSPI */
316#define MDMA_REQUEST_DMA2D_CLUT_TC ((uint32_t)0x00000018U)
317#define MDMA_REQUEST_DMA2D_TC ((uint32_t)0x00000019U)
318#define MDMA_REQUEST_DMA2D_TW ((uint32_t)0x0000001AU)
320#if defined (DSI)
321#define MDMA_REQUEST_DSI_TEARING_EFFECT ((uint32_t)0x0000001BU)
322#define MDMA_REQUEST_DSI_END_REFRESH ((uint32_t)0x0000001CU)
323#endif /* DSI */
324
325#define MDMA_REQUEST_SDMMC1_END_DATA ((uint32_t)0x0000001DU)
327#define MDMA_REQUEST_SDMMC1_DMA_ENDBUFFER ((uint32_t)0x0000001EU)
328#define MDMA_REQUEST_SDMMC1_COMMAND_END ((uint32_t)0x0000001FU)
330#if defined (OCTOSPI2)
331#define MDMA_REQUEST_OCTOSPI2_FIFO_TH ((uint32_t)0x00000020U)
332#define MDMA_REQUEST_OCTOSPI2_TC ((uint32_t)0x00000021U)
333#endif /* OCTOSPI2 */
334
335#define MDMA_REQUEST_SW ((uint32_t)0x40000000U)
346#define MDMA_BUFFER_TRANSFER ((uint32_t)0x00000000U)
347#define MDMA_BLOCK_TRANSFER ((uint32_t)MDMA_CTCR_TRGM_0)
348#define MDMA_REPEAT_BLOCK_TRANSFER ((uint32_t)MDMA_CTCR_TRGM_1)
349#define MDMA_FULL_TRANSFER ((uint32_t)MDMA_CTCR_TRGM)
360#define MDMA_PRIORITY_LOW ((uint32_t)0x00000000U)
361#define MDMA_PRIORITY_MEDIUM ((uint32_t)MDMA_CCR_PL_0)
362#define MDMA_PRIORITY_HIGH ((uint32_t)MDMA_CCR_PL_1)
363#define MDMA_PRIORITY_VERY_HIGH ((uint32_t)MDMA_CCR_PL)
375#define MDMA_LITTLE_ENDIANNESS_PRESERVE ((uint32_t)0x00000000U)
376#define MDMA_LITTLE_BYTE_ENDIANNESS_EXCHANGE ((uint32_t)MDMA_CCR_BEX)
377#define MDMA_LITTLE_HALFWORD_ENDIANNESS_EXCHANGE ((uint32_t)MDMA_CCR_HEX)
378#define MDMA_LITTLE_WORD_ENDIANNESS_EXCHANGE ((uint32_t)MDMA_CCR_WEX)
389#define MDMA_SRC_INC_DISABLE ((uint32_t)0x00000000U)
390#define MDMA_SRC_INC_BYTE ((uint32_t)MDMA_CTCR_SINC_1)
391#define MDMA_SRC_INC_HALFWORD ((uint32_t)MDMA_CTCR_SINC_1 | (uint32_t)MDMA_CTCR_SINCOS_0)
392#define MDMA_SRC_INC_WORD ((uint32_t)MDMA_CTCR_SINC_1 | (uint32_t)MDMA_CTCR_SINCOS_1)
393#define MDMA_SRC_INC_DOUBLEWORD ((uint32_t)MDMA_CTCR_SINC_1 | (uint32_t)MDMA_CTCR_SINCOS)
394#define MDMA_SRC_DEC_BYTE ((uint32_t)MDMA_CTCR_SINC)
395#define MDMA_SRC_DEC_HALFWORD ((uint32_t)MDMA_CTCR_SINC | (uint32_t)MDMA_CTCR_SINCOS_0)
396#define MDMA_SRC_DEC_WORD ((uint32_t)MDMA_CTCR_SINC | (uint32_t)MDMA_CTCR_SINCOS_1)
397#define MDMA_SRC_DEC_DOUBLEWORD ((uint32_t)MDMA_CTCR_SINC | (uint32_t)MDMA_CTCR_SINCOS)
408#define MDMA_DEST_INC_DISABLE ((uint32_t)0x00000000U)
409#define MDMA_DEST_INC_BYTE ((uint32_t)MDMA_CTCR_DINC_1)
410#define MDMA_DEST_INC_HALFWORD ((uint32_t)MDMA_CTCR_DINC_1 | (uint32_t)MDMA_CTCR_DINCOS_0)
411#define MDMA_DEST_INC_WORD ((uint32_t)MDMA_CTCR_DINC_1 | (uint32_t)MDMA_CTCR_DINCOS_1)
412#define MDMA_DEST_INC_DOUBLEWORD ((uint32_t)MDMA_CTCR_DINC_1 | (uint32_t)MDMA_CTCR_DINCOS)
413#define MDMA_DEST_DEC_BYTE ((uint32_t)MDMA_CTCR_DINC)
414#define MDMA_DEST_DEC_HALFWORD ((uint32_t)MDMA_CTCR_DINC | (uint32_t)MDMA_CTCR_DINCOS_0)
415#define MDMA_DEST_DEC_WORD ((uint32_t)MDMA_CTCR_DINC | (uint32_t)MDMA_CTCR_DINCOS_1)
416#define MDMA_DEST_DEC_DOUBLEWORD ((uint32_t)MDMA_CTCR_DINC | (uint32_t)MDMA_CTCR_DINCOS)
427#define MDMA_SRC_DATASIZE_BYTE ((uint32_t)0x00000000U)
428#define MDMA_SRC_DATASIZE_HALFWORD ((uint32_t)MDMA_CTCR_SSIZE_0)
429#define MDMA_SRC_DATASIZE_WORD ((uint32_t)MDMA_CTCR_SSIZE_1)
430#define MDMA_SRC_DATASIZE_DOUBLEWORD ((uint32_t)MDMA_CTCR_SSIZE)
441#define MDMA_DEST_DATASIZE_BYTE ((uint32_t)0x00000000U)
442#define MDMA_DEST_DATASIZE_HALFWORD ((uint32_t)MDMA_CTCR_DSIZE_0)
443#define MDMA_DEST_DATASIZE_WORD ((uint32_t)MDMA_CTCR_DSIZE_1)
444#define MDMA_DEST_DATASIZE_DOUBLEWORD ((uint32_t)MDMA_CTCR_DSIZE)
455#define MDMA_DATAALIGN_PACKENABLE ((uint32_t)MDMA_CTCR_PKE)
457#define MDMA_DATAALIGN_RIGHT ((uint32_t)0x00000000U)
458#define MDMA_DATAALIGN_RIGHT_SIGNED ((uint32_t)MDMA_CTCR_PAM_0)
460#define MDMA_DATAALIGN_LEFT ((uint32_t)MDMA_CTCR_PAM_1)
471#define MDMA_SOURCE_BURST_SINGLE ((uint32_t)0x00000000U)
472#define MDMA_SOURCE_BURST_2BEATS ((uint32_t)MDMA_CTCR_SBURST_0)
473#define MDMA_SOURCE_BURST_4BEATS ((uint32_t)MDMA_CTCR_SBURST_1)
474#define MDMA_SOURCE_BURST_8BEATS ((uint32_t)MDMA_CTCR_SBURST_0 | (uint32_t)MDMA_CTCR_SBURST_1)
475#define MDMA_SOURCE_BURST_16BEATS ((uint32_t)MDMA_CTCR_SBURST_2)
476#define MDMA_SOURCE_BURST_32BEATS ((uint32_t)MDMA_CTCR_SBURST_0 | (uint32_t)MDMA_CTCR_SBURST_2)
477#define MDMA_SOURCE_BURST_64BEATS ((uint32_t)MDMA_CTCR_SBURST_1 | (uint32_t)MDMA_CTCR_SBURST_2)
478#define MDMA_SOURCE_BURST_128BEATS ((uint32_t)MDMA_CTCR_SBURST)
489#define MDMA_DEST_BURST_SINGLE ((uint32_t)0x00000000U)
490#define MDMA_DEST_BURST_2BEATS ((uint32_t)MDMA_CTCR_DBURST_0)
491#define MDMA_DEST_BURST_4BEATS ((uint32_t)MDMA_CTCR_DBURST_1)
492#define MDMA_DEST_BURST_8BEATS ((uint32_t)MDMA_CTCR_DBURST_0 | (uint32_t)MDMA_CTCR_DBURST_1)
493#define MDMA_DEST_BURST_16BEATS ((uint32_t)MDMA_CTCR_DBURST_2)
494#define MDMA_DEST_BURST_32BEATS ((uint32_t)MDMA_CTCR_DBURST_0 | (uint32_t)MDMA_CTCR_DBURST_2)
495#define MDMA_DEST_BURST_64BEATS ((uint32_t)MDMA_CTCR_DBURST_1 | (uint32_t)MDMA_CTCR_DBURST_2)
496#define MDMA_DEST_BURST_128BEATS ((uint32_t)MDMA_CTCR_DBURST)
507#define MDMA_IT_TE ((uint32_t)MDMA_CCR_TEIE)
508#define MDMA_IT_CTC ((uint32_t)MDMA_CCR_CTCIE)
509#define MDMA_IT_BRT ((uint32_t)MDMA_CCR_BRTIE)
510#define MDMA_IT_BT ((uint32_t)MDMA_CCR_BTIE)
511#define MDMA_IT_BFTC ((uint32_t)MDMA_CCR_TCIE)
522#define MDMA_FLAG_TE ((uint32_t)MDMA_CISR_TEIF)
523#define MDMA_FLAG_CTC ((uint32_t)MDMA_CISR_CTCIF)
524#define MDMA_FLAG_BRT ((uint32_t)MDMA_CISR_BRTIF)
525#define MDMA_FLAG_BT ((uint32_t)MDMA_CISR_BTIF)
526#define MDMA_FLAG_BFTC ((uint32_t)MDMA_CISR_TCIF)
527#define MDMA_FLAG_CRQA ((uint32_t)MDMA_CISR_CRQA)
537/* Exported macro ------------------------------------------------------------*/
538
549#define __HAL_MDMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR |= MDMA_CCR_EN)
550
556#define __HAL_MDMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR &= ~MDMA_CCR_EN)
557
571#define __HAL_MDMA_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->CISR & (__FLAG__))
572
585#define __HAL_MDMA_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->CIFCR = (__FLAG__))
586
599#define __HAL_MDMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CCR |= (__INTERRUPT__))
600
613#define __HAL_MDMA_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CCR &= ~(__INTERRUPT__))
614
626#define __HAL_MDMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CCR & (__INTERRUPT__)))
627
634#define __HAL_MDMA_SET_COUNTER(__HANDLE__, __COUNTER__) ((__HANDLE__)->Instance->CBNDTR |= ((__COUNTER__) & MDMA_CBNDTR_BNDT))
635
641#define __HAL_MDMA_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CBNDTR & MDMA_CBNDTR_BNDT)
642
647/* Exported functions --------------------------------------------------------*/
653/* Initialization and de-initialization functions *****************************/
659HAL_StatusTypeDef HAL_MDMA_Init(MDMA_HandleTypeDef *hmdma);
660HAL_StatusTypeDef HAL_MDMA_DeInit (MDMA_HandleTypeDef *hmdma);
661HAL_StatusTypeDef HAL_MDMA_ConfigPostRequestMask(MDMA_HandleTypeDef *hmdma, uint32_t MaskAddress, uint32_t MaskData);
662
663HAL_StatusTypeDef HAL_MDMA_RegisterCallback(MDMA_HandleTypeDef *hmdma, HAL_MDMA_CallbackIDTypeDef CallbackID, void (* pCallback)(MDMA_HandleTypeDef *_hmdma));
664HAL_StatusTypeDef HAL_MDMA_UnRegisterCallback(MDMA_HandleTypeDef *hmdma, HAL_MDMA_CallbackIDTypeDef CallbackID);
665
670/* Linked list operation functions ********************************************/
677HAL_StatusTypeDef HAL_MDMA_LinkedList_CreateNode(MDMA_LinkNodeTypeDef *pNode, MDMA_LinkNodeConfTypeDef *pNodeConfig);
678HAL_StatusTypeDef HAL_MDMA_LinkedList_AddNode(MDMA_HandleTypeDef *hmdma, MDMA_LinkNodeTypeDef *pNewNode, MDMA_LinkNodeTypeDef *pPrevNode);
679HAL_StatusTypeDef HAL_MDMA_LinkedList_RemoveNode(MDMA_HandleTypeDef *hmdma, MDMA_LinkNodeTypeDef *pNode);
680HAL_StatusTypeDef HAL_MDMA_LinkedList_EnableCircularMode(MDMA_HandleTypeDef *hmdma);
681HAL_StatusTypeDef HAL_MDMA_LinkedList_DisableCircularMode(MDMA_HandleTypeDef *hmdma);
682
683
688/* IO operation functions *****************************************************/
694HAL_StatusTypeDef HAL_MDMA_Start (MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount);
695HAL_StatusTypeDef HAL_MDMA_Start_IT(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount);
696HAL_StatusTypeDef HAL_MDMA_Abort(MDMA_HandleTypeDef *hmdma);
697HAL_StatusTypeDef HAL_MDMA_Abort_IT(MDMA_HandleTypeDef *hmdma);
698HAL_StatusTypeDef HAL_MDMA_PollForTransfer(MDMA_HandleTypeDef *hmdma, HAL_MDMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout);
699HAL_StatusTypeDef HAL_MDMA_GenerateSWRequest(MDMA_HandleTypeDef *hmdma);
700void HAL_MDMA_IRQHandler(MDMA_HandleTypeDef *hmdma);
701
706/* Peripheral State and Error functions ***************************************/
712HAL_MDMA_StateTypeDef HAL_MDMA_GetState(MDMA_HandleTypeDef *hmdma);
713uint32_t HAL_MDMA_GetError(MDMA_HandleTypeDef *hmdma);
714
723/* Private types -------------------------------------------------------------*/
733/* Private defines -----------------------------------------------------------*/
743/* Private variables ---------------------------------------------------------*/
753/* Private constants ---------------------------------------------------------*/
763/* Private macros ------------------------------------------------------------*/
769#define IS_MDMA_LEVEL_COMPLETE(__LEVEL__) (((__LEVEL__) == HAL_MDMA_FULL_TRANSFER ) || \
770 ((__LEVEL__) == HAL_MDMA_BUFFER_TRANSFER )|| \
771 ((__LEVEL__) == HAL_MDMA_BLOCK_TRANSFER ) || \
772 ((__LEVEL__) == HAL_MDMA_REPEAT_BLOCK_TRANSFER ))
773
774
775#define IS_MDMA_PRIORITY(__PRIORITY__) (((__PRIORITY__) == MDMA_PRIORITY_LOW ) || \
776 ((__PRIORITY__) == MDMA_PRIORITY_MEDIUM) || \
777 ((__PRIORITY__) == MDMA_PRIORITY_HIGH) || \
778 ((__PRIORITY__) == MDMA_PRIORITY_VERY_HIGH))
779
780#define IS_MDMA_ENDIANNESS_MODE(__ENDIANNESS__) (((__ENDIANNESS__) == MDMA_LITTLE_ENDIANNESS_PRESERVE ) || \
781 ((__ENDIANNESS__) == MDMA_LITTLE_BYTE_ENDIANNESS_EXCHANGE) || \
782 ((__ENDIANNESS__) == MDMA_LITTLE_HALFWORD_ENDIANNESS_EXCHANGE) || \
783 ((__ENDIANNESS__) == MDMA_LITTLE_WORD_ENDIANNESS_EXCHANGE))
784
785
786#if defined (OCTOSPI2)
787#define IS_MDMA_REQUEST(__REQUEST__) (((__REQUEST__) == MDMA_REQUEST_SW ) || ((__REQUEST__) <= MDMA_REQUEST_OCTOSPI2_TC))
788#else
789#define IS_MDMA_REQUEST(__REQUEST__) (((__REQUEST__) == MDMA_REQUEST_SW ) || ((__REQUEST__) <= MDMA_REQUEST_SDMMC1_COMMAND_END))
790#endif /* OCTOSPI2 */
791
792#define IS_MDMA_SOURCE_INC(__INC__) (((__INC__) == MDMA_SRC_INC_DISABLE ) || \
793 ((__INC__) == MDMA_SRC_INC_BYTE ) || \
794 ((__INC__) == MDMA_SRC_INC_HALFWORD ) || \
795 ((__INC__) == MDMA_SRC_INC_WORD ) || \
796 ((__INC__) == MDMA_SRC_INC_DOUBLEWORD) || \
797 ((__INC__) == MDMA_SRC_DEC_BYTE) || \
798 ((__INC__) == MDMA_SRC_DEC_HALFWORD) || \
799 ((__INC__) == MDMA_SRC_DEC_WORD) || \
800 ((__INC__) == MDMA_SRC_DEC_DOUBLEWORD))
801
802#define IS_MDMA_DESTINATION_INC(__INC__) (((__INC__) == MDMA_DEST_INC_DISABLE ) || \
803 ((__INC__) == MDMA_DEST_INC_BYTE ) || \
804 ((__INC__) == MDMA_DEST_INC_HALFWORD ) || \
805 ((__INC__) == MDMA_DEST_INC_WORD ) || \
806 ((__INC__) == MDMA_DEST_INC_DOUBLEWORD) || \
807 ((__INC__) == MDMA_DEST_DEC_BYTE) || \
808 ((__INC__) == MDMA_DEST_DEC_HALFWORD) || \
809 ((__INC__) == MDMA_DEST_DEC_WORD) || \
810 ((__INC__) == MDMA_DEST_DEC_DOUBLEWORD))
811
812#define IS_MDMA_SOURCE_DATASIZE(__SIZE__) (((__SIZE__) == MDMA_SRC_DATASIZE_BYTE ) || \
813 ((__SIZE__) == MDMA_SRC_DATASIZE_HALFWORD ) || \
814 ((__SIZE__) == MDMA_SRC_DATASIZE_WORD ) || \
815 ((__SIZE__) == MDMA_SRC_DATASIZE_DOUBLEWORD))
816
817#define IS_MDMA_DESTINATION_DATASIZE(__SIZE__) (((__SIZE__) == MDMA_DEST_DATASIZE_BYTE ) || \
818 ((__SIZE__) == MDMA_DEST_DATASIZE_HALFWORD ) || \
819 ((__SIZE__) == MDMA_DEST_DATASIZE_WORD ) || \
820 ((__SIZE__) == MDMA_DEST_DATASIZE_DOUBLEWORD))
821
822#define IS_MDMA_DATA_ALIGNMENT(__ALIGNMENT__) (((__ALIGNMENT__) == MDMA_DATAALIGN_PACKENABLE ) || \
823 ((__ALIGNMENT__) == MDMA_DATAALIGN_RIGHT ) || \
824 ((__ALIGNMENT__) == MDMA_DATAALIGN_RIGHT_SIGNED ) || \
825 ((__ALIGNMENT__) == MDMA_DATAALIGN_LEFT))
826
827
828#define IS_MDMA_SOURCE_BURST(__BURST__) (((__BURST__) == MDMA_SOURCE_BURST_SINGLE ) || \
829 ((__BURST__) == MDMA_SOURCE_BURST_2BEATS ) || \
830 ((__BURST__) == MDMA_SOURCE_BURST_4BEATS ) || \
831 ((__BURST__) == MDMA_SOURCE_BURST_8BEATS) || \
832 ((__BURST__) == MDMA_SOURCE_BURST_16BEATS) || \
833 ((__BURST__) == MDMA_SOURCE_BURST_32BEATS) || \
834 ((__BURST__) == MDMA_SOURCE_BURST_64BEATS) || \
835 ((__BURST__) == MDMA_SOURCE_BURST_128BEATS))
836
837
838#define IS_MDMA_DESTINATION_BURST(__BURST__) (((__BURST__) == MDMA_DEST_BURST_SINGLE ) || \
839 ((__BURST__) == MDMA_DEST_BURST_2BEATS ) || \
840 ((__BURST__) == MDMA_DEST_BURST_4BEATS ) || \
841 ((__BURST__) == MDMA_DEST_BURST_8BEATS) || \
842 ((__BURST__) == MDMA_DEST_BURST_16BEATS) || \
843 ((__BURST__) == MDMA_DEST_BURST_32BEATS) || \
844 ((__BURST__) == MDMA_DEST_BURST_64BEATS) || \
845 ((__BURST__) == MDMA_DEST_BURST_128BEATS))
846
847 #define IS_MDMA_TRANSFER_TRIGGER_MODE(__MODE__) (((__MODE__) == MDMA_BUFFER_TRANSFER ) || \
848 ((__MODE__) == MDMA_BLOCK_TRANSFER ) || \
849 ((__MODE__) == MDMA_REPEAT_BLOCK_TRANSFER ) || \
850 ((__MODE__) == MDMA_FULL_TRANSFER))
851
852#define IS_MDMA_BUFFER_TRANSFER_LENGTH(__LENGTH__) (((__LENGTH__) >= 0x00000001U) && ((__LENGTH__) < 0x000000FFU))
853
854#define IS_MDMA_BLOCK_COUNT(__COUNT__) (((__COUNT__) > 0U ) && ((__COUNT__) <= 4096U))
855
856#define IS_MDMA_TRANSFER_LENGTH(SIZE) (((SIZE) > 0U) && ((SIZE) <= 65536U))
857
858#define IS_MDMA_BLOCK_ADDR_OFFSET(__BLOCK_ADD_OFFSET__) (((__BLOCK_ADD_OFFSET__) > (-65536)) && ((__BLOCK_ADD_OFFSET__) < 65536))
859
864/* Private functions prototypes ----------------------------------------------*/
874/* Private functions ---------------------------------------------------------*/
892#ifdef __cplusplus
893}
894#endif
895
896#endif /* STM32H7xx_HAL_MDMA_H */
897
#define __IO
Definition: core_cm4.h:239
HAL_MDMA_StateTypeDef
HAL MDMA State structure definition.
Definition: stm32h7xx_hal_mdma.h:163
HAL_MDMA_LevelCompleteTypeDef
HAL MDMA Level Complete structure definition.
Definition: stm32h7xx_hal_mdma.h:176
HAL_MDMA_CallbackIDTypeDef
HAL MDMA Callbacks IDs structure definition.
Definition: stm32h7xx_hal_mdma.h:188
struct __MDMA_HandleTypeDef MDMA_HandleTypeDef
MDMA handle Structure definition.
@ HAL_MDMA_STATE_RESET
Definition: stm32h7xx_hal_mdma.h:164
@ HAL_MDMA_STATE_BUSY
Definition: stm32h7xx_hal_mdma.h:166
@ HAL_MDMA_STATE_ABORT
Definition: stm32h7xx_hal_mdma.h:168
@ HAL_MDMA_STATE_READY
Definition: stm32h7xx_hal_mdma.h:165
@ HAL_MDMA_STATE_ERROR
Definition: stm32h7xx_hal_mdma.h:167
@ HAL_MDMA_FULL_TRANSFER
Definition: stm32h7xx_hal_mdma.h:177
@ HAL_MDMA_BUFFER_TRANSFER
Definition: stm32h7xx_hal_mdma.h:178
@ HAL_MDMA_BLOCK_TRANSFER
Definition: stm32h7xx_hal_mdma.h:179
@ HAL_MDMA_REPEAT_BLOCK_TRANSFER
Definition: stm32h7xx_hal_mdma.h:180
@ HAL_MDMA_XFER_CPLT_CB_ID
Definition: stm32h7xx_hal_mdma.h:189
@ HAL_MDMA_XFER_ABORT_CB_ID
Definition: stm32h7xx_hal_mdma.h:194
@ HAL_MDMA_XFER_REPBLOCKCPLT_CB_ID
Definition: stm32h7xx_hal_mdma.h:192
@ HAL_MDMA_XFER_BUFFERCPLT_CB_ID
Definition: stm32h7xx_hal_mdma.h:190
@ HAL_MDMA_XFER_ERROR_CB_ID
Definition: stm32h7xx_hal_mdma.h:193
@ HAL_MDMA_XFER_ALL_CB_ID
Definition: stm32h7xx_hal_mdma.h:195
@ HAL_MDMA_XFER_BLOCKCPLT_CB_ID
Definition: stm32h7xx_hal_mdma.h:191
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
HAL_LockTypeDef
HAL Lock structures definition.
Definition: stm32h7xx_hal_def.h:58
Definition: stm32h723xx.h:664
MDMA Configuration Structure definition.
Definition: stm32h7xx_hal_mdma.h:50
int32_t SourceBlockAddressOffset
Definition: stm32h7xx_hal_mdma.h:100
uint32_t TransferTriggerMode
Definition: stm32h7xx_hal_mdma.h:55
uint32_t DestinationInc
Definition: stm32h7xx_hal_mdma.h:68
uint32_t DestBurst
Definition: stm32h7xx_hal_mdma.h:92
uint32_t SourceInc
Definition: stm32h7xx_hal_mdma.h:65
uint32_t SourceBurst
Definition: stm32h7xx_hal_mdma.h:84
uint32_t Priority
Definition: stm32h7xx_hal_mdma.h:59
uint32_t SourceDataSize
Definition: stm32h7xx_hal_mdma.h:71
uint32_t BufferTransferLength
Definition: stm32h7xx_hal_mdma.h:81
uint32_t Endianness
Definition: stm32h7xx_hal_mdma.h:62
uint32_t Request
Definition: stm32h7xx_hal_mdma.h:52
uint32_t DataAlignment
Definition: stm32h7xx_hal_mdma.h:78
int32_t DestBlockAddressOffset
Definition: stm32h7xx_hal_mdma.h:107
uint32_t DestDataSize
Definition: stm32h7xx_hal_mdma.h:74
HAL MDMA linked list node configuration structure definition.
Definition: stm32h7xx_hal_mdma.h:142
uint32_t PostRequestMaskData
Definition: stm32h7xx_hal_mdma.h:152
uint32_t PostRequestMaskAddress
Definition: stm32h7xx_hal_mdma.h:149
MDMA_InitTypeDef Init
Definition: stm32h7xx_hal_mdma.h:143
uint32_t BlockDataLength
Definition: stm32h7xx_hal_mdma.h:146
uint32_t DstAddress
Definition: stm32h7xx_hal_mdma.h:145
uint32_t BlockCount
Definition: stm32h7xx_hal_mdma.h:147
uint32_t SrcAddress
Definition: stm32h7xx_hal_mdma.h:144
HAL MDMA linked list node structure definition.
Definition: stm32h7xx_hal_mdma.h:123
__IO uint32_t CDAR
Definition: stm32h7xx_hal_mdma.h:127
__IO uint32_t CTCR
Definition: stm32h7xx_hal_mdma.h:124
__IO uint32_t CBRUR
Definition: stm32h7xx_hal_mdma.h:128
__IO uint32_t Reserved
Definition: stm32h7xx_hal_mdma.h:131
__IO uint32_t CLAR
Definition: stm32h7xx_hal_mdma.h:129
__IO uint32_t CMDR
Definition: stm32h7xx_hal_mdma.h:133
__IO uint32_t CBNDTR
Definition: stm32h7xx_hal_mdma.h:125
__IO uint32_t CMAR
Definition: stm32h7xx_hal_mdma.h:132
__IO uint32_t CTBR
Definition: stm32h7xx_hal_mdma.h:130
__IO uint32_t CSAR
Definition: stm32h7xx_hal_mdma.h:126
MDMA handle Structure definition.
Definition: stm32h7xx_hal_mdma.h:204
__IO uint32_t ErrorCode
Definition: stm32h7xx_hal_mdma.h:240
void(* XferBufferCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h7xx_hal_mdma.h:217
MDMA_LinkNodeTypeDef * FirstLinkedListNodeAddress
Definition: stm32h7xx_hal_mdma.h:228
MDMA_LinkNodeTypeDef * LastLinkedListNodeAddress
Definition: stm32h7xx_hal_mdma.h:234
void * Parent
Definition: stm32h7xx_hal_mdma.h:213
void(* XferCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h7xx_hal_mdma.h:215
void(* XferBlockCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h7xx_hal_mdma.h:219
void(* XferRepeatBlockCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h7xx_hal_mdma.h:221
uint32_t LinkedListNodeCounter
Definition: stm32h7xx_hal_mdma.h:238
HAL_LockTypeDef Lock
Definition: stm32h7xx_hal_mdma.h:209
MDMA_Channel_TypeDef * Instance
Definition: stm32h7xx_hal_mdma.h:205
__IO HAL_MDMA_StateTypeDef State
Definition: stm32h7xx_hal_mdma.h:211
MDMA_InitTypeDef Init
Definition: stm32h7xx_hal_mdma.h:207
void(* XferErrorCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h7xx_hal_mdma.h:223
void(* XferAbortCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h7xx_hal_mdma.h:225