Loading...
Searching...
No Matches
Go to the documentation of this file.
12 #define __inline inline
15 #define __INLINE __inline
18#ifndef __STATIC_INLINE
19 #define __STATIC_INLINE static __inline
22#ifndef __STATIC_FORCEINLINE
23 #define __STATIC_FORCEINLINE static __forceinline
27 #define __NO_RETURN __declspec(noreturn)
31 #define __USED __attribute__((used))
36 #define __WEAK __declspec(selectany)
41 #define __PACKED __attribute__((packed))
44#ifndef __PACKED_STRUCT
45 #define __PACKED_STRUCT __packed struct
49 #define __PACKED_UNION __packed union
52#ifndef __UNALIGNED_UINT32
53 #define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x)))
56#ifndef __UNALIGNED_UINT16_WRITE
57 #define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val))
60#ifndef __UNALIGNED_UINT16_READ
61 #define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr)))
64#ifndef __UNALIGNED_UINT32_WRITE
65 #define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val))
68#ifndef __UNALIGNED_UINT32_READ
69 #define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr)))
73 #define __ALIGNED(x) __attribute__((aligned(x)))
77 #define __RESTRICT __restrict
148#define __REV(value) value
157#define __REV16(value) value
166#define __REVSH(value) value
186#define __BKPT(value) value
195#define __RBIT() _byteswap_ulong(_rotr(value, 16))
203#define __CLZ() __lzcnt(value)
212#define __LDREXB(ptr) (*(volatile uint8_t *)(ptr))
221#define __LDREXH(ptr) (*(volatile uint16_t *)(ptr))
230#define __LDREXW(ptr) (*(volatile uint32_t *)(ptr))
241#define __STREXB(value, ptr) (*(volatile uint8_t *)(ptr) = (value), 0)
252#define __STREXH(value, ptr) (*(volatile uint16_t *)(ptr) = (value), 0)
263#define __STREXW(value, ptr) (*(volatile uint32_t *)(ptr) = (value), 0)