1 /* 2 * Copyright 2018 Rockchip Electronics Co. LTD 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 * author: martin.cheng@rock-chips.com 17 * date: 20180704 18 */ 19 20 #ifndef INCLUDE_RT_BASE_RT_ERROR_H_ 21 #define INCLUDE_RT_BASE_RT_ERROR_H_ 22 23 typedef enum _RT_RET { 24 RT_OK = 0, 25 26 RT_ERR_BAD = -1, 27 RT_ERR_UNKNOWN = -2, 28 RT_ERR_NULL_PTR = -3, 29 RT_ERR_MALLOC = -4, 30 RT_ERR_OPEN_FILE = -5, 31 RT_ERR_VALUE = -6, 32 RT_ERR_READ_BIT = -7, 33 RT_ERR_TIMEOUT = -8, 34 RT_ERR_UNIMPLIMENTED = -9, 35 RT_ERR_UNSUPPORT = -10, 36 RT_ERR_SUSPEND = -11, 37 RT_ERR_NO_BUFFER = -12, 38 RT_ERR_HW_UNSUPPORT = -13, 39 RT_ERR_RETRY = -14, 40 41 RT_ERR_BASE = -64, 42 43 /* The error in stream processing */ 44 RT_ERR_INIT = RT_ERR_BASE - 1, 45 RT_ERR_FATAL_THREAD = RT_ERR_BASE - 2, 46 RT_ERR_NOMEM = RT_ERR_BASE - 3, 47 RT_ERR_OUTOF_RANGE = RT_ERR_BASE - 4, 48 RT_ERR_END_OF_STREAM = RT_ERR_BASE - 5, 49 50 /* The error in list */ 51 RT_ERR_LIST_BASE = -128, 52 RT_ERR_LIST_EMPTY = RT_ERR_LIST_BASE - 1, 53 RT_ERR_LIST_FULL = RT_ERR_LIST_BASE - 2, 54 RT_ERR_LIST_OUTOF_RANGE = RT_ERR_LIST_BASE - 3, 55 } RT_RET; 56 57 #endif // INCLUDE_RT_BASE_RT_ERROR_H_ 58