WS63 SDK 文档
7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
std_def.h
浏览该文件的文档.
1
/*
2
* Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2018-2020. All rights reserved.
3
* Description: his should be #included by every C source file
4
*/
5
6
#ifndef STD_DEF_H
7
#define STD_DEF_H
8
14
#include <stddef.h>
15
#include <stdbool.h>
16
#include "stdint.h"
17
#ifdef __LITEOS__
18
#include "
los_typedef.h
"
19
#endif
20
#include "
product.h
"
21
22
#ifndef var_segment
23
#if (defined __GNUC__) || (defined __ICCARM__)
24
#define var_segment(seg) __attribute__((section(seg)))
25
#else
26
#if (defined PC_ST)
27
#define var_segment(seg)
28
#else
29
#error "You need to define var_segment for your compiler."
30
#endif
// (defined PC_ST)
31
#endif
// (defined __GNUC__ )
32
#endif
// var_segment
33
34
#ifndef UNUSED
35
#define UNUSED(var) do { (void)(var); } while (0)
36
#endif
37
38
#ifndef MAX
39
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
40
#endif
41
42
#ifndef MIN
43
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
44
#endif
45
69
#define cassert(predicate, file) impl_cassert_line(predicate, __LINE__, file)
70
71
#define impl_paste(a, b) a##b
72
#define impl_cassert_line(predicate, line, file) \
73
typedef char impl_paste(assertion_failed_##file##_, line)[2 * !!(predicate) - 1]
74
75
#ifndef BIT
76
#define BIT(x) (1UL << (uint32_t)(x))
77
#endif
78
79
// Macro to check at compile time certain expressions not supported by the preprocessor
80
#define ct_assert(e) enum LENGTH_CHECK { ct_assert_value = 1 / ((!(!(e)))) }
81
82
#define __IRQ
83
#define __ISR __IRQ
84
85
enum
ERROR_CODE_ENUM
{
86
ERR
= -1,
87
SUCC
= 0
88
};
89
93
#endif
ERROR_CODE_ENUM
ERROR_CODE_ENUM
Definition
std_def.h:85
ERR
@ ERR
Definition
std_def.h:86
SUCC
@ SUCC
Definition
std_def.h:87
los_typedef.h
product.h
src
middleware
utils
common_headers
std_def.h
由
William Goodspeed
维护 | E-mail: gongzl@stu.hebust.edu.cn | Wechat: a23333344 | ALSO CHECKOUT
WS63FLASH
!
生成于 2025年 一月 4日 星期六 17:47:12 , 为 WS63 SDK 文档使用
1.9.8