STM32库代码疑问?

[复制链接]
2581|2
 楼主| zxyzxyz 发表于 2009-8-19 20:16 | 显示全部楼层 |阅读模式
void NVIC_BASEPRICONFIG(u32 NewPriority)
{
  /* Check the parameters */
  assert_param(IS_NVIC_BASE_PRI(NewPriority));
  
  __BASEPRICONFIG(NewPriority << 0x04);  ???为什么移位??
}
/*******************************************************************************
* Function Name  : NVIC_GetBASEPRI
* Description    : Returns the BASEPRI mask value.
* Input          : None
* Output         : None
* Return         : BASEPRI register value
*******************************************************************************/
u32 NVIC_GetBASEPRI(void)
{
  return (__GetBASEPRI());
}
 楼主| zxyzxyz 发表于 2009-8-20 10:59 | 显示全部楼层
没有一个人用到这个功能么?
 楼主| zxyzxyz 发表于 2009-8-21 09:13 | 显示全部楼层
明白了,STM32省掉了4bit, 但是 NVIC_GetBASEPRI 也应该移位才行。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

14

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部