📄 drvspi.lst
字号:
N * @brief Set the Priority Mask value
N *
N * @param priMask PriMask
N *
N * Set the priority mask bit in the priority mask register
N */
Nstatic __INLINE void __set_PRIMASK(uint32_t priMask)
Xstatic __inline void __set_PRIMASK(uint32_t priMask)
N{
N register uint32_t __regPriMask __ASM("primask");
X register uint32_t __regPriMask __asm("primask");
N __regPriMask = (priMask);
N}
N
N/**
N * @brief Return the Control Register value
N *
N * @return Control value
N *
N * Return the content of the control register
N */
Nstatic __INLINE uint32_t __get_CONTROL(void)
Xstatic __inline uint32_t __get_CONTROL(void)
N{
N register uint32_t __regControl __ASM("control");
X register uint32_t __regControl __asm("control");
N return(__regControl);
N}
N
N/**
N * @brief Set the Control Register value
N *
N * @param control Control value
N *
N * Set the control register
N */
Nstatic __INLINE void __set_CONTROL(uint32_t control)
Xstatic __inline void __set_CONTROL(uint32_t control)
N{
N register uint32_t __regControl __ASM("control");
X register uint32_t __regControl __asm("control");
N __regControl = control;
N}
N
N#endif /* __ARMCC_VERSION */
N
N
N
N#elif (defined (__ICCARM__)) /*------------------ ICC Compiler -------------------*/
S/* IAR iccarm specific functions */
S
S#define __enable_irq __enable_interrupt /*!< global Interrupt enable */
S#define __disable_irq __disable_interrupt /*!< global Interrupt disable */
S
Sstatic __INLINE void __enable_fault_irq() { __ASM ("cpsie f"); }
Sstatic __INLINE void __disable_fault_irq() { __ASM ("cpsid f"); }
S
S#define __NOP __no_operation /*!< no operation intrinsic in IAR Compiler */
Sstatic __INLINE void __WFI() { __ASM ("wfi"); }
Sstatic __INLINE void __WFE() { __ASM ("wfe"); }
Sstatic __INLINE void __SEV() { __ASM ("sev"); }
S
S/* intrinsic void __ISB(void) */
S/* intrinsic void __DSB(void) */
S/* intrinsic void __DMB(void) */
S/* intrinsic void __set_PRIMASK(); */
S/* intrinsic void __get_PRIMASK(); */
S
S
S/* intrinsic uint32_t __REV(uint32_t value); */
S/* intrinsic uint32_t __REVSH(uint32_t value); */
S
S
S/**
S * @brief Return the Process Stack Pointer
S *
S * @return ProcessStackPointer
S *
S * Return the actual process stack pointer
S */
Sextern uint32_t __get_PSP(void);
S
S/**
S * @brief Set the Process Stack Pointer
S *
S * @param topOfProcStack Process Stack Pointer
S *
S * Assign the value ProcessStackPointer to the MSP
S * (process stack pointer) Cortex processor register
S */
Sextern void __set_PSP(uint32_t topOfProcStack);
S
S/**
S * @brief Return the Main Stack Pointer
S *
S * @return Main Stack Pointer
S *
S * Return the current value of the MSP (main stack pointer)
S * Cortex processor register
S */
Sextern uint32_t __get_MSP(void);
S
S/**
S * @brief Set the Main Stack Pointer
S *
S * @param topOfMainStack Main Stack Pointer
S *
S * Assign the value mainStackPointer to the MSP
S * (main stack pointer) Cortex processor register
S */
Sextern void __set_MSP(uint32_t topOfMainStack);
S
S/**
S * @brief Reverse byte order in unsigned short value
S *
S * @param value value to reverse
S * @return reversed value
S *
S * Reverse byte order in unsigned short value
S */
Sextern uint32_t __REV16(uint16_t value);
S
S
S
S
S
S#elif (defined (__GNUC__)) /*------------------ GNU Compiler ---------------------*/
S/* GNU gcc specific functions */
S
Sstatic __INLINE void __enable_irq() { __ASM volatile ("cpsie i"); }
Sstatic __INLINE void __disable_irq() { __ASM volatile ("cpsid i"); }
S
Sstatic __INLINE void __enable_fault_irq() { __ASM volatile ("cpsie f"); }
Sstatic __INLINE void __disable_fault_irq() { __ASM volatile ("cpsid f"); }
S
Sstatic __INLINE void __NOP() { __ASM volatile ("nop"); }
Sstatic __INLINE void __WFI() { __ASM volatile ("wfi"); }
Sstatic __INLINE void __WFE() { __ASM volatile ("wfe"); }
Sstatic __INLINE void __SEV() { __ASM volatile ("sev"); }
Sstatic __INLINE void __ISB() { __ASM volatile ("isb"); }
Sstatic __INLINE void __DSB() { __ASM volatile ("dsb"); }
Sstatic __INLINE void __DMB() { __ASM volatile ("dmb"); }
S
S
S/**
S * @brief Return the Process Stack Pointer
S *
S * @return ProcessStackPointer
S *
S * Return the actual process stack pointer
S */
Sextern uint32_t __get_PSP(void);
S
S/**
S * @brief Set the Process Stack Pointer
S *
S * @param topOfProcStack Process Stack Pointer
S *
S * Assign the value ProcessStackPointer to the MSP
S * (process stack pointer) Cortex processor register
S */
Sextern void __set_PSP(uint32_t topOfProcStack);
S
S/**
S * @brief Return the Main Stack Pointer
S *
S * @return Main Stack Pointer
S *
S * Return the current value of the MSP (main stack pointer)
S * Cortex processor register
S */
Sextern uint32_t __get_MSP(void);
S
S/**
S * @brief Set the Main Stack Pointer
S *
S * @param topOfMainStack Main Stack Pointer
S *
S * Assign the value mainStackPointer to the MSP
S * (main stack pointer) Cortex processor register
S */
Sextern void __set_MSP(uint32_t topOfMainStack);
S
S/**
S * @brief Return the Priority Mask value
S *
S * @return PriMask
S *
S * Return state of the priority mask bit from the priority mask register
S */
Sextern uint32_t __get_PRIMASK(void);
S
S/**
S * @brief Set the Priority Mask value
S *
S * @param priMask PriMask
S *
S * Set the priority mask bit in the priority mask register
S */
Sextern void __set_PRIMASK(uint32_t priMask);
S
S/**
S * @brief Return the Control Register value
S*
S* @return Control value
S *
S * Return the content of the control register
S */
Sextern uint32_t __get_CONTROL(void);
S
S/**
S * @brief Set the Control Register value
S *
S * @param control Control value
S *
S * Set the control register
S */
Sextern void __set_CONTROL(uint32_t control);
S
S/**
S * @brief Reverse byte order in integer value
S *
S * @param value value to reverse
S * @return reversed value
S *
S * Reverse byte order in integer value
S */
Sextern uint32_t __REV(uint32_t value);
S
S/**
S * @brief Reverse byte order in unsigned short value
S *
S * @param value value to reverse
S * @return reversed value
S *
S * Reverse byte order in unsigned short value
S */
Sextern uint32_t __REV16(uint16_t value);
S
S/**
S * @brief Reverse byte order in signed short value with sign extension to integer
S *
S * @param value value to reverse
S * @return reversed value
S *
S * Reverse byte order in signed short value with sign extension to integer
S */
Sextern int32_t __REVSH(int16_t value);
S
S
S#elif (defined (__TASKING__)) /*------------------ TASKING Compiler ---------------------*/
S/* TASKING carm specific functions */
S
S/*
S * The CMSIS functions have been implemented as intrinsics in the compiler.
S * Please use "carm -?i" to get an up to date list of all instrinsics,
S * Including the CMSIS ones.
S */
S
N#endif
N
N
N/** @addtogroup CMSIS_CM0_Core_FunctionInterface CMSIS CM0 Core Function Interface
N Core Function Interface containing:
N - Core NVIC Functions
N - Core SysTick Functions
N - Core Reset Functions
N*/
N/*@{*/
N
N/* ########################## NVIC functions #################################### */
N
N/* Interrupt Priorities are WORD accessible only under ARMv6M */
N/* The following MACROS handle generation of the register offset and byte masks */
N#define _BIT_SHIFT(IRQn) ( (((uint32_t)(IRQn) ) & 0x03) * 8 )
N#define _SHP_IDX(IRQn) ( ((((uint32_t)(IRQn) & 0x0F)-8) >> 2) )
N#define _IP_IDX(IRQn) ( ((uint32_t)(IRQn) >> 2) )
N
N
N/**
N * @brief Enable Interrupt in NVIC Interrupt Controller
N *
N * @param IRQn The positive number of the external interrupt to enable
N *
N * Enable a device specific interupt in the NVIC interrupt controller.
N * The interrupt number cannot be a negative value.
N */
Nstatic __INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
Xstatic __inline void NVIC_EnableIRQ(IRQn_Type IRQn)
N{
N NVIC->ISER[0] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* enable interrupt */
X ((NVIC_Type *) ((0xE000E000) + 0x0100))->ISER[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
N}
N
N/**
N * @brief Disable the interrupt line for external interrupt specified
N *
N * @param IRQn The positive number of the external interrupt to disable
N *
N * Disable a device specific interupt in the NVIC interrupt controller.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -