API参考
载入中...
搜索中...
未找到
bsl_print.h
1/*
2 * This file is part of the openHiTLS project.
3 *
4 * openHiTLS is licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *
8 * http://license.coscl.org.cn/MulanPSL2
9 *
10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13 * See the Mulan PSL v2 for more details.
14 */
15
16#ifndef BSL_PRINT_H
17#define BSL_PRINT_H
18
19#include "hitls_build.h"
20#ifdef HITLS_BSL_PRINT
21#include <stdint.h>
22#include <stdlib.h>
23#include <stdbool.h>
24#include "bsl_types.h"
25#include "bsl_sal.h"
26#include "bsl_uio.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32extern const char BSL_PRINT_MONTH_STR[12][4];
33
34#define BSL_PRINT_TIME_FMT "%s %u %02u:%02u:%02u %u GMT"
35
47int32_t BSL_PRINT_Buff(uint32_t layer, BSL_UIO *uio, const void *buff, uint32_t buffLen);
48
60int32_t BSL_PRINT_Fmt(uint32_t layer, BSL_UIO *uio, const char *fmt, ...);
61
74int32_t BSL_PRINT_Hex(uint32_t layer, bool oneLine, const uint8_t *data, uint32_t dataLen, BSL_UIO *uio);
75
86int32_t BSL_PRINT_Time(uint32_t layer, const BSL_TIME *time, BSL_UIO *uio);
87
100int32_t BSL_PRINT_Number(uint32_t layer, const char *title, const uint8_t *data, uint32_t dataLen, BSL_UIO *uio);
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif
107
108#endif // BSL_PRINT_H
struct UIO_ControlBlock BSL_UIO
UIO module control structure
定义 bsl_uio.h:37
Basic time data structure definition.
定义 bsl_sal.h:583