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
16#ifndef _HI_COMM_IVE_H_
17#define _HI_COMM_IVE_H_
18
19#include "hi_type.h"
20#include "hi_errno.h"
21
22#ifdef __cplusplus
23#if __cplusplus
24extern "C" {
25#endif
26#endif
27
28/*
29 * The fixed-point data type, will be used to
30 * represent float data in hardware calculations.
31 */
32/* --u8bit---------------------------------------- */
33typedef unsigned char HI_U0Q8;
34typedef unsigned char HI_U1Q7;
35typedef unsigned char HI_U5Q3;
36typedef unsigned char HI_U3Q5;
37
38/* --u16bit--------------------------------------- */
39typedef unsigned short HI_U0Q16;
40typedef unsigned short HI_U4Q12;
41typedef unsigned short HI_U6Q10;
42typedef unsigned short HI_U8Q8;
43typedef unsigned short HI_U9Q7;
44typedef unsigned short HI_U12Q4;
45typedef unsigned short HI_U14Q2;
46typedef unsigned short HI_U5Q11;
47typedef unsigned short HI_U1Q15;
48typedef unsigned short HI_U2Q14;
49typedef HI_U6Q10 HI_UFP16;
50/* --s16bit--------------------------------------- */
51typedef short HI_S9Q7;
52typedef short HI_S14Q2;
53typedef short HI_S1Q15;
54
55/* --u32bit--------------------------------------- */
56typedef unsigned int HI_U22Q10;
57typedef unsigned int HI_U25Q7;
58typedef unsigned int HI_U21Q11;
59typedef unsigned int HI_U14Q18;
60typedef unsigned int HI_U8Q24;
61typedef unsigned int HI_U4Q28;
62
63/* --s32bit--------------------------------------- */
64typedef int HI_S25Q7;
65typedef int HI_S16Q16;
66typedef int HI_S14Q18;
67typedef int HI_S20Q12;
68
69typedef int HI_S24Q8;
70
71/*
72 * The fixed-point data type combine with flag_bits.
73 */
74/* 8bits unsigned integer,4bits decimal fraction,4bits flag_bits */
75typedef unsigned short HI_U8Q4F4;
76
77/*
78 * The fixed-point data type, will be used to
79 * represent float data in hardware calculations. linux code style.
80 */
81/* --u8bit---------------------------------------- */
82typedef HI_U0Q8 hi_u0q8;
83typedef HI_U1Q7 hi_u1q7;
84typedef HI_U5Q3 hi_u5q3;
85typedef HI_U3Q5 hi_u3q5;
86
87/* --u16bit--------------------------------------- */
88typedef HI_U0Q16 hi_u0q16;
89typedef HI_U4Q12 hi_u4q12;
90typedef HI_U6Q10 hi_u6q10;
91typedef HI_U8Q8  hi_u8q8;
92typedef HI_U9Q7  hi_u9q7;
93typedef HI_U12Q4 hi_u12q4;
94typedef HI_U14Q2 hi_u14q2;
95typedef HI_U5Q11 hi_u5q11;
96typedef HI_U1Q15 hi_u1q15;
97typedef HI_U2Q14 hi_u2q14;
98typedef HI_UFP16 hi_ufp16;
99/* 8bits unsigned integer,4bits decimal fraction,4bits flag_bits */
100typedef HI_U8Q4F4 hi_u8q4f4;
101
102/* --s16bit--------------------------------------- */
103typedef HI_S9Q7  hi_s9q7;
104typedef HI_S14Q2 hi_s14q2;
105typedef HI_S1Q15 hi_s1q15;
106
107/* --u32bit--------------------------------------- */
108typedef HI_U22Q10 hi_u22q10;
109typedef HI_U25Q7  hi_u25q7;
110typedef HI_U21Q11 hi_u21q11;
111typedef HI_U14Q18 hi_u14q18;
112typedef HI_U8Q24  hi_u8q24;
113typedef HI_U4Q28  hi_u4q28;
114
115/* --s32bit--------------------------------------- */
116typedef HI_S25Q7  hi_s25q7;
117typedef HI_S16Q16 hi_s16q16;
118typedef HI_S14Q18 hi_s14q18;
119typedef HI_S20Q12 hi_s20q12;
120typedef HI_S24Q8  hi_s24q8;
121
122
123/* Type of the IVE_IMAGE_S data */
124typedef enum hiIVE_IMAGE_TYPE_E {
125    IVE_IMAGE_TYPE_U8C1 = 0x0,
126    IVE_IMAGE_TYPE_S8C1 = 0x1,
127
128    IVE_IMAGE_TYPE_YUV420SP = 0x2, /* YUV420 SemiPlanar */
129    IVE_IMAGE_TYPE_YUV422SP = 0x3, /* YUV422 SemiPlanar */
130    IVE_IMAGE_TYPE_YUV420P = 0x4,  /* YUV420 Planar */
131    IVE_IMAGE_TYPE_YUV422P = 0x5,  /* YUV422 planar */
132
133    IVE_IMAGE_TYPE_S8C2_PACKAGE = 0x6,
134    IVE_IMAGE_TYPE_S8C2_PLANAR = 0x7,
135
136    IVE_IMAGE_TYPE_S16C1 = 0x8,
137    IVE_IMAGE_TYPE_U16C1 = 0x9,
138
139    IVE_IMAGE_TYPE_U8C3_PACKAGE = 0xa,
140    IVE_IMAGE_TYPE_U8C3_PLANAR = 0xb,
141
142    IVE_IMAGE_TYPE_S32C1 = 0xc,
143    IVE_IMAGE_TYPE_U32C1 = 0xd,
144
145    IVE_IMAGE_TYPE_S64C1 = 0xe,
146    IVE_IMAGE_TYPE_U64C1 = 0xf,
147
148    IVE_IMAGE_TYPE_BUTT
149} IVE_IMAGE_TYPE_E;
150
151/* Definition of the IVE_IMAGE_S. */
152typedef struct hiIVE_IMAGE_S {
153    HI_U64 au64PhyAddr[3];   /* RW;The physical address of the image */
154    HI_U64 au64VirAddr[3];   /* RW;The virtual address of the image */
155    HI_U32 au32Stride[3];    /* RW;The stride of the image */
156    HI_U32 u32Width;         /* RW;The width of the image */
157    HI_U32 u32Height;        /* RW;The height of the image */
158    IVE_IMAGE_TYPE_E enType; /* RW;The type of the image */
159} IVE_IMAGE_S;
160
161typedef IVE_IMAGE_S IVE_SRC_IMAGE_S;
162typedef IVE_IMAGE_S IVE_DST_IMAGE_S;
163
164/*
165* Definition of the IVE_MEM_INFO_S.This struct special purpose for input or ouput,
166* such as Hist, CCL, ShiTomasi.
167*/
168typedef struct hiIVE_MEM_INFO_S {
169    HI_U64 u64PhyAddr; /* RW;The physical address of the memory */
170    HI_U64 u64VirAddr; /* RW;The virtual address of the memory */
171    HI_U32 u32Size;    /* RW;The size of memory */
172} IVE_MEM_INFO_S;
173typedef IVE_MEM_INFO_S IVE_SRC_MEM_INFO_S;
174typedef IVE_MEM_INFO_S IVE_DST_MEM_INFO_S;
175
176/* Data struct */
177typedef struct hiIVE_DATA_S {
178    HI_U64 u64PhyAddr; /* RW;The physical address of the data */
179    HI_U64 u64VirAddr; /* RW;The virtaul address of the data */
180
181    HI_U32 u32Stride; /* RW;The stride of 2D data by byte */
182    HI_U32 u32Width;  /* RW;The width of 2D data by byte */
183    HI_U32 u32Height; /* RW;The height of 2D data by byte */
184
185    HI_U32 u32Reserved;
186} IVE_DATA_S;
187typedef IVE_DATA_S IVE_SRC_DATA_S;
188typedef IVE_DATA_S IVE_DST_DATA_S;
189
190/* Definition of the union of IVE_8BIT_U. */
191typedef union hiIVE_8BIT_U {
192    HI_S8 s8Val;
193    HI_U8 u8Val;
194} IVE_8BIT_U;
195
196/* Definition of u16 point */
197typedef struct hiIVE_POINT_U16_S {
198    HI_U16 u16X; /* RW;The X coordinate of the point */
199    HI_U16 u16Y; /* RW;The Y coordinate of the point */
200} IVE_POINT_U16_S;
201
202/*
203* Definition of s16 point
204*/
205typedef struct hiIVE_POINT_S16_S {
206    HI_U16 s16X; /* RW;The X coordinate of the point */
207    HI_U16 s16Y; /* RW;The Y coordinate of the point */
208} IVE_POINT_S16_S;
209
210/*
211* Float point represented by Fixed-point SQ25.7
212*/
213typedef struct hiIVE_POINT_S25Q7_S {
214    HI_S25Q7 s25q7X; /* RW;The X coordinate of the point */
215    HI_S25Q7 s25q7Y; /* RW;The Y coordinate of the point */
216} IVE_POINT_S25Q7_S;
217
218/*
219* Point u14q2
220*/
221typedef struct hiIVE_POINT_U14Q2_S {
222    HI_U14Q2 u14q2X;
223    HI_U14Q2 u14q2Y;
224} IVE_POINT_U14Q2_S;
225
226/* Definition of rectangle */
227typedef struct hiIVE_RECT_U16_S {
228    HI_U16 u16X;      /* RW;The location of X axis of the rectangle */
229    HI_U16 u16Y;      /* RW;The location of Y axis of the rectangle */
230    HI_U16 u16Width;  /* RW;The width of the rectangle */
231    HI_U16 u16Height; /* RW;The height of the rectangle */
232} IVE_RECT_U16_S;
233
234typedef struct hiIVE_RECT_U32_S {
235    HI_U32 u32X;      /* RW;The location of X axis of the rectangle */
236    HI_U32 u32Y;      /* RW;The location of Y axis of the rectangle */
237    HI_U32 u32Width;  /* RW;The width of the rectangle */
238    HI_U32 u32Height; /* RW;The height of the rectangle */
239} IVE_RECT_U32_S;
240
241typedef struct hiIVE_RECT_S24Q8_S {
242    HI_S24Q8 s24q8X;
243    HI_S24Q8 s24q8Y;
244    HI_U32 u32Width;
245    HI_U32 u32Height;
246} IVE_RECT_S24Q8_S;
247
248typedef struct hiIVE_LOOK_UP_TABLE_S {
249    IVE_MEM_INFO_S stTable;
250    HI_U16 u16ElemNum; /* RW;LUT's elements number */
251
252    HI_U8 u8TabInPreci;
253    HI_U8 u8TabOutNorm;
254
255    HI_S32 s32TabInLower; /* RW;LUT's original input lower limit */
256    HI_S32 s32TabInUpper; /* RW;LUT's original input upper limit */
257} IVE_LOOK_UP_TABLE_S;
258
259/* Blob type */
260typedef enum hiIVE_BLOB_TYPE_E {
261    IVE_BLOB_TYPE_S32 = 0x0,
262
263    IVE_BLOB_TYPE_U8 = 0x1,
264
265    /* When blob type is YVU420SP, channel = 3 */
266    IVE_BLOB_TYPE_YVU420SP = 0x2,
267    /* When blob type is YVU422SP, channel = 3 */
268    IVE_BLOB_TYPE_YVU422SP = 0x3,
269
270    IVE_BLOB_TYPE_VEC_S32 = 0x4,
271
272    IVE_BLOB_TYPE_SEQ_S32 = 0x5,
273
274    IVE_BLOB_TYPE_U16 = 0x6,
275
276    IVE_BLOB_TYPE_S8 = 0x7,
277
278    IVE_BLOB_TYPE_F32 = 0x8,
279
280    IVE_BLOB_TYPE_BUTT
281} IVE_BLOB_TYPE_E;
282
283/*
284* Blob struct
285* In Caffe, the blob contain shape info as the following order:
286* Image\FeatureMap:               N       C       H       W
287* FC(normal vector):              N       C
288* RNN\LSTM(Recurrent) vector:     T       N       D
289*
290* The relationship of the following blob struct with Caffe blob is as follows:
291* Image\FeatureMap:               Num    Chn    Height   With
292* FC(VEC_S32):                    Num    Width
293* RNN\LSTM(SEQ_S32) vector:       Step   Num     Dim
294* The stride, which measuring unit is byte, is always algined by the width or
295* dim direction.
296*/
297typedef struct hiIVE_BLOB_S {
298    IVE_BLOB_TYPE_E enType; /* Blob type */
299    HI_U32 u32Stride;       /* Stride, a line bytes num */
300
301    HI_U64 u64VirAddr; /* virtual addr */
302    HI_U64 u64PhyAddr; /* physical addr */
303
304    HI_U32 u32Num;  /* N: frame num or sequence num, correspond to caffe blob's n */
305    union {
306        struct {
307            HI_U32 u32Width;   /* W: frame width, correspond to caffe blob's w */
308            HI_U32 u32Height;  /* H: frame height, correspond to caffe blob's h */
309            HI_U32 u32Chn;     /* C: frame channel, correspond to caffe blob's c */
310        } stWhc;
311        struct {
312            HI_U32 u32Dim;          /* D: vecotr dimension */
313            HI_U64 u64VirAddrStep;  /* T: virtual adress of   time steps array in each sequence */
314        } stSeq;
315    } unShape;
316} IVE_BLOB_S;
317
318typedef IVE_BLOB_S IVE_SRC_BLOB_S;
319typedef IVE_BLOB_S IVE_DST_BLOB_S;
320
321typedef enum hiEN_IVE_ERR_CODE_E {
322    ERR_IVE_SYS_TIMEOUT = 0x40,   /* IVE process timeout */
323    ERR_IVE_QUERY_TIMEOUT = 0x41, /* IVE query timeout */
324    ERR_IVE_OPEN_FILE = 0x42,     /* IVE open file error */
325    ERR_IVE_READ_FILE = 0x43,     /* IVE read file error */
326    ERR_IVE_WRITE_FILE = 0x44,    /* IVE write file error */
327    ERR_IVE_BUS_ERR = 0x45,
328
329    ERR_IVE_BUTT
330} EN_IVE_ERR_CODE_E;
331
332typedef enum hiEN_FD_ERR_CODE_E {
333    ERR_FD_SYS_TIMEOUT = 0x40,   /* FD process timeout */
334    ERR_FD_CFG = 0x41,           /* FD configuration error */
335    ERR_FD_FACE_NUM_OVER = 0x42, /* FD candidate face number over */
336    ERR_FD_OPEN_FILE = 0x43,     /* FD open file error */
337    ERR_FD_READ_FILE = 0x44,     /* FD read file error */
338    ERR_FD_WRITE_FILE = 0x45,    /* FD write file error */
339
340    ERR_FD_BUTT
341} EN_FD_ERR_CODE_E;
342
343/************************************************IVE error code ***********************************/
344/* Invalid device ID */
345#define HI_ERR_IVE_INVALID_DEVID HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID)
346/* Invalid channel ID */
347#define HI_ERR_IVE_INVALID_CHNID HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
348/* At least one parameter is illegal. For example, an illegal enumeration value exists. */
349#define HI_ERR_IVE_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
350/* The channel exists. */
351#define HI_ERR_IVE_EXIST HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST)
352/* The UN exists. */
353#define HI_ERR_IVE_UNEXIST HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST)
354/* A null point is used. */
355#define HI_ERR_IVE_NULL_PTR HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
356/* Try to enable or initialize the system, device, or channel before configuring attributes. */
357#define HI_ERR_IVE_NOT_CONFIG HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_CONFIG)
358/* The operation is not supported currently. */
359#define HI_ERR_IVE_NOT_SURPPORT HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
360/* The operation, changing static attributes for example, is not permitted. */
361#define HI_ERR_IVE_NOT_PERM HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
362/* A failure caused by the malloc memory occurs. */
363#define HI_ERR_IVE_NOMEM HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
364/* A failure caused by the malloc buffer occurs. */
365#define HI_ERR_IVE_NOBUF HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF)
366/* The buffer is empty. */
367#define HI_ERR_IVE_BUF_EMPTY HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY)
368/* No buffer is provided for storing new data. */
369#define HI_ERR_IVE_BUF_FULL HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL)
370/* The system is not ready because it may be not initialized or loaded.
371 * The error code is returned when a device file fails to be opened. */
372#define HI_ERR_IVE_NOTREADY HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
373/* The source address or target address is incorrect during the operations such as calling
374copy_from_user or copy_to_user. */
375#define HI_ERR_IVE_BADADDR HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_BADADDR)
376/* The resource is busy during the operations such as destroying a VENC channel
377without deregistering it. */
378#define HI_ERR_IVE_BUSY HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
379/* IVE process timeout: 0xA01D8040 */
380#define HI_ERR_IVE_SYS_TIMEOUT HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, ERR_IVE_SYS_TIMEOUT)
381/* IVE query timeout: 0xA01D8041 */
382#define HI_ERR_IVE_QUERY_TIMEOUT HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, ERR_IVE_QUERY_TIMEOUT)
383/* IVE open file error: 0xA01D8042 */
384#define HI_ERR_IVE_OPEN_FILE HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, ERR_IVE_OPEN_FILE)
385/* IVE read file error: 0xA01D8043 */
386#define HI_ERR_IVE_READ_FILE HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, ERR_IVE_READ_FILE)
387/* IVE read file error: 0xA01D8044 */
388#define HI_ERR_IVE_WRITE_FILE HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, ERR_IVE_WRITE_FILE)
389/* IVE Bus error: 0xA01D8045 */
390#define HI_ERR_IVE_BUS_ERR HI_DEF_ERR(HI_ID_IVE, EN_ERR_LEVEL_ERROR, ERR_IVE_BUS_ERR)
391
392/************************************************FD error code ***********************************/
393/* Invalid device ID */
394#define HI_ERR_FD_INVALID_DEVID HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID)
395/* Invalid channel ID */
396#define HI_ERR_FD_INVALID_CHNID HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
397/* At least one parameter is illegal. For example, an illegal enumeration value exists. */
398#define HI_ERR_FD_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
399/* The channel exists. */
400#define HI_ERR_FD_EXIST HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST)
401/* The UN exists. */
402#define HI_ERR_FD_UNEXIST HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST)
403/* A null point is used. */
404#define HI_ERR_FD_NULL_PTR HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
405/* Try to enable or initialize the system, device, or channel before configuring attributes. */
406#define HI_ERR_FD_NOT_CONFIG HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_CONFIG)
407/* The operation is not supported currently. */
408#define HI_ERR_FD_NOT_SURPPORT HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
409/* The operation, changing static attributes for example, is not permitted. */
410#define HI_ERR_FD_NOT_PERM HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
411/* A failure caused by the malloc memory occurs. */
412#define HI_ERR_FD_NOMEM HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
413/* A failure caused by the malloc buffer occurs. */
414#define HI_ERR_FD_NOBUF HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF)
415/* The buffer is empty. */
416#define HI_ERR_FD_BUF_EMPTY HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY)
417/* No buffer is provided for storing new data. */
418#define HI_ERR_FD_BUF_FULL HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL)
419/* The system is not ready because it may be not initialized or loaded.
420 * The error code is returned when a device file fails to be opened. */
421#define HI_ERR_FD_NOTREADY HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
422/* The source address or target address is incorrect during the operations such as calling
423copy_from_user or copy_to_user. */
424#define HI_ERR_FD_BADADDR HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_BADADDR)
425/* The resource is busy during the operations such as destroying a VENC channel
426without deregistering it. */
427#define HI_ERR_FD_BUSY HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
428/* FD process timeout:         0xA02F8040 */
429#define HI_ERR_FD_SYS_TIMEOUT HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, ERR_FD_SYS_TIMEOUT)
430/* FD configuration error:     0xA02F8041 */
431#define HI_ERR_FD_CFG HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, ERR_FD_CFG)
432/* FD candidate face number over: 0xA02F8042 */
433#define HI_ERR_FD_FACE_NUM_OVER HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, ERR_FD_FACE_NUM_OVER)
434/* FD open file error: 0xA02F8043 */
435#define HI_ERR_FD_OPEN_FILE HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, ERR_FD_OPEN_FILE)
436/* FD read file error: 0xA02F8044 */
437#define HI_ERR_FD_READ_FILE HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, ERR_FD_READ_FILE)
438/* FD read file error: 0xA02F8045 */
439#define HI_ERR_FD_WRITE_FILE HI_DEF_ERR(HI_ID_FD, EN_ERR_LEVEL_ERROR, ERR_FD_WRITE_FILE)
440
441/************************************************ODT error code ***********************************/
442/* ODT Invalid channel ID: 0xA0308002 */
443#define HI_ERR_ODT_INVALID_CHNID HI_DEF_ERR(HI_ID_ODT, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
444/* ODT exist: 0xA0308004 */
445#define HI_ERR_ODT_EXIST HI_DEF_ERR(HI_ID_ODT, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST)
446/* ODT unexist: 0xA0308005 */
447#define HI_ERR_ODT_UNEXIST HI_DEF_ERR(HI_ID_ODT, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST)
448/* ODT The operation, changing static attributes for example, is not permitted: 0xA0308009 */
449#define HI_ERR_ODT_NOT_PERM HI_DEF_ERR(HI_ID_ODT, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
450/* ODT the system is not ready because it may be not initialized: 0xA0308010 */
451#define HI_ERR_ODT_NOTREADY HI_DEF_ERR(HI_ID_ODT, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
452/* ODT busy: 0xA0308012 */
453#define HI_ERR_ODT_BUSY HI_DEF_ERR(HI_ID_ODT, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
454#ifdef __cplusplus
455#if __cplusplus
456}
457#endif
458#endif
459#endif /* __HI_COMM_IVE_H__ */
460