20#ifndef STM32H7xx_HAL_GFXMMU_H
21#define STM32H7xx_HAL_GFXMMU_H
51 HAL_GFXMMU_STATE_RESET = 0x00U,
52 HAL_GFXMMU_STATE_READY = 0x01U,
53}HAL_GFXMMU_StateTypeDef;
64}GFXMMU_BuffersTypeDef;
71 FunctionalState Activation;
75 uint32_t CacheLockBuffer;
81 uint32_t OutterBufferability;
83 uint32_t OutterCachability;
87}GFXMMU_CachePrefetchTypeDef;
94 FunctionalState Activation;
95 uint32_t UsedInterrupts;
98}GFXMMU_InterruptsTypeDef;
105 uint32_t BlocksPerLine;
107 uint32_t DefaultValue;
108 GFXMMU_BuffersTypeDef Buffers;
109 GFXMMU_CachePrefetchTypeDef CachePrefetch;
110 GFXMMU_InterruptsTypeDef Interrupts;
116#if (USE_HAL_GFXMMU_REGISTER_CALLBACKS == 1)
117typedef struct __GFXMMU_HandleTypeDef
123 GFXMMU_InitTypeDef Init;
124 HAL_GFXMMU_StateTypeDef State;
125 __IO uint32_t ErrorCode;
126#if (USE_HAL_GFXMMU_REGISTER_CALLBACKS == 1)
127 void (*ErrorCallback) (
struct __GFXMMU_HandleTypeDef *hgfxmmu);
128 void (*MspInitCallback) (
struct __GFXMMU_HandleTypeDef *hgfxmmu);
129 void (*MspDeInitCallback) (
struct __GFXMMU_HandleTypeDef *hgfxmmu);
131}GFXMMU_HandleTypeDef;
142 uint32_t FirstVisibleBlock;
144 uint32_t LastVisibleBlock;
150}GFXMMU_LutLineTypeDef;
152#if (USE_HAL_GFXMMU_REGISTER_CALLBACKS == 1)
158 HAL_GFXMMU_ERROR_CB_ID = 0x00U,
159 HAL_GFXMMU_MSPINIT_CB_ID = 0x01U,
160 HAL_GFXMMU_MSPDEINIT_CB_ID = 0x02U
161}HAL_GFXMMU_CallbackIDTypeDef;
166typedef void (*pGFXMMU_CallbackTypeDef)(GFXMMU_HandleTypeDef *hgfxmmu);
184#define GFXMMU_256BLOCKS 0x00000000U
185#define GFXMMU_192BLOCKS GFXMMU_CR_192BM
194#define GFXMMU_CACHE_LOCK_DISABLE 0x00000000U
195#define GFXMMU_CACHE_LOCK_ENABLE GFXMMU_CR_CL
204#define GFXMMU_CACHE_LOCK_BUFFER0 0x00000000U
205#define GFXMMU_CACHE_LOCK_BUFFER1 GFXMMU_CR_CLB_0
206#define GFXMMU_CACHE_LOCK_BUFFER2 GFXMMU_CR_CLB_1
207#define GFXMMU_CACHE_LOCK_BUFFER3 GFXMMU_CR_CLB
216#define GFXMMU_CACHE_FORCE_DISABLE 0x00000000U
217#define GFXMMU_CACHE_FORCE_ENABLE GFXMMU_CR_FC
226#define GFXMMU_OUTTER_BUFFERABILITY_DISABLE 0x00000000U
227#define GFXMMU_OUTTER_BUFFERABILITY_ENABLE GFXMMU_CR_OB
236#define GFXMMU_OUTTER_CACHABILITY_DISABLE 0x00000000U
237#define GFXMMU_OUTTER_CACHABILITY_ENABLE GFXMMU_CR_OC
246#define GFXMMU_PREFETCH_DISABLE GFXMMU_CR_PD
247#define GFXMMU_PREFETCH_ENABLE 0x00000000U
256#define GFXMMU_AHB_MASTER_ERROR_IT GFXMMU_CR_AMEIE
257#define GFXMMU_BUFFER0_OVERFLOW_IT GFXMMU_CR_B0OIE
258#define GFXMMU_BUFFER1_OVERFLOW_IT GFXMMU_CR_B1OIE
259#define GFXMMU_BUFFER2_OVERFLOW_IT GFXMMU_CR_B2OIE
260#define GFXMMU_BUFFER3_OVERFLOW_IT GFXMMU_CR_B3OIE
269#define GFXMMU_ERROR_NONE 0x00000000U
270#define GFXMMU_ERROR_BUFFER0_OVERFLOW GFXMMU_SR_B0OF
271#define GFXMMU_ERROR_BUFFER1_OVERFLOW GFXMMU_SR_B1OF
272#define GFXMMU_ERROR_BUFFER2_OVERFLOW GFXMMU_SR_B2OF
273#define GFXMMU_ERROR_BUFFER3_OVERFLOW GFXMMU_SR_B3OF
274#define GFXMMU_ERROR_AHB_MASTER GFXMMU_SR_AMEF
275#if (USE_HAL_GFXMMU_REGISTER_CALLBACKS == 1)
276#define GFXMMU_ERROR_INVALID_CALLBACK 0x00000100U
286#define GFXMMU_LUT_LINE_DISABLE 0x00000000U
287#define GFXMMU_LUT_LINE_ENABLE GFXMMU_LUTxL_EN
296#define GFXMMU_CACHE_FORCE_FLUSH GFXMMU_CCR_FF
297#define GFXMMU_CACHE_FORCE_INVALIDATE GFXMMU_CCR_FI
317#if (USE_HAL_GFXMMU_REGISTER_CALLBACKS == 1)
318#define __HAL_GFXMMU_RESET_HANDLE_STATE(__HANDLE__) do{ \
319 (__HANDLE__)->State = HAL_GFXMMU_STATE_RESET; \
320 (__HANDLE__)->MspInitCallback = NULL; \
321 (__HANDLE__)->MspDeInitCallback = NULL; \
324#define __HAL_GFXMMU_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_GFXMMU_STATE_RESET)
343void HAL_GFXMMU_MspInit(GFXMMU_HandleTypeDef *hgfxmmu);
344void HAL_GFXMMU_MspDeInit(GFXMMU_HandleTypeDef *hgfxmmu);
345#if (USE_HAL_GFXMMU_REGISTER_CALLBACKS == 1)
348 HAL_GFXMMU_CallbackIDTypeDef CallbackID,
349 pGFXMMU_CallbackTypeDef pCallback);
351 HAL_GFXMMU_CallbackIDTypeDef CallbackID);
363 uint32_t LinesNumber,
368 uint32_t LinesNumber);
370HAL_StatusTypeDef HAL_GFXMMU_ConfigLutLine(GFXMMU_HandleTypeDef *hgfxmmu, GFXMMU_LutLineTypeDef *lutLine);
372HAL_StatusTypeDef HAL_GFXMMU_ConfigForceCache(GFXMMU_HandleTypeDef *hgfxmmu, uint32_t ForceParam);
374HAL_StatusTypeDef HAL_GFXMMU_ModifyBuffers(GFXMMU_HandleTypeDef *hgfxmmu, GFXMMU_BuffersTypeDef *Buffers);
377 GFXMMU_CachePrefetchTypeDef *CachePrefetch);
379void HAL_GFXMMU_IRQHandler(GFXMMU_HandleTypeDef *hgfxmmu);
381void HAL_GFXMMU_ErrorCallback(GFXMMU_HandleTypeDef *hgfxmmu);
391HAL_GFXMMU_StateTypeDef HAL_GFXMMU_GetState(GFXMMU_HandleTypeDef *hgfxmmu);
393uint32_t HAL_GFXMMU_GetError(GFXMMU_HandleTypeDef *hgfxmmu);
408#define IS_GFXMMU_BLOCKS_PER_LINE(VALUE) (((VALUE) == GFXMMU_256BLOCKS) || \
409 ((VALUE) == GFXMMU_192BLOCKS))
411#define IS_GFXMMU_BUFFER_ADDRESS(VALUE) (((VALUE) & 0xFU) == 0U)
413#define IS_GFXMMU_CACHE_LOCK(VALUE) (((VALUE) == GFXMMU_CACHE_LOCK_DISABLE) || \
414 ((VALUE) == GFXMMU_CACHE_LOCK_ENABLE))
416#define IS_GFXMMU_CACHE_LOCK_BUFFER(VALUE) (((VALUE) == GFXMMU_CACHE_LOCK_BUFFER0) || \
417 ((VALUE) == GFXMMU_CACHE_LOCK_BUFFER1) || \
418 ((VALUE) == GFXMMU_CACHE_LOCK_BUFFER2) || \
419 ((VALUE) == GFXMMU_CACHE_LOCK_BUFFER3))
421#define IS_GFXMMU_CACHE_FORCE(VALUE) (((VALUE) == GFXMMU_CACHE_FORCE_DISABLE) || \
422 ((VALUE) == GFXMMU_CACHE_FORCE_ENABLE))
424#define IS_GFXMMU_OUTTER_BUFFERABILITY(VALUE) (((VALUE) == GFXMMU_OUTTER_BUFFERABILITY_DISABLE) || \
425 ((VALUE) == GFXMMU_OUTTER_BUFFERABILITY_ENABLE))
427#define IS_GFXMMU_OUTTER_CACHABILITY(VALUE) (((VALUE) == GFXMMU_OUTTER_CACHABILITY_DISABLE) || \
428 ((VALUE) == GFXMMU_OUTTER_CACHABILITY_ENABLE))
430#define IS_GFXMMU_PREFETCH(VALUE) (((VALUE) == GFXMMU_PREFETCH_DISABLE) || \
431 ((VALUE) == GFXMMU_PREFETCH_ENABLE))
433#define IS_GFXMMU_INTERRUPTS(VALUE) (((VALUE) & 0x1FU) != 0U)
435#define IS_GFXMMU_LUT_LINE(VALUE) ((VALUE) < 1024U)
437#define IS_GFXMMU_LUT_LINES_NUMBER(VALUE) (((VALUE) > 0U) && ((VALUE) <= 1024U))
439#define IS_GFXMMU_LUT_LINE_STATUS(VALUE) (((VALUE) == GFXMMU_LUT_LINE_DISABLE) || \
440 ((VALUE) == GFXMMU_LUT_LINE_ENABLE))
442#define IS_GFXMMU_LUT_BLOCK(VALUE) ((VALUE) < 256U)
444#define IS_GFXMMU_LUT_LINE_OFFSET(VALUE) (((VALUE) >= -4080) && ((VALUE) <= 4190208))
446#define IS_GFXMMU_CACHE_FORCE_ACTION(VALUE) (((VALUE) == GFXMMU_CACHE_FORCE_FLUSH) || \
447 ((VALUE) == GFXMMU_CACHE_FORCE_INVALIDATE) || \
448 ((VALUE) == (GFXMMU_CACHE_FORCE_FLUSH | GFXMMU_CACHE_FORCE_INVALIDATE)))
#define __IO
Definition: core_cm4.h:239
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
GFXMMU registers.
Definition: stm32h7a3xx.h:874