1/*
2 * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef __TDE_ERRCODE_H__
16#define __TDE_ERRCODE_H__
17
18#include "hi_type.h"
19
20#ifdef __cplusplus
21#if __cplusplus
22extern "C" {
23#endif
24#endif /* __cplusplus */
25
26#define HI_ERR_TDE_BASE ((HI_S32)(((0x80UL + 0x20UL) << 24) | (100 << 16) | (4 << 13) | 1))
27
28enum {
29    HI_ERR_TDE_DEV_NOT_OPEN = HI_ERR_TDE_BASE, /* <  tde device not open yet */
30    HI_ERR_TDE_DEV_OPEN_FAILED,                /* <  open tde device failed */
31    HI_ERR_TDE_NULL_PTR,                       /* <  input parameters contain null ptr */
32    HI_ERR_TDE_NO_MEM,                         /* <  malloc failed  */
33    HI_ERR_TDE_INVALID_HANDLE,                 /* <  invalid job handle */
34    HI_ERR_TDE_INVALID_PARA,                   /* <  invalid parameter */
35    HI_ERR_TDE_NOT_ALIGNED,                    /* <  aligned error for position, stride, width */
36    HI_ERR_TDE_MINIFICATION,                   /* <  invalid minification */
37    HI_ERR_TDE_CLIP_AREA,                      /* <  clip area and operation area have no intersection */
38    HI_ERR_TDE_JOB_TIMEOUT,                    /* <  blocked job wait timeout */
39    HI_ERR_TDE_UNSUPPORTED_OPERATION,          /* <  unsupported operation */
40    HI_ERR_TDE_QUERY_TIMEOUT,                  /* <  query time out */
41    HI_ERR_TDE_INTERRUPT                       /* blocked job was interrupted */
42};
43
44#ifdef __cplusplus
45#if __cplusplus
46}
47#endif
48#endif /* __cplusplus */
49
50#endif /* __TDE_ERRCODE_H__ */
51