1 /* 2 * Copyright 2020 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: shika.zhou@rock-chips.com 17 * date: 2020/07/27 18 */ 19 20 #ifndef INCLUDE_RT_BASE_RT_ENV_H_ 21 #define INCLUDE_RT_BASE_RT_ENV_H_ 22 23 #include "rt_header.h" // NOLINT 24 #include <string.h> // NOLINT 25 26 #define RT_ENV_GET_U32(name, value, default_value) \ 27 rt_env_get_u32(name, value, default_value) 28 29 #define RT_ENV_GET_STR(name, value, default_value) \ 30 rt_env_get_str(name, value, default_value) 31 32 #define RT_ENV_SET_U32(name, value) \ 33 rt_env_set_u32(name, value) 34 35 #define RT_ENV_SET_STR(name, value) \ 36 rt_env_set_str(name, value) 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 INT32 rt_env_get_u32(const char *name, UINT32 *value, UINT32 default_value); 43 INT32 rt_env_get_str(const char *name, const char **value, const char *default_value); 44 INT32 rt_env_set_u32(const char *name, UINT32 value); 45 INT32 rt_env_set_str(const char *name, char *value); 46 47 #ifdef __cplusplus 48 } 49 #endif 50 51 #endif // INCLUDE_RT_BASE_RT_ENV_H_ 52 53