亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stm32f10x_nvic.c

?? 萬利開發板上的lcd例程
?? C
?? 第 1 頁 / 共 2 頁
字號:
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name          : stm32f10x_nvic.c
* Author             : MCD Application Team
* Date First Issued  : 09/29/2006
* Description        : This file provides all the NVIC firmware functions.
********************************************************************************
* History:
* 05/21/2007: V0.3
* 04/02/2007: V0.2
* 02/05/2007: V0.1
* 09/29/2006: V0.01
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_nvic.h"

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define AIRC_VECTKEY_MASK    ((u32)0x05FA0000)

/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/

/*******************************************************************************
* Function Name  : NVIC_DeInit
* Description    : Deinitializes the NVIC peripheral registers to their default
*                  reset values.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_DeInit(void)
{
  u32 index = 0;
  
  NVIC->Disable[0] = 0xFFFFFFFF;
  NVIC->Disable[1] = 0x000007FF;
  NVIC->Clear[0] = 0xFFFFFFFF;
  NVIC->Clear[1] = 0x000007FF;
  
  for(index = 0; index < 0x0B; index++)
  {
     NVIC->Priority[index] = 0x00000000;
  } 
}

/*******************************************************************************
* Function Name  : NVIC_SCBDeInit
* Description    : Deinitializes the SCB peripheral registers to their default 
*                  reset values.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_SCBDeInit(void)
{
  u32 index = 0x00;
  
  SCB->IRQControlState = 0x0A000000;
  SCB->ExceptionTableOffset = 0x00000000;
  SCB->AIRC = AIRC_VECTKEY_MASK;
  SCB->SysCtrl = 0x00000000;
  SCB->ConfigCtrl = 0x00000000;
  for(index = 0; index < 0x03; index++)
  {
     SCB->SystemPriority[index] = 0;
  }
  SCB->SysHandlerCtrl = 0x00000000;
  SCB->ConfigFaultStatus = 0xFFFFFFFF;
  SCB->HardFaultStatus = 0xFFFFFFFF;
  SCB->DebugFaultStatus = 0xFFFFFFFF;
}

/*******************************************************************************
* Function Name  : NVIC_PriorityGroupConfig
* Description    : Configures the priority grouping: pre-emption priority
*                  and subpriority.
* Input          : - NVIC_PriorityGroup: specifies the priority grouping bits
*                    length. This parameter can be one of the following values:
*                       - NVIC_PriorityGroup_0: 0 bits for pre-emption priority
*                         4 bits for subpriority
*                       - NVIC_PriorityGroup_1: 1 bits for pre-emption priority
*                         3 bits for subpriority
*                       - NVIC_PriorityGroup_2: 2 bits for pre-emption priority
*                         2 bits for subpriority
*                       - NVIC_PriorityGroup_3: 3 bits for pre-emption priority
*                         1 bits for subpriority
*                       - NVIC_PriorityGroup_4: 4 bits for pre-emption priority
*                         0 bits for subpriority
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_PriorityGroupConfig(u32 NVIC_PriorityGroup)
{
  /* Check the parameters */
  assert(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup));
  
  /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */
  SCB->AIRC = AIRC_VECTKEY_MASK | NVIC_PriorityGroup;
}

/*******************************************************************************
* Function Name  : NVIC_Init
* Description    : Initializes the NVIC peripheral according to the specified
*                  parameters in the NVIC_InitStruct.
* Input          : - NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure
*                    that contains the configuration information for the
*                    specified NVIC peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct)
{
  u32 tmppriority = 0x00, tmpreg = 0x00, tmpmask = 0x00;
  u32 tmppre = 0, tmpsub = 0x0F;

  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd));
  assert(IS_NVIC_IRQ_CHANNEL(NVIC_InitStruct->NVIC_IRQChannel));
  assert(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority));  
  assert(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority));
    
  if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE)
  {
    /* Compute the Corresponding IRQ Priority --------------------------------*/    
    tmppriority = (0x700 - (SCB->AIRC & (u32)0x700))>> 0x08;
    tmppre = (0x4 - tmppriority);
    tmpsub = tmpsub >> tmppriority;
    
    tmppriority = (u32)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre;
    tmppriority |=  NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub;

    tmppriority = tmppriority << 0x04;
    tmppriority = ((u32)tmppriority) << ((NVIC_InitStruct->NVIC_IRQChannel & (u8)0x03) * 0x08);
    
    tmpreg = NVIC->Priority[(NVIC_InitStruct->NVIC_IRQChannel >> 0x02)];
    tmpmask = (u32)0xFF << ((NVIC_InitStruct->NVIC_IRQChannel & (u8)0x03) * 0x08);
    tmpreg &= ~tmpmask;
    tmppriority &= tmpmask;  
    tmpreg |= tmppriority;

    NVIC->Priority[(NVIC_InitStruct->NVIC_IRQChannel >> 0x02)] = tmpreg;
    
    /* Enable the Selected IRQ Channels --------------------------------------*/
    NVIC->Enable[(NVIC_InitStruct->NVIC_IRQChannel >> 0x05)] =
      (u32)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (u8)0x1F);
  }
  else
  {
    /* Disable the Selected IRQ Channels -------------------------------------*/
    NVIC->Disable[(NVIC_InitStruct->NVIC_IRQChannel >> 0x05)] =
      (u32)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (u8)0x1F);
  }
}

