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

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

?? stm32f10x_flash.c

?? STM32_TIM1_Example
?? C
?? 第 1 頁 / 共 3 頁
字號:
*                  - Data: specifies the data to be programmed.
* Output         : None
* Return         : FLASH Status: The returned value can be: FLASH_BUSY, 
*                  FLASH_ERROR_PG or FLASH_ERROR_WRP or FLASH_COMPLETE or 
*                  FLASH_TIMEOUT. 
*******************************************************************************/
FLASH_Status FLASH_ProgramWord(u32 Address, u32 Data)
{
  FLASH_Status status = FLASH_COMPLETE;

  /* Check the parameters */
  assert_param(IS_FLASH_ADDRESS(Address));

  /* Wait for last operation to be completed */
  status = FLASH_WaitForLastOperation(ProgramTimeout);
  
  if(status == FLASH_COMPLETE)
  {
    /* if the previous operation is completed, proceed to program the new first 
    half word */
    FLASH->CR |= CR_PG_Set;
  
    *(vu16*)Address = (u16)Data;

    /* Wait for last operation to be completed */
    status = FLASH_WaitForLastOperation(ProgramTimeout);
 
    if(status == FLASH_COMPLETE)
    {
      /* if the previous operation is completed, proceed to program the new second 
      half word */
      *(vu16*)(Address + 2) = Data >> 16;
    
      /* Wait for last operation to be completed */
      status = FLASH_WaitForLastOperation(ProgramTimeout);
        
      if(status != FLASH_BUSY)
      {
        /* Disable the PG Bit */
        FLASH->CR &= CR_PG_Reset;
      }
    }
    else
    {
      if (status != FLASH_BUSY)
      {
        /* Disable the PG Bit */
        FLASH->CR &= CR_PG_Reset;
      }
     }
  }
  /* Return the Program Status */
  return status;
}

/*******************************************************************************
* Function Name  : FLASH_ProgramHalfWord
* Description    : Programs a half word at a specified address.
* Input          : - Address: specifies the address to be programmed.
*                  - Data: specifies the data to be programmed.
* Output         : None
* Return         : FLASH Status: The returned value can be: FLASH_BUSY, 
*                  FLASH_ERROR_PG or FLASH_ERROR_WRP or FLASH_COMPLETE or 
*                  FLASH_TIMEOUT. 
*******************************************************************************/
FLASH_Status FLASH_ProgramHalfWord(u32 Address, u16 Data)
{
  FLASH_Status status = FLASH_COMPLETE;

  /* Check the parameters */
  assert_param(IS_FLASH_ADDRESS(Address));

  /* Wait for last operation to be completed */
  status = FLASH_WaitForLastOperation(ProgramTimeout);
  
  if(status == FLASH_COMPLETE)
  {
    /* if the previous operation is completed, proceed to program the new data */
    FLASH->CR |= CR_PG_Set;
  
    *(vu16*)Address = Data;
    /* Wait for last operation to be completed */
    status = FLASH_WaitForLastOperation(ProgramTimeout);

    if(status != FLASH_BUSY)
    {
      /* if the program operation is completed, disable the PG Bit */
      FLASH->CR &= CR_PG_Reset;
    }
  } 
  /* Return the Program Status */
  return status;
}

/*******************************************************************************
* Function Name  : FLASH_ProgramOptionByteData
* Description    : Programs a half word at a specified Option Byte Data address.
* Input          : - Address: specifies the address to be programmed.
*                    This parameter can be 0x1FFFF804 or 0x1FFFF806. 
*                  - Data: specifies the data to be programmed.
* Output         : None
* Return         : FLASH Status: The returned value can be: FLASH_BUSY, 
*                  FLASH_ERROR_PG or FLASH_ERROR_WRP or FLASH_COMPLETE or 
*                  FLASH_TIMEOUT. 
*******************************************************************************/
FLASH_Status FLASH_ProgramOptionByteData(u32 Address, u8 Data)
{
  FLASH_Status status = FLASH_COMPLETE;

  /* Check the parameters */
  assert_param(IS_OB_DATA_ADDRESS(Address));

  status = FLASH_WaitForLastOperation(ProgramTimeout);

  if(status == FLASH_COMPLETE)
  {
    /* Authorize the small information block programming */
    FLASH->OPTKEYR = FLASH_KEY1;
    FLASH->OPTKEYR = FLASH_KEY2;

    /* Enables the Option Bytes Programming operation */
    FLASH->CR |= CR_OPTPG_Set; 
    *(vu16*)Address = Data;
    
    /* Wait for last operation to be completed */
    status = FLASH_WaitForLastOperation(ProgramTimeout);

    if(status != FLASH_BUSY)
    {
      /* if the program operation is completed, disable the OPTPG Bit */
      FLASH->CR &= CR_OPTPG_Reset;
    }
  }    
  /* Return the Option Byte Data Program Status */
  return status;      
}

