hal_gfx_error.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file hal_gfx_error.h
5  * @author BLE Driver Team
6  * @brief Header file containing functions prototypes of Graphics library.
7  *
8  ****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  ****************************************************************************************
36  */
37 
38 /** @addtogroup GRAPHICS_SDK Graphics
39  * @{
40  */
41 
42 /** @addtogroup HAL_GFX HAL GFX
43  * @{
44  */
45 
46 /** @defgroup HAL_GFX_ERROR GFX ERROR
47  * @brief GPU error code define.
48  * @{
49  */
50 #ifndef HAL_GFX_ERROR_H__
51 #define HAL_GFX_ERROR_H__
52 
53 #include "hal_gfx_sys_defs.h"
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /**
60  * @defgroup HAL_GFX_ERROR_MACRO Defines
61  * @{
62  */
63 #define HAL_GFX_ERR_NO_ERROR (0x00000000U) /**< No error has occured */
64 #define HAL_GFX_ERR_SYS_INIT_FAILURE (0x00000001U) /**< System initialization failure */
65 #define HAL_GFX_ERR_GPU_ABSENT (0x00000002U) /**< Nema GPU is absent */
66 #define HAL_GFX_ERR_RB_INIT_FAILURE (0x00000004U) /**< Ring buffer initialization failure */
67 #define HAL_GFX_ERR_NON_EXPANDABLE_CL_FULL (0x00000008U) /**< Non expandable command list is full*/
68 #define HAL_GFX_ERR_CL_EXPANSION (0x00000010U) /**< Command list expansion error */
69 #define HAL_GFX_ERR_OUT_OF_GFX_MEMORY (0x00000020U) /**< Graphics memory is full */
70 #define HAL_GFX_ERR_OUT_OF_HOST_MEMORY (0x00000040U) /**< Host memory is full */
71 #define HAL_GFX_ERR_NO_BOUND_CL (0x00000080U) /**< There is no bound command list */
72 #define HAL_GFX_ERR_NO_BOUND_FONT (0x00000100U) /**< There is no bound font */
73 #define HAL_GFX_ERR_GFX_MEMORY_INIT (0x00000200U) /**< Graphics memory initialization failure */
74 #define HAL_GFX_ERR_DRIVER_FAILURE (0x00000400U) /**< Nema GPU Kernel Driver failure*/
75 #define HAL_GFX_ERR_MUTEX_INIT (0x00000800U) /**< Mutex initialization failure*/
76 #define HAL_GFX_ERR_INVALID_BO (0x00001000U) /**< Invalid buffer provided*/
77 #define HAL_GFX_ERR_INVALID_CL (0x00002000U) /**< Invalid CL provided*/
78 
79 /** @} */
80 
81 /**
82  * @defgroup HAL_GFX_ERROR_FUNCTION Functions
83  * @{
84  */
85 /**
86  *****************************************************************************************
87  * @brief Return Error Id
88  *
89  * @return 0 if no error exists
90  *****************************************************************************************
91  */
92 uint32_t hal_gfx_get_error(void);
93 /** @} */
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif
100 /** @} */
101 /** @} */
102 /** @} */
103 
hal_gfx_get_error
uint32_t hal_gfx_get_error(void)
Return Error Id.
hal_gfx_sys_defs.h