app_drv_error.h
Go to the documentation of this file.
1
52 #ifndef _APP_DRV_ERROR_H_
53 #define _APP_DRV_ERROR_H_
54
55 #include "gr55xx_hal.h"
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
67 #define APP_DRV_SUCCESS 0x0000
68 #define APP_DRV_ERR_HAL 0x0001
69 #define APP_DRV_ERR_BUSY 0x0002
70 #define APP_DRV_ERR_TIMEOUT 0x0003
71 #define APP_DRV_ERR_INVALID_PARAM 0x0004
72 #define APP_DRV_ERR_POINTER_NULL 0x0005
73 #define APP_DRV_ERR_INVALID_TYPE 0x0006
74 #define APP_DRV_ERR_INVALID_MODE 0x0007
75 #define APP_DRV_ERR_INVALID_ID 0x0008
82 #define APP_DRV_ERR_CODE_CHECK(err_code) \
83 do \
84 { \
85 if (APP_DRV_SUCCESS != err_code) \
86 { \
87 return err_code; \
88 } \
89 } while(0)
90
96 #define HAL_ERR_CODE_CHECK(err_code) \
97 do \
98 { \
99 if (HAL_OK != err_code) \
100 { \
101 return (uint16_t)err_code; \
102 } \
103 } while(0)
104
112 typedef uint16_t app_drv_err_t;
115 #ifdef __cplusplus
116 }
117 #endif
118
119 #endif
120
app_drv_err_t
uint16_t app_drv_err_t
APP driver error type.
Definition: app_drv_error.h:112
gr55xx_hal.h
This file contains all the functions prototypes for the HAL module driver.