/*******************************************************************************
* Function Name  : FLASH_EnableWriteProtection
* Description    : Write protects the desired pages
* Input          : - FLASH_Pages: specifies the address of the pages to be 
*                    write protected. This parameter can be:
*                    - A value between FLASH_WRProt_Pages0to3 and 
*                      FLASH_WRProt_Pages124to127 
*                    - FLASH_WRProt_AllPages
* Output         : None
* Return         : FLASH Status: The returned value can be: FLASH_BUSY, 
*                  FLASH_ERROR_PG or FLASH_ERROR_WRP or FLASH_COMPLETE or 
*                  FLASH_TIMEOUT.
*******************************************************************************/
FLASH_Status FLASH_EnableWriteProtection(u32 FLASH_Pages)
{
  u16 WRP0_Data = 0xFFFF, WRP1_Data = 0xFFFF, WRP2_Data = 0xFFFF, WRP3_Data = 0xFFFF;
  
  FLASH_Status status = FLASH_COMPLETE;
  
  /* Check the parameters */
  assert_param(IS_FLASH_WRPROT_PAGE(FLASH_Pages));
  
  FLASH_Pages = (u32)(~FLASH_Pages);
  WRP0_Data = (vu16)(FLASH_Pages & WRP0_Mask);
  WRP1_Data = (vu16)((FLASH_Pages & WRP1_Mask) >> 8);
  WRP2_Data = (vu16)((FLASH_Pages & WRP2_Mask) >> 16);
  WRP3_Data = (vu16)((FLASH_Pages & WRP3_Mask) >> 24);
  
  /* Wait for last operation to be completed */
  status = FLASH_WaitForLastOperation(ProgramTimeout);
  
  if(status == FLASH_COMPLETE)
  {
    /* Authorizes the small information block programming */
    FLASH->OPTKEYR = FLASH_KEY1;
    FLASH->OPTKEYR = FLASH_KEY2;
    FLASH->CR |= CR_OPTPG_Set;

    if(WRP0_Data != 0xFF)
    {
      OB->WRP0 = WRP0_Data;
      
      /* Wait for last operation to be completed */
      status = FLASH_WaitForLastOperation(ProgramTimeout);
    }
    if((status == FLASH_COMPLETE) && (WRP1_Data != 0xFF))
    {
      OB->WRP1 = WRP1_Data;
      
      /* Wait for last operation to be completed */
      status = FLASH_WaitForLastOperation(ProgramTimeout);
    }

    if((status == FLASH_COMPLETE) && (WRP2_Data != 0xFF))
    {
      OB->WRP2 = WRP2_Data;
      
      /* Wait for last operation to be completed */
      status = FLASH_WaitForLastOperation(ProgramTimeout);
    }
    
    if((status == FLASH_COMPLETE)&& (WRP3_Data != 0xFF))
    {
      OB->WRP3 = WRP3_Data;
     
      /* Wait for last operation to be completed */
      status = FLASH_WaitForLastOperation(ProgramTimeout);
    }
          
    if(status != FLASH_BUSY)
    {
      /* if the program operation is completed, disable the OPTPG Bit */
      FLASH->CR &= CR_OPTPG_Reset;
    }
  } 
  /* Return the write protection operation Status */
  return status;       
}

