/*********************************************************************************************************
** @file: core_cm0.c
** @purpose: CMSIS Cortex-M0 Core Peripheral Access Layer Source File
** @version: V1.0
** @date: 12. Nov. 2008
**--------------------------------------------------------------------------------------------------------
**
** Copyright (C) 2008 ARM Limited. All rights reserved.
**
** ARM Limited (ARM) is supplying this software for use with Cortex-M0
** processor based microcontrollers. This file can be freely distributed
** within development tools that are supporting such ARM based processors.
**
** 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.
**
*********************************************************************************************************/
#include <stdint.h>
/*********************************************************************************************************
define compiler specific symbols
*********************************************************************************************************/
#if defined ( __CC_ARM )
#define __ASM __asm /*!< asm keyword for armcc */
#define __INLINE __inline /*!< inline keyword for armcc */
#elif defined ( __ICCARM__ )
#define __ASM __asm /*!< asm keyword for iarcc */
#define __INLINE inline /*!< inline keyword for iarcc. */
/*!< Only avaiable in High */
/*!< optimization mode! */
#define __nop __no_operation /*!< no operation intrinsic in */
/*!< iarcc */
#elif defined ( __GNUC__ )
#define __ASM asm /*!< asm keyword for gcc */
#define __INLINE inline /*!< inline keyword for gcc */
#endif
#if (defined (__ARMCC_VERSION)) && (__ARMCC_VERSION < 400000)
/*********************************************************************************************************
** @brief Return the Process Stack Pointer
**
** @param none
** @return uint32_t ProcessStackPointer
**
** Return the actual process stack pointer
*********************************************************************************************************/
__ASM uint32_t __get_PSP(void)
{
mrs r0, psp
bx lr
}
/*********************************************************************************************************
** @brief Set the Process Stack Pointer
**
** @param uint32_t Process Stack Pointer
** @return none
**
** Assign the value ProcessStackPointer to the MSP
** (process stack pointer) Cortex processor register
*********************************************************************************************************/
__ASM void __set_PSP(uint32_t topOfProcStack)
{
msr psp, r0
bx lr
}
/*********************************************************************************************************
** @brief Return the Main Stack Pointer
**
** @param none
** @return uint32_t Main Stack Pointer
**
** Return the current value of the MSP (main stack pointer)
** Cortex processor register
*********************************************************************************************************/
__ASM uint32_t __get_MSP(void)
{
mrs r0, msp
bx lr
}
/*********************************************************************************************************
** @brief Set the Main Stack Pointer
**
** @param uint32_t Main Stack Pointer
** @return none
**
** Assign the value mainStackPointer to the MSP
** (main stack pointer) Cortex processor register
*********************************************************************************************************/
__ASM void __set_MSP(uint32_t mainStackPointer)
{
msr msp, r0
bx lr
}
/*********************************************************************************************************
** @brief Return the Base Priority value
**
** @param none
** @return uint32_t BasePriority
**
** Return the content of the base priority register
*********************************************************************************************************/
__ASM uint32_t __get_BASEPRI(void)
{
mrs r0, basepri
bx lr
}
/*********************************************************************************************************
** @brief Set the Base Priority value
**
** @param uint32_t BasePriority
** @return none
**
** Set the base priority register
*********************************************************************************************************/
__ASM void __set_BASEPRI(uint32_t basePri)
{
msr basepri, r0
bx lr
}
/*********************************************************************************************************
** @brief Return the Priority Mask value
**
** @param none
** @return uint32_t PriMask
**
** Return the state of the priority mask bit from the priority mask
** register
*********************************************************************************************************/
__ASM uint32_t __get_PRIMASK(void)
{
mrs r0, primask
bx lr
}
/*********************************************************************************************************
** @brief Set the Priority Mask value
**
** @param uint32_t PriMask
** @return none
**
** Set the priority mask bit in the priority mask register
*********************************************************************************************************/
__ASM void __set_PRIMASK(uint32_t priMask)
{
msr primask, r0
bx lr
}
/*********************************************************************************************************
** @brief Return the Fault Mask value
**
** @param none
** @return uint32_t FaultMask
**
** Return the content of the fault mask register
*********************************************************************************************************/
__ASM uint32_t __get_FAULTMASK(void)
{
mrs r0, faultmask
bx lr
}
/*********************************************************************************************************
** @brief Set the Fault Mask value
**
** @param uint32_t faultMask value
** @return none
**
** Set the fault mask register
*********************************************************************************************************/
__ASM void __set_FAULTMASK(uint32_t faultMask)
{
msr faultmask, r0
bx lr
}
/*********************************************************************************************************
** @brief Return the Control Register value
**
** @param none
** @return uint32_t Control value
**
** Return the content of the control register
*********************************************************************************************************/
__ASM uint32_t __get_CONTROL(void)
{
mrs r0, control
bx lr
}
/*********************************************************************************************************
** @brief Set the Control Register value
**
** @param uint32_t Control value
** @return none
**
** Set the control register
*************************
没有合适的资源?快使用搜索试试~ 我知道了~
GPIO.rar_tinym0 ucgui_周立功 tinym0
共66个文件
c:12个
h:12个
o:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 24 浏览量
2022-09-14
19:07:25
上传
评论
收藏 184KB RAR 举报
温馨提示
周立功公司TinyM0配套基本外设例程的编写是基于TinyM0核心板+我司的EasyCortex-M3 1300的开发板
资源推荐
资源详情
资源评论
收起资源包目录
GPIO.rar (66个子文件)
GPIO
GPIO_KEYIN
USER_CODE
main.c 4KB
GPIO_KEYIN.muo 363B
CM0
core_cm0.h 36KB
core_cm0.c 26KB
GPIO_KEYIN.xmp 8KB
LPC11xx
LPC11xx.h 37KB
system_LPC11xx.h 2KB
startup
startup_LPC11xx.s 10KB
system_LPC11xx.c 20KB
GPIO_LED
USER_CODE
main.c 5KB
GPIO_LED.xmp 8KB
CM0
core_cm0.h 36KB
core_cm0.c 26KB
GPIO_LED.muo 442B
LPC11xx
LPC11xx.h 37KB
system_LPC11xx.h 2KB
startup
startup_LPC11xx.s 10KB
system_LPC11xx.c 20KB
GPIO_BEEP
GPIO_BEEP.tuo 1KB
GPIO_BEEP.xmp 9KB
USER_CODE
main.c 4KB
TKScope.cfg 1KB
DebugInFlash
core_cm0.o 7KB
LPC1100.hex 5KB
system_LPC11xx.o 26KB
startup_LPC11xx.lst 29KB
GPIO_BEEP.sct 441B
LPC1100.htm 27KB
LPC1100.map 51KB
core_cm0.d 103B
main.d 233B
LPC1100.axf 20KB
startup_LPC11xx.o 5KB
system_LPC11xx.d 291B
main.o 24KB
GPIO_BEEP.muo 281B
CM0
core_cm0.h 36KB
core_cm0.c 26KB
LPC11xx
LPC11xx.h 37KB
system_LPC11xx.h 2KB
startup
startup_LPC11xx.s 10KB
system_LPC11xx.c 20KB
ReleaseInFlash
core_cm0.o 7KB
Template.htm 17KB
Template.map 17KB
system_LPC11xx.o 26KB
startup_LPC11xx.lst 29KB
GPIO_BEEP.sct 441B
core_cm0.d 107B
main.d 243B
startup_LPC11xx.o 5KB
Template.axf 15KB
system_LPC11xx.d 301B
main.o 24KB
Template.hex 3KB
.crf 22KB
GPIO_KeyInterrupt
GPIO_KeyInterrupt.muo 442B
USER_CODE
main.c 6KB
CM0
core_cm0.h 36KB
core_cm0.c 26KB
GPIO_KeyInterrupt.tuo 493B
LPC11xx
LPC11xx.h 37KB
system_LPC11xx.h 2KB
startup
startup_LPC11xx.s 10KB
system_LPC11xx.c 20KB
GPIO_KeyInterrupt.xmp 8KB
共 66 条
- 1
资源评论
钱亚锋
- 粉丝: 89
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功