打印

MSPM0L系列使用过程中的几个汇编嵌入宏定义解析

[复制链接]
262|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
xyz549040622|  楼主 | 2023-4-26 15:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 xyz549040622 于 2023-4-26 15:14 编辑
/**
  \brief   No Operation
  \details No Operation does nothing. This instruction can be used for code alignment purposes.
*/
#define __NOP()                             __ASM volatile ("nop")

/**
  \brief   Wait For Interrupt
  \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
*/
#define __WFI()                             __ASM volatile ("wfi":::"memory")


/**
  \brief   Wait For Event
  \details Wait For Event is a hint instruction that permits the processor to enter
           a low-power state until one of a number of events occurs.
*/
#define __WFE()                             __ASM volatile ("wfe":::"memory")


/**
  \brief   Send Event
  \details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
*/
#define __SEV()                             __ASM volatile ("sev")
__NOP()  //空延时
__WFI()  //等待中断

__WFE()  //等待事件
__SEV()  //发送事件




使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:qq群: 嵌入式系统arm初学者 224636155←← +→→点击-->小 i 精品课全集,21ic公开课~~←←→→点击-->小 i 精品课全集,给你全方位的技能策划~~←←

2700

主题

19156

帖子

103

粉丝