RTEMS 6.1-rc1
xil_types.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) 2010 - 2020 Xilinx, Inc. All rights reserved.
3* SPDX-License-Identifier: MIT
4******************************************************************************/
5
6/*****************************************************************************/
33#ifndef XIL_TYPES_H /* prevent circular inclusions */
34#define XIL_TYPES_H /* by using protection macros */
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#include <stdint.h>
41#include <stddef.h>
42
43/************************** Constant Definitions *****************************/
44
45#ifndef TRUE
46# define TRUE 1U
47#endif
48
49#ifndef FALSE
50# define FALSE 0U
51#endif
52
53#ifndef NULL
54#define NULL 0U
55#endif
56
57#define XIL_COMPONENT_IS_READY 0x11111111U
61#define XIL_COMPONENT_IS_STARTED 0x22222222U
66/* @name New types
67 * New simple types.
68 * @{
69 */
70#ifndef __KERNEL__
71#ifndef XBASIC_TYPES_H
72/*
73 * guarded against xbasic_types.h.
74 */
75typedef uint8_t u8;
76typedef uint16_t u16;
77typedef uint32_t u32;
79#define __XUINT64__
80typedef struct
81{
82 u32 Upper;
83 u32 Lower;
84} Xuint64;
85
86
87/*****************************************************************************/
96#define XUINT64_MSW(x) ((x).Upper)
97
98/*****************************************************************************/
107#define XUINT64_LSW(x) ((x).Lower)
108
109#endif /* XBASIC_TYPES_H */
110
111/*
112 * xbasic_types.h does not typedef s* or u64
113 */
115typedef char char8;
116typedef int8_t s8;
117typedef int16_t s16;
118typedef int32_t s32;
119typedef int64_t s64;
120typedef uint64_t u64;
121typedef int sint32;
122
123typedef intptr_t INTPTR;
124typedef uintptr_t UINTPTR;
125typedef ptrdiff_t PTRDIFF;
127#if !defined(LONG) || !defined(ULONG)
128typedef long LONG;
129typedef unsigned long ULONG;
130#endif
131
132#define ULONG64_HI_MASK 0xFFFFFFFF00000000U
133#define ULONG64_LO_MASK ~ULONG64_HI_MASK
134
135#else
136#include <linux/types.h>
137#endif
138
144typedef void (*XInterruptHandler) (void *InstancePtr);
145
150typedef void (*XExceptionHandler) (void *InstancePtr);
151
161#if defined (__aarch64__) || defined (__arch64__)
162#define UPPER_32_BITS(n) ((u32)(((n) >> 16) >> 16))
163#else
164#define UPPER_32_BITS(n) 0U
165#endif
171#define LOWER_32_BITS(n) ((u32)(n))
172
173
174
175
176/************************** Constant Definitions *****************************/
177
178#ifndef TRUE
179#define TRUE 1U
180#endif
181
182#ifndef FALSE
183#define FALSE 0U
184#endif
185
186#ifndef NULL
187#define NULL 0U
188#endif
189
190#ifdef __cplusplus
191}
192#endif
193
194#endif /* end of protection macro */
void(* XInterruptHandler)(void *InstancePtr)
Definition: xil_types.h:144
void(* XExceptionHandler)(void *InstancePtr)
Definition: xil_types.h:150
Definition: xil_types.h:81