File nut/arch/cm3/cmsis/core_cm3.c

* @file core_cm3.c * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Source File * @version V1.30 * @date 30. October 2009 * * @note * Copyright (C) 2009 ARM Limited. All rights reserved. * * @par * ARM Limited (ARM) is supplying this software for use with Cortex-M * processor based microcontrollers. This file can be freely distributed * within development tools that are supporting such ARM based processors. * * @par * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. *


Included Files


Preprocessor definitions

#define __ASM __asm

#define __INLINE inline


Global Function __LDREXB()

* @brief LDR Exclusive (8 bit) * * @param *addr address pointer * @return value of (*address) * * Exclusive LDR command for 8 bit value

uint8_t __LDREXB ( uint8_t* addr )


Global Function __LDREXH()

* @brief LDR Exclusive (16 bit) * * @param *addr address pointer * @return value of (*address) * * Exclusive LDR command for 16 bit values

uint16_t __LDREXH ( uint16_t* addr )


Global Function __LDREXW()

* @brief LDR Exclusive (32 bit) * * @param *addr address pointer * @return value of (*address) * * Exclusive LDR command for 32 bit values

uint32_t __LDREXW ( uint32_t* addr )


Global Function __RBIT()

* @brief Reverse bit order of value * * @param value value to reverse * @return reversed value * * Reverse bit order of value

uint32_t __RBIT ( uint32_t value )


Global Function __REV()

* @brief Reverse byte order in integer value * * @param value value to reverse * @return reversed value * * Reverse byte order in integer value

uint32_t __REV ( uint32_t value )


Global Function __REV16()

* @brief Reverse byte order in unsigned short value * * @param value value to reverse * @return reversed value * * Reverse byte order in unsigned short value

uint32_t __REV16 ( uint16_t value )


Global Function __REVSH()

* @brief Reverse byte order in signed short value with sign extension to integer * * @param value value to reverse * @return reversed value * * Reverse byte order in signed short value with sign extension to integer

int32_t __REVSH ( int16_t value )


Global Function __STREXB()

* @brief STR Exclusive (8 bit) * * @param value value to store * @param *addr address pointer * @return successful / failed * * Exclusive STR command for 8 bit values

uint32_t __STREXB ( uint8_t value, uint8_t* addr )


Global Function __STREXH()

* @brief STR Exclusive (16 bit) * * @param value value to store * @param *addr address pointer * @return successful / failed * * Exclusive STR command for 16 bit values

uint32_t __STREXH ( uint16_t value, uint16_t* addr )


Global Function __STREXW()

* @brief STR Exclusive (32 bit) * * @param value value to store * @param *addr address pointer * @return successful / failed * * Exclusive STR command for 32 bit values

uint32_t __STREXW ( uint32_t value, uint32_t* addr )


Global Function __get_BASEPRI()

* @brief Return the Base Priority value * * @return BasePriority * * Return the content of the base priority register

uint32_t __get_BASEPRI ( void )


Global Function __get_CONTROL()

* @brief Return the Control Register value

uint32_t __get_CONTROL ( void )
* @return Control value * * Return the content of the control register


Global Function __get_FAULTMASK()

* @brief Return the Fault Mask value * * @return FaultMask * * Return the content of the fault mask register

uint32_t __get_FAULTMASK ( void )


Global Function __get_MSP()

uint32_t __get_MSP ( void )
Prototyped in: nut/arch/cm3/cmsis/core_cm3.c

Global Function __get_PRIMASK()

* @brief Return the Priority Mask value * * @return PriMask * * Return state of the priority mask bit from the priority mask register

uint32_t __get_PRIMASK ( void )


Global Function __get_PSP()

uint32_t __get_PSP ( void )
Prototyped in: nut/arch/cm3/cmsis/core_cm3.c

Global Function __set_BASEPRI()

* @brief Set the Base Priority value * * @param basePri BasePriority * * Set the base priority register

void __set_BASEPRI ( uint32_t value )


Global Function __set_CONTROL()

* @brief Set the Control Register value * * @param control Control value * * Set the control register

void __set_CONTROL ( uint32_t control )


Global Function __set_FAULTMASK()

* @brief Set the Fault Mask value * * @param faultMask faultMask value * * Set the fault mask register

void __set_FAULTMASK ( uint32_t faultMask )


Global Function __set_IPSR()

void __set_IPSR ( uint32_t value )
Prototyped in: nut/arch/cm3/cmsis/core_cm3.c

Global Function __set_MSP()

void __set_MSP ( uint32_t topOfMainStack )
Prototyped in: nut/arch/cm3/cmsis/core_cm3.c

Global Function __set_PRIMASK()

* @brief Set the Priority Mask value * * @param priMask PriMask * * Set the priority mask bit in the priority mask register

void __set_PRIMASK ( uint32_t priMask )


Global Function __set_PSP()

void __set_PSP ( uint32_t topOfProcStack )
Prototyped in: nut/arch/cm3/cmsis/core_cm3.c