/*******************************************************************************
* Function Name  : FLASH_ReadOutProtection
* Description    : Enables or disables the read out protection.
*                  If the user has already programmed the other option bytes before 
*                  calling this function, he must re-program them since this 
*                  function erases all option bytes.
* Input          : - Newstate: new state of the ReadOut Protection.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : FLASH Status: The returned value can be: FLASH_BUSY, 
*                  FLASH_ERROR_PG or FLASH_ERROR_WRP or FLASH_COMPLETE or 
*                  FLASH_TIMEOUT.
*******************************************************************************/
FLASH_Status FLASH_ReadOutProtection(FunctionalState NewState)
{
  FLASH_Status status = FLASH_COMPLETE;

  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  status = FLASH_WaitForLastOperation(EraseTimeout);

  if(status == FLASH_COMPLETE)
  {
    /* Authorizes the small information block programming */
    FLASH->OPTKEYR = FLASH_KEY1;
    FLASH->OPTKEYR = FLASH_KEY2;

    FLASH->CR |= CR_OPTER_Set;
    FLASH->CR |= CR_STRT_Set;

    /* Wait for last operation to be completed */
    status = FLASH_WaitForLastOperation(EraseTimeout);

    if(status == FLASH_COMPLETE)
    {
      /* if the erase operation is completed, disable the OPTER Bit */
      FLASH->CR &= CR_OPTER_Reset;

      /* Enable the Option Bytes Programming operation */
      FLASH->CR |= CR_OPTPG_Set; 

      if(NewState != DISABLE)
      {
        OB->RDP = 0x00;
      }
      else
      {
        OB->RDP = RDP_Key;  
      }

      /* Wait for last operation to be completed */
      status = FLASH_WaitForLastOperation(EraseTimeout); 
    
      if(status != FLASH_BUSY)
      {
        /* if the program operation is completed, disable the OPTPG Bit */
        FLASH->CR &= CR_OPTPG_Reset;
      }
    }
    else 
    {
      if(status != FLASH_BUSY)
      {
        /* Disable the OPTER Bit */
        FLASH->CR &= CR_OPTER_Reset;
      }
    }
  }
  /* Return the protection operation Status */
  return status;      
}
  	
