1 Star 0 Fork 6

xulinlin/startup_hals_syspara_lite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
hal_token.h 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
/*
* Copyright (c) 2020 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HAL_TOKEN_H
#define HAL_TOKEN_H
#include <stdio.h>
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
/**
* @brief Read token value from device.
*
* @param token the result token value, if read sucessfully.
* @param len length of the token.
* @returns 0 if success and get the update area token,
* 1 if success and get the pre-made token,
* -1 if failed,
* -2 if no pre-made token.
*/
int HalReadToken(char *token, unsigned int len);
/**
* @brief Write token value to device.
*
* @param token the token to write.
* @param len length of the token.
* @returns 0 if success, otherwise -1.
*/
int HalWriteToken(const char *token, unsigned int len);
/**
* @brief Get AcKey value from device.
*
* @param acKey the result acKey, if get successfully.
* @param len length of the acKey.
* @returns 0 if success, otherwise -1.
*/
int HalGetAcKey(char *acKey, unsigned int len);
/**
* @brief Get ProdId value from device.
*
* @param productId[] array of product IDs to be populated with.
* @param len length of the productId.
* @returns 0 if success, otherwise -1.
*/
int HalGetProdId(char productId[], size_t len);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xulinl/startup_hals_syspara_lite.git
git@gitee.com:xulinl/startup_hals_syspara_lite.git
xulinl
startup_hals_syspara_lite
startup_hals_syspara_lite
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385