CMSIS compiler GCC header file. More...
Go to the source code of this file.
Data Structures | |
struct | T_UINT32 |
struct | T_UINT16_WRITE |
struct | T_UINT16_READ |
struct | T_UINT32_WRITE |
struct | T_UINT32_READ |
Macros | |
#define | __has_builtin(x) (0) |
#define | __ASM __asm |
#define | __INLINE inline |
#define | __STATIC_INLINE static inline |
#define | __STATIC_FORCEINLINE __attribute__((always_inline)) static inline |
#define | __NO_RETURN __attribute__((__noreturn__)) |
#define | __USED __attribute__((used)) |
#define | __WEAK __attribute__((weak)) |
#define | __PACKED __attribute__((packed, aligned(1))) |
#define | __PACKED_STRUCT struct __attribute__((packed, aligned(1))) |
#define | __PACKED_UNION union __attribute__((packed, aligned(1))) |
#define | __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) |
#define | __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) |
#define | __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) |
#define | __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) |
#define | __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) |
#define | __ALIGNED(x) __attribute__((aligned(x))) |
#define | __RESTRICT __restrict |
#define | __COMPILER_BARRIER() __ASM volatile("":::"memory") |
#define | __PROGRAM_START __cmsis_start |
#define | __INITIAL_SP __StackTop |
#define | __STACK_LIMIT __StackLimit |
#define | __VECTOR_TABLE __Vectors |
#define | __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section(".vectors"))) |
#define | __CMSIS_GCC_OUT_REG(r) "=r" (r) |
#define | __CMSIS_GCC_RW_REG(r) "+r" (r) |
#define | __CMSIS_GCC_USE_REG(r) "r" (r) |
#define | __NOP() __ASM volatile ("nop") |
No Operation. More... | |
#define | __WFI() __ASM volatile ("wfi":::"memory") |
Wait For Interrupt. More... | |
#define | __WFE() __ASM volatile ("wfe":::"memory") |
Wait For Event. More... | |
#define | __SEV() __ASM volatile ("sev") |
Send Event. More... | |
#define | __BKPT(value) __ASM volatile ("bkpt "#value) |
Breakpoint. More... | |
Functions | |
static void | __cmsis_start (void) |
Initializes data and bss sections. More... | |
static void | __enable_irq (void) |
Enable IRQ Interrupts. More... | |
static void | __disable_irq (void) |
Disable IRQ Interrupts. More... | |
static uint32_t | __get_CONTROL (void) |
Get Control Register. More... | |
static void | __set_CONTROL (uint32_t control) |
Set Control Register. More... | |
static uint32_t | __get_IPSR (void) |
Get IPSR Register. More... | |
static uint32_t | __get_APSR (void) |
Get APSR Register. More... | |
static uint32_t | __get_xPSR (void) |
Get xPSR Register. More... | |
static uint32_t | __get_PSP (void) |
Get Process Stack Pointer. More... | |
static void | __set_PSP (uint32_t topOfProcStack) |
Set Process Stack Pointer. More... | |
static uint32_t | __get_MSP (void) |
Get Main Stack Pointer. More... | |
static void | __set_MSP (uint32_t topOfMainStack) |
Set Main Stack Pointer. More... | |
static uint32_t | __get_PRIMASK (void) |
Get Priority Mask. More... | |
static void | __set_PRIMASK (uint32_t priMask) |
Set Priority Mask. More... | |
static uint32_t | __get_FPSCR (void) |
Get FPSCR. More... | |
static void | __set_FPSCR (uint32_t fpscr) |
Set FPSCR. More... | |
static void | __ISB (void) |
Instruction Synchronization Barrier. More... | |
static void | __DSB (void) |
Data Synchronization Barrier. More... | |
static void | __DMB (void) |
Data Memory Barrier. More... | |
static uint32_t | __REV (uint32_t value) |
Reverse byte order (32 bit) More... | |
static uint32_t | __REV16 (uint32_t value) |
Reverse byte order (16 bit) More... | |
static int16_t | __REVSH (int16_t value) |
Reverse byte order (16 bit) More... | |
static uint32_t | __ROR (uint32_t op1, uint32_t op2) |
Rotate Right in unsigned value (32 bit) More... | |
static uint32_t | __RBIT (uint32_t value) |
Reverse bit order of value. More... | |
static uint8_t | __CLZ (uint32_t value) |
Count leading zeros. More... | |
static int32_t | __SSAT (int32_t val, uint32_t sat) |
Signed Saturate. More... | |
static uint32_t | __USAT (int32_t val, uint32_t sat) |
Unsigned Saturate. More... | |
CMSIS compiler GCC header file.
|
inlinestatic |
Count leading zeros.
Counts the number of leading zeros of a data value.
[in] | value | Value to count the leading zeros |
|
inlinestatic |
Initializes data and bss sections.
This default implementations initialized all data and additional bss sections relying on .copy.table and .zero.table specified properly in the used linker script.
|
inlinestatic |
Get APSR Register.
Returns the content of the APSR Register.
|
inlinestatic |
Get Control Register.
Returns the content of the Control Register.
|
inlinestatic |
Get FPSCR.
Returns the current value of the Floating Point Status/Control register.
|
inlinestatic |
Get IPSR Register.
Returns the content of the IPSR Register.
|
inlinestatic |
Get Main Stack Pointer.
Returns the current value of the Main Stack Pointer (MSP).
|
inlinestatic |
Get Priority Mask.
Returns the current state of the priority mask bit from the Priority Mask Register.
|
inlinestatic |
Get Process Stack Pointer.
Returns the current value of the Process Stack Pointer (PSP).
|
inlinestatic |
Get xPSR Register.
Returns the content of the xPSR Register.
|
inlinestatic |
Reverse bit order of value.
Reverses the bit order of the given value.
[in] | value | Value to reverse |
|
inlinestatic |
Reverse byte order (16 bit)
Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856.
[in] | value | Value to reverse |
|
inlinestatic |
Reverse byte order (16 bit)
Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000.
[in] | value | Value to reverse |
|
inlinestatic |
Rotate Right in unsigned value (32 bit)
Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
[in] | op1 | Value to rotate |
[in] | op2 | Number of Bits to rotate |
|
inlinestatic |
Set Control Register.
Writes the given value to the Control Register.
[in] | control | Control Register value to set |
|
inlinestatic |
Set FPSCR.
Assigns the given value to the Floating Point Status/Control register.
[in] | fpscr | Floating Point Status/Control value to set |
|
inlinestatic |
Set Main Stack Pointer.
Assigns the given value to the Main Stack Pointer (MSP).
[in] | topOfMainStack | Main Stack Pointer value to set |
|
inlinestatic |
Set Priority Mask.
Assigns the given value to the Priority Mask Register.
[in] | priMask | Priority Mask |
|
inlinestatic |
Set Process Stack Pointer.
Assigns the given value to the Process Stack Pointer (PSP).
[in] | topOfProcStack | Process Stack Pointer value to set |
|
inlinestatic |
Signed Saturate.
Saturates a signed value.
[in] | value | Value to be saturated |
[in] | sat | Bit position to saturate to (1..32) |
|
inlinestatic |
Unsigned Saturate.
Saturates an unsigned value.
[in] | value | Value to be saturated |
[in] | sat | Bit position to saturate to (0..31) |