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

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

?? core_cm3.h

?? STM32手持式示波器源代碼
?? H
?? 第 1 頁 / 共 4 頁
字號:
 * @return uint32_t successful / failed
 *
 * Exclusive STR command
 */
extern uint32_t __STREXW(uint32_t value, uint32_t *addr);


#elif (defined (__TASKING__)) /*------------------ TASKING Compiler ---------------------*/
/* TASKING carm specific functions */

/*
 * The CMSIS functions have been implemented as intrinsics in the compiler.
 * Please use "carm -?i" to get an up to date list of all instrinsics,
 * Including the CMSIS ones.
 */

#endif



/* ##########################   NVIC functions  #################################### */


/**
 * @brief  Set the Priority Grouping in NVIC Interrupt Controller
 *
 * @param  uint32_t priority_grouping is priority grouping field
 * @return none 
 *
 * Set the priority grouping field using the required unlock sequence.
 * The parameter priority_grouping is assigned to the field 
 * SCB->AIRCR [10:8] PRIGROUP field. Only values from 0..7 are used.
 * In case of a conflict between priority grouping and available
 * priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
 */
static __INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
{
  uint32_t reg_value;
  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);                         /* only values 0..7 are used          */
  
  reg_value  = SCB->AIRCR;                                                    /* read old register configuration    */
  reg_value &= ~((0xFFFFU << 16) | (0x0F << 8));                              /* clear bits to change               */
  reg_value  = ((reg_value | NVIC_AIRCR_VECTKEY | (PriorityGroupTmp << 8)));  /* Insert write key and priorty group */
  SCB->AIRCR = reg_value;
}

/**
 * @brief  Get the Priority Grouping from NVIC Interrupt Controller
 *
 * @param  none
 * @return uint32_t   priority grouping field 
 *
 * Get the priority grouping from NVIC Interrupt Controller.
 * priority grouping is SCB->AIRCR [10:8] PRIGROUP field.
 */
static __INLINE uint32_t NVIC_GetPriorityGrouping(void)
{
  return ((SCB->AIRCR >> 8) & 0x07);                                          /* read priority grouping field */
}

/**
 * @brief  Enable Interrupt in NVIC Interrupt Controller
 *
 * @param  IRQn_Type IRQn specifies the interrupt number
 * @return none 
 *
 * Enable a device specific interupt in the NVIC interrupt controller.
 * The interrupt number cannot be a negative value.
 */
static __INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
{
  NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* enable interrupt */
}

/**
 * @brief  Disable the interrupt line for external interrupt specified
 * 
 * @param  IRQn_Type IRQn is the positive number of the external interrupt
 * @return none
 * 
 * Disable a device specific interupt in the NVIC interrupt controller.
 * The interrupt number cannot be a negative value.
 */
static __INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
{
  NVIC->ICER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* disable interrupt */
}

/**
 * @brief  Read the interrupt pending bit for a device specific interrupt source
 * 
 * @param  IRQn_Type IRQn is the number of the device specifc interrupt
 * @return uint32_t 1 if pending interrupt else 0
 *
 * Read the pending register in NVIC and return 1 if its status is pending, 
 * otherwise it returns 0
 */
static __INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
{
  return((uint32_t) ((NVIC->ISPR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if pending else 0 */
}

/**
 * @brief  Set the pending bit for an external interrupt
 * 
 * @param  IRQn_Type IRQn is the Number of the interrupt
 * @return none
 *
 * Set the pending bit for the specified interrupt.
 * The interrupt number cannot be a negative value.
 */
static __INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
{
  NVIC->ISPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* set interrupt pending */
}

/**
 * @brief  Clear the pending bit for an external interrupt
 *
 * @param  IRQn_Type IRQn is the Number of the interrupt
 * @return none
 *
 * Clear the pending bit for the specified interrupt. 
 * The interrupt number cannot be a negative value.
 */
static __INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
{
  NVIC->ICPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* Clear pending interrupt */
}

/**
 * @brief  Read the active bit for an external interrupt
 *
 * @param  IRQn_Type  IRQn is the Number of the interrupt
 * @return uint32_t   1 if active else 0
 *
 * Read the active register in NVIC and returns 1 if its status is active, 
 * otherwise it returns 0.
 */
static __INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
{
  return((uint32_t)((NVIC->IABR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if active else 0 */
}

/**
 * @brief  Set the priority for an interrupt
 *
 * @param  IRQn_Type IRQn is the Number of the interrupt
 * @param  priority is the priority for the interrupt
 * @return none
 *
 * Set the priority for the specified interrupt. The interrupt 
 * number can be positive to specify an external (device specific) 
 * interrupt, or negative to specify an internal (core) interrupt. \n
 *
 * Note: The priority cannot be set for every core interrupt.
 */
static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
{
  if(IRQn < 0) {
    SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
  else {
    NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff);    }        /* set Priority for device specific Interrupts      */
}

/**
 * @brief  Read the priority for an interrupt
 *
 * @param  IRQn_Type IRQn is the Number of the interrupt
 * @return uint32_t  priority is the priority for the interrupt
 *
 * Read the priority for the specified interrupt. The interrupt 
 * number can be positive to specify an external (device specific) 
 * interrupt, or negative to specify an internal (core) interrupt.
 *
 * The returned priority value is automatically aligned to the implemented
 * priority bits of the microcontroller.
 *
 * Note: The priority cannot be set for every core interrupt.
 */
static __INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
{

  if(IRQn < 0) {
    return((uint32_t)(SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for Cortex-M3 system interrupts */
  else {
    return((uint32_t)(NVIC->IP[(uint32_t)(IRQn)]           >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for device specific interrupts  */
}


/**
 * @brief  Encode the priority for an interrupt
 *
 * @param  uint32_t PriorityGroup   is the used priority group
 * @param  uint32_t PreemptPriority is the preemptive priority value (starting from 0)
 * @param  uint32_t SubPriority     is the sub priority value (starting from 0)
 * @return uint32_t                    the priority for the interrupt
 *
 * Encode the priority for an interrupt with the given priority group,
 * preemptive priority value and sub priority value.
 * In case of a conflict between priority grouping and available
 * priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
 *
 * The returned priority value can be used for NVIC_SetPriority(...) function
 */
static __INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
{
  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);                         /* only values 0..7 are used          */
  uint32_t PreemptPriorityBits;
  uint32_t SubPriorityBits;

  PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
  SubPriorityBits     = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
 
  return (
           ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) |
           ((SubPriority     & ((1 << (SubPriorityBits    )) - 1)))
         );
}


/**
 * @brief  Decode the priority of an interrupt
 *
 * @param  uint32_t   Priority       the priority for the interrupt
 * @param  uint32_t   PrioGroup   is the used priority group
 * @param  uint32_t* pPreemptPrio is the preemptive priority value (starting from 0)
 * @param  uint32_t* pSubPrio     is the sub priority value (starting from 0)
 * @return none
 *
 * Decode an interrupt priority value with the given priority group to 
 * preemptive priority value and sub priority value.
 * In case of a conflict between priority grouping and available
 * priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
 *
 * The priority value can be retrieved with NVIC_GetPriority(...) function
 */
static __INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
{
  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);                         /* only values 0..7 are used          */
  uint32_t PreemptPriorityBits;
  uint32_t SubPriorityBits;

  PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
  SubPriorityBits     = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
  
  *pPreemptPriority = (Priority >> SubPriorityBits) & ((1 << (PreemptPriorityBits)) - 1);
  *pSubPriority     = (Priority                   ) & ((1 << (SubPriorityBits    )) - 1);
}



/* ##################################    SysTick function  ############################################ */

#if (!defined (__Vendor_SysTickConfig)) || (__Vendor_SysTickConfig == 0)

/* SysTick constants */
#define SYSTICK_ENABLE              0                                          /* Config-Bit to start or stop the SysTick Timer                         */
#define SYSTICK_TICKINT             1                                          /* Config-Bit to enable or disable the SysTick interrupt                 */
#define SYSTICK_CLKSOURCE           2                                          /* Clocksource has the offset 2 in SysTick Control and Status Register   */
#define SYSTICK_MAXCOUNT       ((1<<24) -1)                                    /* SysTick MaxCount                                                      */

/**
 * @brief  Initialize and start the SysTick counter and its interrupt.
 *
 * @param  uint32_t ticks is the number of ticks between two interrupts
 * @return  none
 *
 * Initialise the system tick timer and its interrupt and start the
 * system tick timer / counter in free running mode to generate 
 * periodical interrupts.
 */
static __INLINE uint32_t SysTick_Config(uint32_t ticks)
{ 
  if (ticks > SYSTICK_MAXCOUNT)  return (1);                                             /* Reload value impossible */

  SysTick->LOAD  =  (ticks & SYSTICK_MAXCOUNT) - 1;                                      /* set reload register */
  NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1);                            /* set Priority for Cortex-M0 System Interrupts */
  SysTick->VAL   =  (0x00);                                                              /* Load the SysTick Counter Value */
  SysTick->CTRL = (1 << SYSTICK_CLKSOURCE) | (1<<SYSTICK_ENABLE) | (1<<SYSTICK_TICKINT); /* Enable SysTick IRQ and SysTick Timer */
  return (0);                                                                            /* Function successful */
}

#endif





/* ##################################    Reset function  ############################################ */

/**
 * @brief  Initiate a system reset request.
 *
 * @param   none
 * @return  none
 *
 * Initialize a system reset request to reset the MCU
 */
static __INLINE void NVIC_SystemReset(void)
{
  SCB->AIRCR  = (NVIC_AIRCR_VECTKEY | (SCB->AIRCR & (0x700)) | (1<<NVIC_SYSRESETREQ)); /* Keep priority group unchanged */
  __DSB();                                                                             /* Ensure completion of memory access */              
  while(1);                                                                            /* wait until reset */
}


/* ##################################    Debug Output  function  ############################################ */


/**
 * @brief  Outputs a character via the ITM channel 0
 *
 * @param   uint32_t character to output
 * @return  uint32_t input character
 *
 * The function outputs a character via the ITM channel 0. 
 * The function returns when no debugger is connected that has booked the output.  
 * It is blocking when a debugger is connected, but the previous character send is not transmitted. 
 */
static __INLINE uint32_t ITM_SendChar (uint32_t ch)
{
  if (ch == '\n') ITM_SendChar('\r');
  
  if ((CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA)  &&
      (ITM->TCR & ITM_TCR_ITMENA)                  &&
      (ITM->TER & (1UL << 0))  ) 
  {
    while (ITM->PORT[0].u32 == 0);
    ITM->PORT[0].u8 = (uint8_t) ch;
  }  
  return (ch);
}

#ifdef __cplusplus
}
#endif

#endif /* __CM3_CORE_H__ */

/*lint -restore */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色哟哟欧美精品| 成人午夜激情在线| 国产精品狼人久久影院观看方式| 日韩一区二区三区三四区视频在线观看| 91麻豆免费观看| 色婷婷久久一区二区三区麻豆| 国产超碰在线一区| 国产成人av影院| 99免费精品在线| 99精品在线免费| 色综合久久六月婷婷中文字幕| 91麻豆免费观看| 欧美日韩视频一区二区| 欧美三级电影在线看| 欧美日韩精品二区第二页| 欧美日韩亚洲综合| 欧美日韩在线播放三区| 欧美一区二区三区婷婷月色| 这里只有精品电影| 精品少妇一区二区三区视频免付费 | 国产成人午夜精品影院观看视频| 国产精品正在播放| www.亚洲在线| 欧美日韩一区二区在线观看| 日韩三级av在线播放| 久久久国产午夜精品| 中文字幕一区视频| 丝袜亚洲另类欧美| 国产一区二区不卡| 91网站在线观看视频| 91精品视频网| 国产精品超碰97尤物18| 天天av天天翘天天综合网| 国产精品1024| 欧美日韩1234| 国产精品无人区| 日韩中文字幕麻豆| 菠萝蜜视频在线观看一区| 欧美欧美欧美欧美| 亚洲国产成人自拍| 天天影视色香欲综合网老头| 国产成人精品影院| 91精品国产综合久久久久| 欧美国产丝袜视频| 日韩影院精彩在线| 色综合天天综合色综合av| 欧美成人伊人久久综合网| 亚洲免费在线看| 国产一区二区调教| 99久久精品久久久久久清纯| 欧美日韩视频不卡| 日韩一区在线免费观看| 午夜精品福利一区二区蜜股av| 国模少妇一区二区三区| 色综合av在线| 久久综合久久综合亚洲| 亚洲激情自拍偷拍| 黄色日韩网站视频| 欧美日韩日日摸| 中文字幕一区二区三区色视频| 亚洲一区二区在线免费观看视频| 男人的天堂亚洲一区| 99麻豆久久久国产精品免费| wwww国产精品欧美| 亚洲不卡在线观看| 北条麻妃国产九九精品视频| 3atv一区二区三区| 最新中文字幕一区二区三区| 一区二区三区91| 91小视频在线| 国产女同互慰高潮91漫画| 日日夜夜免费精品| 欧美性一级生活| 亚洲欧美欧美一区二区三区| 韩国v欧美v亚洲v日本v| 欧美日本不卡视频| 亚洲精品久久久久久国产精华液| 国产主播一区二区三区| 日韩一区二区免费高清| 亚洲色图.com| 国产黄色精品网站| 久久免费精品国产久精品久久久久| 亚洲18色成人| 欧洲精品在线观看| 亚洲女厕所小便bbb| 91在线精品一区二区三区| 久久婷婷综合激情| 久久激情五月婷婷| 欧美电影在线免费观看| 亚洲第一电影网| 欧美性生活久久| 亚洲综合清纯丝袜自拍| 91亚洲永久精品| 国产欧美日韩在线看| av福利精品导航| 亚洲人成在线播放网站岛国| 99久久国产综合精品女不卡| 国产精品成人网| 色综合亚洲欧洲| 亚洲成人在线观看视频| 国产福利视频一区二区三区| 久久精品亚洲国产奇米99| 久久9热精品视频| 日韩欧美专区在线| 久色婷婷小香蕉久久| 精品av久久707| 成人性生交大合| 国产精品精品国产色婷婷| 95精品视频在线| 中文字幕高清不卡| 91老司机福利 在线| 亚洲色图一区二区三区| 国产成人精品影院| 亚洲一区二区不卡免费| 色94色欧美sute亚洲线路二| 亚洲国产成人av好男人在线观看| 欧美二区三区91| 国产高清精品在线| 亚洲精品视频一区二区| 欧美精品在线观看播放| 亚洲中国最大av网站| 久久精品视频一区| 91成人网在线| 九一九一国产精品| 国产精品私房写真福利视频| 欧美系列亚洲系列| 三级精品在线观看| 国产三级欧美三级日产三级99| 欧美日韩免费观看一区二区三区| 蜜桃精品视频在线观看| 日韩一区在线免费观看| 欧美一区二区三区不卡| 精品亚洲免费视频| 中文字幕视频一区二区三区久| 在线免费亚洲电影| 国内精品国产成人国产三级粉色| 亚洲欧洲日韩一区二区三区| 欧美日免费三级在线| 成人国产免费视频| 青青草一区二区三区| 自拍偷拍亚洲激情| 欧美精品一区男女天堂| 欧美性猛片xxxx免费看久爱| 国产黄色91视频| 国产一区二区美女| 日韩国产成人精品| 综合在线观看色| 国产亚洲成年网址在线观看| 7777精品久久久大香线蕉| 丁香婷婷综合色啪| 亚洲成人av在线电影| 亚洲国产精品一区二区久久 | 国产在线看一区| 天天综合天天综合色| 亚洲美腿欧美偷拍| 中文成人综合网| 欧美精品色一区二区三区| www.亚洲激情.com| 国产成人免费视频| 亚洲另类春色校园小说| 亚洲日本免费电影| 国产精品每日更新| 欧美激情一区二区| 久久精品欧美一区二区三区不卡| 日韩一级片在线观看| 粉嫩av一区二区三区粉嫩| 国产不卡在线一区| 岛国av在线一区| 国产成人综合亚洲91猫咪| 国产专区欧美精品| 韩国成人精品a∨在线观看| 国产麻豆欧美日韩一区| 久久99精品网久久| 另类综合日韩欧美亚洲| 麻豆国产一区二区| 久草这里只有精品视频| 狠狠狠色丁香婷婷综合激情| 国产成人免费在线观看| www.66久久| 色婷婷久久99综合精品jk白丝| 一本一道久久a久久精品| 91福利精品第一导航| 色中色一区二区| 91精品黄色片免费大全| 精品欧美乱码久久久久久| 久久综合成人精品亚洲另类欧美| 久久婷婷久久一区二区三区| 国产精品免费视频观看| 性做久久久久久久免费看| 日本不卡的三区四区五区| 一区二区三区四区蜜桃| 玉足女爽爽91| 亚洲国产精品久久一线不卡| 日本伊人色综合网| 国产毛片一区二区| 色丁香久综合在线久综合在线观看| 欧美猛男gaygay网站| 精品毛片乱码1区2区3区| 国产欧美日韩另类视频免费观看| 综合久久综合久久|