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

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

?? stm32f10x_flash.c

?? 萬(wàn)利開(kāi)發(fā)板上的lcd例程
?? 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一区二区三区免费野_久草精品视频
日韩一区二区精品葵司在线| 欧美一卡2卡3卡4卡| 日韩激情一区二区| 国产精品美女久久久久久久| 3atv一区二区三区| 99精品欧美一区二区蜜桃免费| 日本一区中文字幕| 亚洲欧美一区二区三区久本道91| 精品成人佐山爱一区二区| 在线观看日韩毛片| www.66久久| 国产一区二区免费在线| 日韩在线播放一区二区| 亚洲桃色在线一区| 国产精品天美传媒| 欧美成人精品福利| 欧美日韩国产免费| 91国偷自产一区二区三区成为亚洲经典| 激情六月婷婷久久| 免费黄网站欧美| 亚洲五码中文字幕| 亚洲三级在线播放| 国产精品色呦呦| 久久综合九色综合97_久久久| 欧美久久久久免费| 91精品1区2区| 色综合网站在线| 成人三级伦理片| 国产精品影视在线| 国产精品一色哟哟哟| 国产一区二区三区在线观看免费视频| 日韩精品电影在线| 人妖欧美一区二区| 麻豆专区一区二区三区四区五区| 五月婷婷激情综合| 五月天激情综合| 午夜影院久久久| 日本不卡视频在线观看| 日韩主播视频在线| 日本成人在线电影网| 日韩电影在线免费看| 日日夜夜精品视频天天综合网| 亚洲国产cao| 日本不卡一二三| 久久爱www久久做| 精品一二三四在线| 国产一区二区在线电影| 国产91丝袜在线观看| 成人午夜视频免费看| www.亚洲国产| 色婷婷综合中文久久一本| 在线亚洲高清视频| 欧美美女一区二区在线观看| 5566中文字幕一区二区电影| 日韩欧美中文字幕一区| 久久久久久免费| 欧美激情综合网| 亚洲视频一区二区在线| 一区二区三区欧美| 蜜桃av一区二区| 国产成人综合精品三级| 91在线小视频| 7777精品伊人久久久大香线蕉 | 欧美在线看片a免费观看| 欧美男女性生活在线直播观看| 欧美日韩国产天堂| 久久久久97国产精华液好用吗| 中文字幕在线一区二区三区| 一区二区三区日韩| 久久国产精品72免费观看| 国产一区二区美女| 日本精品一区二区三区高清 | 亚洲精品免费播放| 日产欧产美韩系列久久99| 国产米奇在线777精品观看| 成人综合在线网站| 欧美三级电影网站| 欧美大片在线观看一区| 亚洲欧美综合另类在线卡通| 视频一区二区三区在线| 国产精品一二二区| 欧美日韩五月天| 久久久亚洲国产美女国产盗摄| 中文字幕在线一区| 日韩在线一二三区| 99久久er热在这里只有精品66| 欧美日韩精品福利| 久久精品夜夜夜夜久久| 亚洲午夜免费视频| 国产东北露脸精品视频| 欧美性三三影院| 国产欧美综合在线| 强制捆绑调教一区二区| 99久久精品久久久久久清纯| 日韩一区二区三区视频| 亚洲婷婷在线视频| 国产一区二区免费视频| 在线不卡免费欧美| 一区二区在线电影| 国产精品18久久久久久久网站| 在线亚洲高清视频| 国产精品日韩精品欧美在线| 日韩高清电影一区| 在线视频一区二区三区| 亚洲国产成人午夜在线一区| 欧美aⅴ一区二区三区视频| 色综合中文字幕| 中国av一区二区三区| 激情欧美一区二区| 正在播放一区二区| 亚洲一区在线免费观看| 成人做爰69片免费看网站| 2020日本不卡一区二区视频| 天天操天天综合网| 欧美系列亚洲系列| 亚洲色图欧洲色图| 国产91高潮流白浆在线麻豆| 精品免费日韩av| 日本人妖一区二区| 欧美日韩一区二区欧美激情| 亚洲精品中文在线观看| 99精品欧美一区二区三区小说| 日本一区二区电影| 高清日韩电视剧大全免费| 26uuu精品一区二区三区四区在线| 日韩国产精品91| 欧美日本国产视频| 亚洲国产成人va在线观看天堂| 在线亚洲一区二区| 一区二区三区在线免费| 97久久久精品综合88久久| 中文字幕一区二区视频| 成人黄色电影在线 | 91精品欧美久久久久久动漫| 一区二区三区欧美亚洲| 在线一区二区三区四区五区| 亚洲一区二区三区四区在线免费观看 | 欧美成人高清电影在线| 欧美a级一区二区| 欧美mv和日韩mv国产网站| 看片网站欧美日韩| 久久午夜色播影院免费高清| 国产乱码精品一品二品| 国产三级一区二区| 成人高清在线视频| 中文字幕亚洲欧美在线不卡| 91麻豆精品视频| 一区二区欧美视频| 91精品国产美女浴室洗澡无遮挡| 日韩成人一级片| 精品国产91久久久久久久妲己| 韩国一区二区三区| 国产精品网友自拍| 色呦呦日韩精品| 亚洲国产精品一区二区www | 欧美另类高清zo欧美| 蜜臀av一区二区| 国产亚洲精品超碰| 91性感美女视频| 亚洲动漫第一页| 精品国产123| 91丨九色丨国产丨porny| 亚洲成a人在线观看| 日韩免费观看高清完整版在线观看| 国产精品1024| 亚洲高清一区二区三区| 欧美va亚洲va国产综合| 成人av网址在线| 亚洲第四色夜色| 91福利视频在线| 精品黑人一区二区三区久久| 欧美日韩国产综合一区二区三区| 石原莉奈在线亚洲三区| 久久无码av三级| 91原创在线视频| 久久超碰97人人做人人爱| 亚洲欧美偷拍另类a∨色屁股| 亚洲国产精品传媒在线观看| 欧美日韩欧美一区二区| 国产真实精品久久二三区| 亚洲欧美电影院| 日韩欧美三级在线| 97国产一区二区| 免费观看在线综合色| 亚洲天堂2016| 精品电影一区二区| 欧美日韩免费一区二区三区视频| 精品亚洲欧美一区| 亚洲一级二级三级| 国产亚洲成aⅴ人片在线观看| 欧美少妇xxx| 成人小视频免费观看| 麻豆专区一区二区三区四区五区| 亚洲视频免费在线| 久久色视频免费观看| 欧美日韩精品免费| 91影视在线播放| 国产不卡视频在线播放| 日韩黄色免费网站| 亚洲女与黑人做爰|