/*******************************************************************************
* Function Name  : FLASH_UserOptionByteConfig
* Description    : Programs the FLASH User Option Byte: IWDG_SW / RST_STOP /
*                  RST_STDBY.
* Input          : - OB_IWDG: Selects the IWDG mode
*                     This parameter can be one of the following values:
*                     - OB_IWDG_SW: Software IWDG selected
*                     - OB_IWDG_HW: Hardware IWDG selected
*                  - OB_STOP: Reset event when entering STOP mode.
*                     This parameter can be one of the following values:
*                     - OB_STOP_NoRST: No reset generated when entering in STOP
*                     - OB_STOP_RST: Reset generated when entering in STOP
*                  - OB_STDBY: Reset event when entering Standby mode.
*                    This parameter can be one of the following values:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国精品在线观看| 波多野结衣在线aⅴ中文字幕不卡| 日本亚洲三级在线| 国产一区二区美女| 成人sese在线| 欧美一区二区视频在线观看| 国产亚洲福利社区一区| 亚洲婷婷国产精品电影人久久| 亚洲图片自拍偷拍| 狠狠狠色丁香婷婷综合激情| 91精品在线观看入口| 国产拍欧美日韩视频二区| 亚洲同性同志一二三专区| 香蕉久久一区二区不卡无毒影院 | 加勒比av一区二区| 不卡的av在线| 日韩三级视频在线看| 综合网在线视频| 久久精品国产秦先生| 99国产精品一区| 91精品国产一区二区三区香蕉| 中文字幕成人在线观看| 免费三级欧美电影| 色婷婷av一区二区| 中文字幕va一区二区三区| 天天色 色综合| 色婷婷综合久久久久中文| 久久亚洲私人国产精品va媚药| 亚洲国产中文字幕| 白白色 亚洲乱淫| 久久一区二区三区四区| 亚洲国产一区视频| 一本大道av伊人久久综合| 国产欧美精品在线观看| 老司机精品视频导航| 欧美日韩一区二区在线观看视频 | 亚洲欧美日韩国产手机在线| 久久激情五月激情| 91麻豆精品国产综合久久久久久| 亚洲美女免费在线| 99久久久精品| 亚洲图片你懂的| 成人国产精品免费观看动漫| 51精品国自产在线| 日韩精品一二三四| 欧美性大战久久| 亚洲精品菠萝久久久久久久| 色欧美乱欧美15图片| 亚洲日本在线视频观看| 国产乱国产乱300精品| 337p粉嫩大胆噜噜噜噜噜91av| 麻豆91在线播放免费| 91精品国产91综合久久蜜臀| 全国精品久久少妇| 欧美一级免费大片| 精品一区二区三区在线视频| 精品99久久久久久| 国产成人在线观看| 精品国产精品一区二区夜夜嗨| 亚洲va韩国va欧美va精品 | 日本一区二区视频在线观看| 国产一区二区三区在线看麻豆| 日韩一级黄色大片| 日本欧美久久久久免费播放网| 91精品国产综合久久婷婷香蕉 | 亚洲综合久久av| 欧美日本国产视频| 麻豆精品蜜桃视频网站| 正在播放亚洲一区| 国产一区91精品张津瑜| 中文字幕av一区二区三区| 91丨九色丨黑人外教| 亚洲国产欧美在线| 欧美岛国在线观看| 成人免费视频视频在线观看免费| 亚洲欧美视频一区| 欧美探花视频资源| 日韩精品亚洲专区| 久久久久成人黄色影片| 色综合天天在线| 日日骚欧美日韩| 国产日本一区二区| 欧美视频在线不卡| 国产精品综合在线视频| 成人欧美一区二区三区1314| 欧美日韩国产成人在线91| 国产综合色视频| 亚洲女人的天堂| 欧美xxxx老人做受| 色综合久久久久综合体桃花网| 日韩电影一二三区| 亚洲人xxxx| 日韩小视频在线观看专区| 国产精品18久久久久久久久久久久| 中文字幕日韩av资源站| 欧美精品在欧美一区二区少妇| 精品一区二区三区免费观看 | 麻豆久久一区二区| 国产精品国产三级国产专播品爱网| 91在线无精精品入口| 视频一区二区国产| 亚洲图片激情小说| 精品国产1区二区| 911精品国产一区二区在线| 成人动漫中文字幕| 久久成人免费网站| 1024亚洲合集| 久久老女人爱爱| 日韩免费电影一区| 欧美性欧美巨大黑白大战| 成人综合婷婷国产精品久久| 日韩二区在线观看| 亚洲一区二区五区| 久久久久国产精品麻豆ai换脸 | 国产精品传媒入口麻豆| 欧美视频日韩视频| 99国产精品久久久久久久久久久| 激情小说亚洲一区| 自拍av一区二区三区| 久久久影院官网| 久久亚洲二区三区| 欧美不卡一区二区三区四区| 亚洲国产精品成人综合色在线婷婷 | 免费成人结看片| 性久久久久久久久久久久| 国产精品免费视频一区| 欧美国产精品一区二区三区| 717成人午夜免费福利电影| 国产精品自拍一区| 国产美女在线观看一区| 男女男精品网站| 免费在线看成人av| 免费国产亚洲视频| 免费观看成人av| 亚洲国产精品久久一线不卡| 久久综合av免费| 色婷婷综合久久久| 欧美精品自拍偷拍| 欧美成人一区二区三区在线观看| 久久久精品免费网站| 国产精品久久久久婷婷二区次| 亚洲男同性恋视频| 日本 国产 欧美色综合| 国产精品一级在线| 91美女蜜桃在线| 日韩一区二区三区在线视频| 国产日韩精品久久久| 亚洲最色的网站| 精品一区二区av| 97久久精品人人做人人爽50路| 911精品国产一区二区在线| 国产亚洲美州欧州综合国 | 精品视频资源站| 精品福利一二区| 亚洲综合在线第一页| 美女网站色91| aaa欧美大片| 精品成人佐山爱一区二区| 亚洲欧美另类小说视频| 青青草91视频| 色婷婷av一区| 欧美经典三级视频一区二区三区| 一区二区三区四区不卡在线| 国产乱国产乱300精品| 欧美日韩国产一级二级| 国产精品免费久久| 麻豆国产精品视频| 欧美性大战久久久久久久蜜臀| 中文字幕第一区| 蜜臀av一区二区在线观看| 色综合天天综合色综合av| 日韩美一区二区三区| 亚洲福利视频导航| 成人少妇影院yyyy| 久久亚洲二区三区| 日韩福利电影在线观看| 色综合久久久久久久久久久| 久久久久国产免费免费| 美国一区二区三区在线播放| 欧美自拍偷拍一区| 国产精品毛片无遮挡高清| 精品在线你懂的| 日韩三级在线免费观看| 午夜精品福利久久久| 色猫猫国产区一区二在线视频| 国产欧美日韩一区二区三区在线观看 | 国产三级欧美三级日产三级99| 亚洲成人免费在线观看| 91同城在线观看| 国产精品网站一区| 国产99久久久国产精品潘金| 久久综合九色综合欧美98 | 91最新地址在线播放| 欧美国产视频在线| 国产成人亚洲精品青草天美| 国产丝袜在线精品| 国产成人免费网站| 国产欧美视频一区二区三区| 东方欧美亚洲色图在线| 国产精品天美传媒|