/*******************************************************************************
* Function Name  : NVIC_StructInit
* Description    : Fills each NVIC_InitStruct member with its default value.
* Input          : - NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure which
*                    will be initialized.
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_StructInit(NVIC_InitTypeDef* NVIC_InitStruct)
{
  /* NVIC_InitStruct members default value */
  NVIC_InitStruct->NVIC_IRQChannel = 0x00;
  NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority = 0x00;
  NVIC_InitStruct->NVIC_IRQChannelSubPriority = 0x00;
  NVIC_InitStruct->NVIC_IRQChannelCmd = DISABLE;
}

/*******************************************************************************
* Function Name  : NVIC_SETPRIMASK
* Description    : Enables the PRIMASK priority: Raises the execution priority to 0.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_SETPRIMASK(void)
{
  __SETPRIMASK();
}

/*******************************************************************************
* Function Name  : NVIC_RESETPRIMASK
* Description    : Disables the PRIMASK priority.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_RESETPRIMASK(void)
{
  __RESETPRIMASK();
}

/*******************************************************************************
* Function Name  : NVIC_SETFAULTMASK
* Description    : Enables the FAULTMASK priority: Raises the execution priority to -1.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_SETFAULTMASK(void)
{
  __SETFAULTMASK();
}

/*******************************************************************************
* Function Name  : NVIC_RESETFAULTMASK
* Description    : Disables the FAULTMASK priority.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_RESETFAULTMASK(void)
{
  __RESETFAULTMASK();
}

/*******************************************************************************
* Function Name  : NVIC_BASEPRICONFIG
* Description    : The execution priority can be changed from 15 (lowest 
                   configurable priority) to 1.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_BASEPRICONFIG(u32 NewPriority)
{
  /* Check the parameters */
  assert(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());
}

/*******************************************************************************
* Function Name  : NVIC_GetCurrentPendingIRQChannel
* Description    : Returns the current pending IRQ channel identifier.
* Input          : None
* Output         : None
* Return         : Pending IRQ Channel Identifier.
*******************************************************************************/
u16 NVIC_GetCurrentPendingIRQChannel(void)
{
  return ((u16)((SCB->IRQControlState & (u32)0x003FF000) >> 0x0C));
}

/*******************************************************************************
* Function Name  : NVIC_GetIRQChannelPendingBitStatus
* Description    : Checks whether the specified IRQ Channel pending bit is set
*                  or not.
* Input          : - NVIC_IRQChannel: specifies the interrupt pending bit to check.
* Output         : None
* Return         : The new state of IRQ Channel pending bit(SET or RESET).
*******************************************************************************/
ITStatus NVIC_GetIRQChannelPendingBitStatus(u8 NVIC_IRQChannel)
{
  ITStatus pendingirqstatus = RESET;
  u32 tmp = 0x00;
  
  /* Check the parameters */
  assert(IS_NVIC_IRQ_CHANNEL(NVIC_IRQChannel));
  
  tmp = ((u32)0x01 << (NVIC_IRQChannel & (u32)0x1F));

  if (((NVIC->Set[(NVIC_IRQChannel >> 0x05)]) & tmp) == tmp)
  {
    pendingirqstatus = SET;
  }
  else
  {
    pendingirqstatus = RESET;
  }
  return pendingirqstatus;
}

/*******************************************************************************
* Function Name  : NVIC_SetIRQChannelPendingBit
* Description    : Sets the NVIC抯 interrupt pending bit.
* Input          : - NVIC_IRQChannel: specifies the interrupt pending bit to Set.
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_SetIRQChannelPendingBit(u8 NVIC_IRQChannel)
{
  /* Check the parameters */
  assert(IS_NVIC_IRQ_CHANNEL(NVIC_IRQChannel));
  
  *(u32*)0xE000EF00 = (u32)NVIC_IRQChannel;
}

