1 /* 2 * @file hi_ver.h 3 * 4 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /** @defgroup iot_ver Soft ver 19 * @ingroup system 20 */ 21 22 #ifndef __HI_VER_H__ 23 #define __HI_VER_H__ 24 #include <hi_types.h> 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 /** 30 * @ingroup iot_ver 31 * @brief Obtains SDK version information. CNcomment:获取SDK版本信息CNend 32 * 33 * @par 描述: 34 * Obtains SDK version information. CNcomment:获取SDK版本信息CNend 35 * @attention None 36 * @retval #hi_char* SDK version information string. CNcomment:SDK版本信息字符串CNend 37 * 38 * @par Dependency: 39 * @li hi_ver.h: This file describes version information APIs.CNcomment:文件用于描述系统相关接口.CNend 40 * @see None 41 */ 42 const hi_char *hi_get_sdk_version(hi_void); 43 44 /** 45 * @ingroup iot_ver 46 * @brief Obtains boot version in secure boot mode. CNcomment:安全启动模式下,获取BOOT版本号CNend 47 * 48 * @par 描述: 49 * Obtains boot version in secure boot mode. CNcomment:安全启动模式下,获取BOOT版本号CNend 50 * @attention Ver always be 0 in non-secure boot mode. CNcomment: 非安全启动模式下,该版本号始终为0。CNend 51 * @retval #hi_u8 boot ver num, value from 0-16, Return 0xFF means get boot ver fail. 52 CNcomment:boot版本号,有效值为0-16,返回0xFF表示获取BOOT版本号失败CNend 53 * @par Dependency: 54 * @li hi_ver.h: This file describes version information APIs.CNcomment:文件用于描述系统相关接口.CNend 55 * @see None 56 */ 57 hi_u8 hi_get_boot_ver(hi_void); 58 59 /** 60 * @ingroup iot_ver 61 * @brief Obtains kernel version in secure boot mode. CNcomment:安全启动模式下,获取kernel版本号CNend 62 * 63 * @par 描述: 64 * Obtains kernel version in secure boot mode. CNcomment:安全启动模式下,获取kernel版本号CNend 65 * @attention Ver always be 0 in non-secure boot mode. CNcomment:非安全启动模式下,该版本号始终为0。CNend 66 * @retval #hi_u8 kernel ver num, value from 0-48, Return 0xFF means get kernel ver fail. 67 CNcomment:kernel版本号,有效值为0-48,返回0xFF表示获取kernel版本号失败CNend 68 * 69 * @par Dependency: 70 * @li hi_ver.h: This file describes version information APIs.CNcomment:文件用于描述系统相关接口.CNend 71 * @see None 72 */ 73 hi_u8 hi_get_kernel_ver(hi_void); 74 75 #ifdef __cplusplus 76 } 77 #endif 78 #endif 79