WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
io.h
浏览该文件的文档.
1/* ----------------------------------------------------------------------------
2 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
3 * Description: IO Memory HeadFile
4 * Author: Huawei LiteOS Team
5 * Create: 2023-02-06
6 * Redistribution and use in source and binary forms, with or without modification,
7 * are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice, this list of
9 * conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
14 * to endorse or promote products derived from this software without specific prior written
15 * permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * --------------------------------------------------------------------------- */
28
29#ifndef _ARCH_GENERIC_IO_H
30#define _ARCH_GENERIC_IO_H
31
32#include "los_typedef.h"
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
38#ifndef ArchWrite8
39#define ArchWrite8(addr, value) ArchWrite8(addr, value)
41{
42 *(volatile UINT8 *)addr = value;
43}
44#endif
45
46#ifndef ArchWrite16
47#define ArchWrite16(addr, value) ArchWrite16(addr, value)
49{
50 *(volatile UINT16 *)addr = value;
51}
52#endif
53
54#ifndef ArchWrite32
55#define ArchWrite32(addr, value) ArchWrite32(addr, value)
57{
58 *(volatile UINT32 *)addr = value;
59}
60#endif
61
62#ifndef ArchWrite64
63#define ArchWrite64(addr, value) ArchWrite64(addr, value)
65{
66 *(volatile UINT64 *)addr = value;
67}
68#endif
69
70#ifndef ArchRead8
71#define ArchRead8(addr) ArchRead8(addr)
73{
74 return *(volatile UINT8 *)addr;
75}
76#endif
77
78#ifndef ArchRead16
79#define ArchRead16(addr) ArchRead16(addr)
81{
82 return *(volatile UINT16 *)addr;
83}
84#endif
85
86#ifndef ArchRead32
87#define ArchRead32(addr) ArchRead32(addr)
89{
90 return *(volatile UINT32 *)addr;
91}
92#endif
93
94#ifndef ArchRead64
95#define ArchRead64(addr) ArchRead64(addr)
97{
98 return *(volatile UINT64 *)addr;
99}
100#endif
101
102#ifdef __cplusplus
103}
104#endif /* __cplusplus */
105
106#endif /* _ARCH_GENERIC_IO_H */
#define STATIC
Definition common_def.h:57
#define INLINE
Definition common_def.h:65
#define ArchRead32(addr)
Definition io.h:87
#define ArchRead16(addr)
Definition io.h:79
#define ArchWrite64(addr, value)
Definition io.h:63
#define ArchWrite16(addr, value)
Definition io.h:47
#define ArchWrite32(addr, value)
Definition io.h:55
#define ArchRead8(addr)
Definition io.h:71
#define ArchRead64(addr)
Definition io.h:95
#define ArchWrite8(addr, value)
Definition io.h:39
unsigned short UINT16
Definition los_typedef.h:51
unsigned long long UINT64
Definition los_typedef.h:72
#define VOID
Definition los_typedef.h:88
unsigned char UINT8
Definition los_typedef.h:50
unsigned int UINTPTR
Definition los_typedef.h:74
unsigned int UINT32
Definition los_typedef.h:52