/*******************************************************************************
* Function Name  : NVIC_ClearIRQChannelPendingBit
* Description    : Clears the NVIC抯 interrupt pending bit.
* Input          : - NVIC_IRQChannel: specifies the interrupt pending bit to clear.
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_ClearIRQChannelPendingBit(u8 NVIC_IRQChannel)
{
  /* Check the parameters */
  assert(IS_NVIC_IRQ_CHANNEL(NVIC_IRQChannel));
  
  NVIC->Clear[(NVIC_IRQChannel >> 0x05)] = (u32)0x01 << (NVIC_IRQChannel & (u32)0x1F);
}

/*******************************************************************************
* Function Name  : NVIC_GetCurrentActiveHandler
* Description    : Returns the current active Handler (IRQ Channel and
*                  SystemHandler) identifier.
* Input          : None
* Output         : None
* Return         : Active Handler Identifier.
*******************************************************************************/
u16 NVIC_GetCurrentActiveHandler(void)
{
  return ((u16)(SCB->IRQControlState & (u32)0x3FF));
}

/*******************************************************************************
* Function Name  : NVIC_GetIRQChannelActiveBitStatus
* Description    : Checks whether the specified IRQ Channel active bit is set
*                  or not.
* Input          : - NVIC_IRQChannel: specifies the interrupt active bit to check.
* Output         : None
* Return         : The new state of IRQ Channel active bit(SET or RESET).
*******************************************************************************/
ITStatus NVIC_GetIRQChannelActiveBitStatus(u8 NVIC_IRQChannel)
{
  ITStatus activeirqstatus = RESET;
  u32 tmp = 0x00;

  /* Check the parameters */
  assert(IS_NVIC_IRQ_CHANNEL(NVIC_IRQChannel));
  
  tmp = ((u32)0x01 << (NVIC_IRQChannel & (u32)0x1F));

  if (((NVIC->Active[(NVIC_IRQChannel >> 0x05)]) & tmp) == tmp )
  {
    activeirqstatus = SET;
  }
  else
  {
    activeirqstatus = RESET;
  }
  return activeirqstatus;
}

