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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? stm32f10x_flash.c

?? 51單片機(jī)的內(nèi)存優(yōu)化和中斷的有用知識(shí)
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
* Description    : Programs a 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_ProgramWord(u32 Address, u32 Data)
{
  FLASH_Status status = FLASH_COMPLETE;

  /* Check the parameters */
  assert(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(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(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(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
* 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(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:
*                     - OB_STDBY_NoRST: No reset generated when entering in STANDBY

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品精品一区| 亚洲日本护士毛茸茸| 中文字幕一区二区在线观看| 亚洲成av人片一区二区梦乃| 国产一区二区调教| 欧美日韩精品久久久| 国产精品三级久久久久三级| 日韩av一二三| 91黄色激情网站| 国产精品久久久久久久久动漫| 奇米色一区二区| 在线观看视频一区| 亚洲图片另类小说| 成人短视频下载| 久久久久97国产精华液好用吗| 日韩av一区二区在线影视| 在线免费观看一区| 亚洲美女区一区| heyzo一本久久综合| 国产日韩影视精品| 国产一区二区三区观看| 日韩欧美久久久| 美日韩一区二区三区| 69久久夜色精品国产69蝌蚪网| 亚洲男同性恋视频| 91极品视觉盛宴| 亚洲国产成人av网| 欧美性高清videossexo| 一区二区三区四区亚洲| 99在线精品一区二区三区| 国产精品乱人伦| 床上的激情91.| 国产精品福利一区| 99久久免费精品| 亚洲欧美精品午睡沙发| 日本道精品一区二区三区| 亚洲日本韩国一区| 欧美日韩综合在线| 偷拍日韩校园综合在线| 制服视频三区第一页精品| 日韩av一区二区在线影视| 欧美zozozo| 国产成人精品影视| 成人免费一区二区三区在线观看 | 久久女同互慰一区二区三区| 丝袜国产日韩另类美女| 日韩一区二区电影| 韩日精品视频一区| 中文字幕在线不卡一区| 91网站在线播放| 丝袜美腿一区二区三区| 精品国产第一区二区三区观看体验 | 麻豆久久久久久| 久久综合国产精品| 波多野结衣中文字幕一区二区三区| 国产精品美日韩| 欧美在线视频日韩| 青青青伊人色综合久久| 久久久久亚洲蜜桃| 色哟哟欧美精品| 免费观看一级特黄欧美大片| 国产日韩精品一区二区三区| 日本精品视频一区二区三区| 全国精品久久少妇| 中文字幕免费观看一区| 欧美日韩精品欧美日韩精品一 | 国产欧美日韩在线视频| 色拍拍在线精品视频8848| 日本不卡的三区四区五区| 国产三级精品三级在线专区| 欧美在线看片a免费观看| 久久99久久久久久久久久久| 中文字幕在线一区免费| 宅男在线国产精品| 99re成人精品视频| 国内精品久久久久影院一蜜桃| 亚洲日本va午夜在线电影| 日韩精品影音先锋| 在线视频中文字幕一区二区| 国产精品一区二区免费不卡| 一区二区三区免费网站| 欧美精品一区二区三区一线天视频 | 4hu四虎永久在线影院成人| 国产成人一区二区精品非洲| 天堂在线一区二区| 国产精品久久看| 日韩亚洲欧美在线| 成人av片在线观看| 极品销魂美女一区二区三区| 亚洲国产欧美在线| 亚洲人成影院在线观看| 国产性天天综合网| 日韩欧美国产麻豆| 欧美日韩免费一区二区三区视频| 成人在线视频一区二区| 国模冰冰炮一区二区| 麻豆freexxxx性91精品| 天堂久久久久va久久久久| 一区二区三区欧美日韩| 国产精品久久久久桃色tv| 久久综合色综合88| 欧美人与z0zoxxxx视频| 在线免费观看日韩欧美| 色婷婷av久久久久久久| 99久久99精品久久久久久 | 激情综合五月婷婷| 日本免费新一区视频| 亚洲第一成人在线| 亚洲最新视频在线观看| 一区二区三区四区激情| 亚洲女女做受ⅹxx高潮| 亚洲黄色片在线观看| 一区二区三区国产精品| 一区二区高清免费观看影视大全| 国产精品久久三| 亚洲欧洲日韩女同| 亚洲欧美日韩中文播放 | 久久成人精品无人区| 免费观看30秒视频久久| 美脚の诱脚舐め脚责91 | 亚洲综合色自拍一区| 一区二区三区在线免费| 依依成人精品视频| 亚洲v日本v欧美v久久精品| 性做久久久久久免费观看| 午夜激情久久久| 丝袜亚洲精品中文字幕一区| 日韩精品亚洲专区| 精品无人码麻豆乱码1区2区 | 欧美日韩aaa| 日韩欧美高清在线| 久久久久久久免费视频了| 国产亲近乱来精品视频| 亚洲欧洲国产日本综合| 亚洲自拍欧美精品| 蜜桃av一区二区| 国产91在线观看丝袜| 91蜜桃网址入口| 欧美日韩国产一级二级| 26uuu欧美日本| 一区在线观看视频| 亚洲国产日产av| 国产一二精品视频| 99re热这里只有精品视频| 欧美日韩精品欧美日韩精品| 2014亚洲片线观看视频免费| 中文字幕一区二区三区乱码在线 | 日韩毛片视频在线看| 亚洲一区影音先锋| 黄页视频在线91| 色综合天天综合狠狠| 3d动漫精品啪啪一区二区竹菊| 久久亚区不卡日本| 亚洲精品免费视频| 久久se精品一区二区| 91在线视频播放地址| 日韩欧美一区二区久久婷婷| 国产精品私人影院| 午夜成人免费视频| 国产美女精品在线| 欧美日韩久久久一区| 中文字幕国产一区| 免费观看一级特黄欧美大片| 99这里都是精品| 久久久久久久精| 婷婷激情综合网| 成人av小说网| 26uuu亚洲综合色欧美| 亚洲国产一区在线观看| 成人伦理片在线| 欧美va亚洲va| 婷婷开心久久网| 欧美亚洲另类激情小说| 国产精品久久免费看| 韩国av一区二区三区在线观看| 欧美老肥妇做.爰bbww视频| 中文字幕在线观看不卡| 国产剧情在线观看一区二区| 91精品国产一区二区人妖| 一区二区三区四区在线免费观看| 成人免费看片app下载| 精品电影一区二区| 蜜臀精品一区二区三区在线观看 | 波多野结衣精品在线| 久久久久久久久久电影| 麻豆视频一区二区| 欧美一区二区三区的| 亚洲综合在线视频| 91蝌蚪porny九色| 亚洲日韩欧美一区二区在线| www.亚洲激情.com| 中文字幕一区二区日韩精品绯色| 国产白丝精品91爽爽久久| 精品伦理精品一区| 精品午夜久久福利影院 | 国产宾馆实践打屁股91| 久久先锋资源网| 国产在线精品免费| 精品国产乱码久久| 国产精品系列在线观看|