RTEMS 6.1-rc1
xil_types.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) 2010 - 2021 Xilinx, Inc. All rights reserved.
3* SPDX-License-Identifier: MIT
4******************************************************************************/
5
6/*****************************************************************************/
36#ifndef XIL_TYPES_H /* prevent circular inclusions */
37#define XIL_TYPES_H /* by using protection macros */
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include <stdint.h>
44#include <stddef.h>
45
46/************************** Constant Definitions *****************************/
47
48#ifndef TRUE
49# define TRUE 1U
50#endif
51
52#ifndef FALSE
53# define FALSE 0U
54#endif
55
56#ifndef NULL
57#define NULL 0U
58#endif
59
60#define XIL_COMPONENT_IS_READY 0x11111111U
64#define XIL_COMPONENT_IS_STARTED 0x22222222U
69/* @name New types
70 * New simple types.
71 * @{
72 */
73#ifndef __KERNEL__
74#ifndef XBASIC_TYPES_H
75/*
76 * guarded against xbasic_types.h.
77 */
78typedef uint8_t u8;
79typedef uint16_t u16;
80typedef uint32_t u32;
82#define __XUINT64__
83typedef struct
84{
85 u32 Upper;
86 u32 Lower;
87} Xuint64;
88
89
90/*****************************************************************************/
99#define XUINT64_MSW(x) ((x).Upper)
100
101/*****************************************************************************/
110#define XUINT64_LSW(x) ((x).Lower)
111
112#endif /* XBASIC_TYPES_H */
113
114/*
115 * xbasic_types.h does not typedef s* or u64
116 */
118typedef char char8;
119typedef int8_t s8;
120typedef int16_t s16;
121typedef int32_t s32;
122typedef int64_t s64;
123typedef uint64_t u64;
124typedef int sint32;
125
126typedef intptr_t INTPTR;
127typedef uintptr_t UINTPTR;
128typedef ptrdiff_t PTRDIFF;
130#if !defined(LONG) || !defined(ULONG)
131typedef long LONG;
132typedef unsigned long ULONG;
133#endif
134
135#define ULONG64_HI_MASK 0xFFFFFFFF00000000U
136#define ULONG64_LO_MASK ~ULONG64_HI_MASK
137
138#else
139#include <linux/types.h>
140#endif
141
147typedef void (*XInterruptHandler) (void *InstancePtr);
148
153typedef void (*XExceptionHandler) (void *InstancePtr);
154
164#if defined (__aarch64__) || defined (__arch64__)
165#define UPPER_32_BITS(n) ((u32)(((n) >> 16) >> 16))
166#else
167#define UPPER_32_BITS(n) 0U
168#endif
174#define LOWER_32_BITS(n) ((u32)(n))
175
176
177
178
179/************************** Constant Definitions *****************************/
180
181#ifndef TRUE
182#define TRUE 1U
183#endif
184
185#ifndef FALSE
186#define FALSE 0U
187#endif
188
189#ifndef NULL
190#define NULL 0U
191#endif
192
193#ifdef __cplusplus
194}
195#endif
196
197#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