/*******************************************************************************
* Function Name  : NVIC_GetCPUID
* Description    : Returns the ID number, the version number and the implementation
*                  details of the Cortex-M3 core.
* Input          : None
* Output         : None
* Return         : CPU ID.
*******************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
伊人夜夜躁av伊人久久| 欧美肥妇bbw| 国产一区二区视频在线播放| 亚洲精品菠萝久久久久久久| 国产精品丝袜在线| 久久奇米777| 欧美日韩国产经典色站一区二区三区| a级高清视频欧美日韩| 国产成+人+日韩+欧美+亚洲| 国产综合色在线视频区| 激情五月播播久久久精品| 美腿丝袜亚洲三区| 国产精品影音先锋| av亚洲精华国产精华| 国产99久久久国产精品| 国产在线精品一区二区三区不卡| 精品一区二区三区av| 久久国产福利国产秒拍| 国产乱妇无码大片在线观看| 国产精品小仙女| 99精品视频一区二区三区| 色综合久久中文综合久久97| 在线视频国产一区| 91精品国产综合久久久久久| 欧美r级电影在线观看| 久久综合视频网| 国产欧美日产一区| 亚洲黄色性网站| 午夜精品一区二区三区电影天堂| 美女一区二区三区| 国产精品综合视频| 99精品视频在线观看免费| 欧美综合色免费| 欧美一区二区在线免费播放| 精品国产在天天线2019| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美激情自拍偷拍| 亚洲大片免费看| 韩国精品在线观看| 91亚洲精品久久久蜜桃| 一本大道久久a久久综合| 在线亚洲人成电影网站色www| 欧美吞精做爰啪啪高潮| 欧美精品一区二区三区在线 | 成人免费va视频| 色www精品视频在线观看| 欧美一级欧美三级| 亚洲欧美日韩系列| 国产精品88888| 欧美日韩国产乱码电影| 国产欧美精品一区| 日本视频在线一区| av资源站一区| 欧美大片一区二区| 亚洲精品高清视频在线观看| 免费观看日韩电影| 97久久精品人人做人人爽50路| 88在线观看91蜜桃国自产| 中文字幕国产一区二区| 三级久久三级久久久| av高清久久久| 日韩欧美综合在线| 亚洲电影一级片| 99综合影院在线| 久久人人爽爽爽人久久久| 亚洲成a人v欧美综合天堂下载| 不卡的电视剧免费网站有什么| 91精品欧美久久久久久动漫| 综合色天天鬼久久鬼色| 国产一区视频网站| 欧美一区二区三区爱爱| 亚洲欧美偷拍三级| 91在线无精精品入口| 中文字幕一区二区不卡| 成熟亚洲日本毛茸茸凸凹| 久久五月婷婷丁香社区| 久久爱www久久做| 337p亚洲精品色噜噜噜| 一区二区三区久久| 91日韩在线专区| 国产精品久久久久久久久免费桃花| 精品一区二区三区在线观看国产| 日本高清不卡视频| 亚洲一区二区在线视频| 色诱视频网站一区| 亚洲精品高清在线| 欧美日韩综合一区| 午夜伦理一区二区| 欧美一级在线免费| 精品午夜一区二区三区在线观看| 91精品国产乱码| 日本人妖一区二区| 久久久午夜精品| 国产精品一区二区在线观看不卡 | 99久久精品免费观看| 国产视频一区二区在线| 国产精品一区二区免费不卡| 久久蜜桃av一区二区天堂| 狠狠网亚洲精品| 久久久久久久一区| 国产精品亚洲专一区二区三区| 中文字幕巨乱亚洲| 色综合久久中文综合久久97| 一区二区三区四区乱视频| 91看片淫黄大片一级| 亚洲伊人伊色伊影伊综合网| 欧美色图免费看| 免费成人你懂的| 欧美经典三级视频一区二区三区| 成人免费高清视频| 首页综合国产亚洲丝袜| 日韩欧美的一区二区| 国产一区不卡视频| 亚洲激情自拍视频| 日韩亚洲欧美一区二区三区| 国产又黄又大久久| 一区二区三区四区视频精品免费 | 成年人国产精品| 亚洲激情在线播放| 6080yy午夜一二三区久久| 精品系列免费在线观看| 中文字幕在线免费不卡| 欧美精品粉嫩高潮一区二区| 国模一区二区三区白浆| 亚洲精品日产精品乱码不卡| 日韩丝袜美女视频| 91小视频在线免费看| 亚洲成年人影院| 国产精品久久久久久一区二区三区| 欧美在线播放高清精品| 国产福利精品一区二区| 亚洲成人在线网站| 国产精品久久久久7777按摩| 欧美美女网站色| 97久久超碰精品国产| 狠狠色丁香久久婷婷综| 亚洲综合自拍偷拍| 国产精品乱子久久久久| 日韩欧美不卡在线观看视频| 99久久精品免费观看| 国产中文字幕一区| 奇米影视一区二区三区小说| 亚洲欧美日韩一区二区三区在线观看 | 欧美人与禽zozo性伦| 国产99久久久国产精品潘金| 午夜影院久久久| 亚洲人成网站影音先锋播放| 精品免费一区二区三区| 欧美乱妇23p| 欧美日韩国产高清一区二区| youjizz国产精品| 成人禁用看黄a在线| 国产一区二区在线观看免费| 日韩成人伦理电影在线观看| 亚洲欧美日韩系列| 亚洲欧洲日韩女同| 国产精品另类一区| 久久久精品免费网站| 精品入口麻豆88视频| 在线观看av不卡| 色婷婷综合五月| 色视频成人在线观看免| 不卡电影一区二区三区| 国内精品国产成人| 国产精品一区免费在线观看| 激情六月婷婷久久| 国产高清亚洲一区| 国产精品中文有码| 国产成人8x视频一区二区| 国产成人自拍高清视频在线免费播放| 国产精品性做久久久久久| 日韩精品一级中文字幕精品视频免费观看| 亚洲成a人片综合在线| 无码av免费一区二区三区试看| 日韩国产欧美三级| 国产乱淫av一区二区三区| 国模冰冰炮一区二区| 丰满放荡岳乱妇91ww| 91麻豆免费视频| 欧美日韩精品电影| 欧美va在线播放| 国产日韩精品一区二区浪潮av| 亚洲欧美日韩电影| 亚洲地区一二三色| 国产乱对白刺激视频不卡| 国产成人亚洲综合a∨婷婷图片| 国产麻豆精品一区二区| 成人黄色免费短视频| 丁香另类激情小说| 欧美日韩情趣电影| 久久久亚洲精品石原莉奈 | 中文字幕乱码久久午夜不卡| 欧美国产欧美亚州国产日韩mv天天看完整| 亚洲素人一区二区| 日韩电影在线观看电影| 高清shemale亚洲人妖| 欧美午夜精品久久久久久孕妇| 欧美一区二区三区视频免费| 欧美国产精品中文字幕| 午夜免费欧美电影|