File indexing completed on 2025-05-11 08:23:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 #ifndef LIBBSP_SHARED_XIL_COMPAT_COMMON_H
0037 #define LIBBSP_SHARED_XIL_COMPAT_COMMON_H
0038 #include <stdint.h>
0039 typedef uint8_t u8;
0040 typedef int8_t s8;
0041 typedef uint16_t u16;
0042 typedef uint32_t u32;
0043 typedef int32_t s32;
0044 typedef uint64_t u64;
0045 typedef intptr_t INTPTR;
0046 typedef uintptr_t UINTPTR;
0047 #define INLINE inline
0048
0049 #define XST_SUCCESS 0
0050 #define XST_FAILURE 1
0051 #define XST_DEVICE_IS_STARTED 5
0052 #define XST_DEVICE_BUSY 21
0053 #define XST_FLASH_TIMEOUT_ERROR 1134
0054 #define XST_SPI_TRANSFER_DONE 1152
0055 #define XST_SPI_COMMAND_ERROR 1162
0056 #define XST_SPI_POLL_DONE 1163
0057
0058 #include <rtems/score/assert.h>
0059 #define Xil_AssertNonvoid(expr) _Assert(expr);
0060 #define Xil_AssertVoid(expr) _Assert(expr);
0061 #define Xil_AssertVoidAlways() _Assert(false);
0062
0063 #include <stdio.h>
0064 #define xil_printf(args...) printf(args)
0065
0066 #define XIL_COMPONENT_IS_READY 0x1U
0067
0068 #include <string.h>
0069 #define Xil_MemCpy(dest, src, count) memcpy(dest, src, count)
0070
0071 static inline uint32_t Xil_In32(uintptr_t addr)
0072 {
0073 return *(volatile uint32_t *) addr;
0074 }
0075
0076 static inline void Xil_Out32(uintptr_t addr, uint32_t value)
0077 {
0078 *(volatile uint32_t *)addr = value;
0079 }
0080
0081 #include <rtems/rtems/cache.h>
0082 #define Xil_DCacheInvalidateRange(addr, len) \
0083 rtems_cache_flush_multiple_data_lines((void*)addr, len); \
0084 rtems_cache_invalidate_multiple_data_lines((void*)addr, len)
0085 #define Xil_DCacheFlushRange(addr, len) \
0086 rtems_cache_flush_multiple_data_lines((void*)addr, len)
0087
0088 #include <unistd.h>
0089 #include <bspopts.h>
0090
0091 #endif