1 Star 0 Fork 6

HustMrPan/startup_hals_syspara_lite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
hal_token.h 1.74 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 token value, len The token len.
* @returns 0 if it succeeds and get the update area token,
* 1 if it succeeds and get the pre-made token,
* -1 if it fails, -2 if it no pre-made token.
*/
int HalReadToken(char *token, unsigned int len);
/**
* @brief Write token value to device.
*
* @param token The token value, len The token len.
* @returns 0 if it succeeds, -1 if it fails.
*/
int HalWriteToken(const char *token, unsigned int len);
/**
* @brief Get AcKey value from device.
*
* @param acKey The acKey value, len The acKey len.
* @returns 0 if it succeeds, -1 if it fails.
*/
int HalGetAcKey(char *acKey, unsigned int len);
/**
* @brief Get ProdId value from device.
*
* @param productId[] The productId value, len The productId len.
* @returns 0 if it succeeds, -1 if it fails.
*/
int HalGetProdId(char productId[], size_t len);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hustmrpan/startup_hals_syspara_lite.git
git@gitee.com:hustmrpan/startup_hals_syspara_lite.git
hustmrpan
startup_hals_syspara_lite
startup_hals_syspara_lite
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385