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

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

?? stm32f10x_spi.c

?? 基于STM32的 模擬時序
?? C
?? 第 1 頁 / 共 3 頁
字號:
  SPI_InitStruct->SPI_FirstBit = SPI_FirstBit_MSB;

  /* Initialize the SPI_CRCPolynomial member */
  SPI_InitStruct->SPI_CRCPolynomial = 7;
}

/*******************************************************************************
* Function Name  : I2S_StructInit
* Description    : Fills each I2S_InitStruct member with its default value.
* Input          : - I2S_InitStruct : pointer to a I2S_InitTypeDef structure
*                    which will be initialized.
* Output         : None
* Return         : None
*******************************************************************************/
void I2S_StructInit(I2S_InitTypeDef* I2S_InitStruct)
{
/*--------------- Reset I2S init structure parameters values -----------------*/
  /* Initialize the I2S_Mode member */
  I2S_InitStruct->I2S_Mode = I2S_Mode_SlaveTx;
  
  /* Initialize the I2S_Standard member */
  I2S_InitStruct->I2S_Standard = I2S_Standard_Phillips;
  
  /* Initialize the I2S_DataFormat member */
  I2S_InitStruct->I2S_DataFormat = I2S_DataFormat_16b;
  
  /* Initialize the I2S_MCLKOutput member */
  I2S_InitStruct->I2S_MCLKOutput = I2S_MCLKOutput_Disable;
  
  /* Initialize the I2S_AudioFreq member */
  I2S_InitStruct->I2S_AudioFreq = I2S_AudioFreq_Default;
  
  /* Initialize the I2S_CPOL member */
  I2S_InitStruct->I2S_CPOL = I2S_CPOL_Low;
}

/*******************************************************************************
* Function Name  : SPI_Cmd
* Description    : Enables or disables the specified SPI peripheral.
* Input          : - SPIx: where x can be 1, 2 or 3 to select the SPI peripheral.
*                  - NewState: new state of the SPIx peripheral. 
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected SPI peripheral */
    SPIx->CR1 |= CR1_SPE_Set;
  }
  else
  {
    /* Disable the selected SPI peripheral */
    SPIx->CR1 &= CR1_SPE_Reset;
  }
}

/*******************************************************************************
* Function Name  : I2S_Cmd
* Description    : Enables or disables the specified SPI peripheral (in I2S mode).
* Input          : - SPIx: where x can be 2 or 3 to select the SPI peripheral.
*                  - NewState: new state of the SPIx peripheral. 
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void I2S_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_SPI_23_PERIPH(SPIx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected SPI peripheral (in I2S mode) */
    SPIx->I2SCFGR |= I2SCFGR_I2SE_Set;
  }
  else
  {
    /* Disable the selected SPI peripheral (in I2S mode) */
    SPIx->I2SCFGR &= I2SCFGR_I2SE_Reset;
  }
}

/*******************************************************************************
* Function Name  : SPI_I2S_ITConfig
* Description    : Enables or disables the specified SPI/I2S interrupts.
* Input          : - SPIx: where x can be :
*                         - 1, 2 or 3 in SPI mode 
*                         - 2 or 3 in I2S mode
*                  - SPI_I2S_IT: specifies the SPI/I2S interrupt source to be 
*                    enabled or disabled. 
*                    This parameter can be one of the following values:
*                       - SPI_I2S_IT_TXE: Tx buffer empty interrupt mask
*                       - SPI_I2S_IT_RXNE: Rx buffer not empty interrupt mask
*                       - SPI_I2S_IT_ERR: Error interrupt mask
*                  - NewState: new state of the specified SPI/I2S interrupt.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_I2S_ITConfig(SPI_TypeDef* SPIx, u8 SPI_I2S_IT, FunctionalState NewState)
{
  u16 itpos = 0, itmask = 0 ;

  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  assert_param(IS_SPI_I2S_CONFIG_IT(SPI_I2S_IT));

  /* Get the SPI/I2S IT index */
  itpos = SPI_I2S_IT >> 4;
  /* Set the IT mask */
  itmask = (u16)((u16)1 << itpos);

  if (NewState != DISABLE)
  {
    /* Enable the selected SPI/I2S interrupt */
    SPIx->CR2 |= itmask;
  }
  else
  {
    /* Disable the selected SPI/I2S interrupt */
    SPIx->CR2 &= (u16)~itmask;
  }
}

/*******************************************************************************
* Function Name  : SPI_I2S_DMACmd
* Description    : Enables or disables the SPIx/I2Sx DMA interface.
* Input          : - SPIx: where x can be :
*                         - 1, 2 or 3 in SPI mode 
*                         - 2 or 3 in I2S mode
*                  - SPI_I2S_DMAReq: specifies the SPI/I2S DMA transfer request 
*                    to be enabled or disabled. 
*                    This parameter can be any combination of the following values:
*                       - SPI_I2S_DMAReq_Tx: Tx buffer DMA transfer request
*                       - SPI_I2S_DMAReq_Rx: Rx buffer DMA transfer request
*                  - NewState: new state of the selected SPI/I2S DMA transfer 
*                    request.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_I2S_DMACmd(SPI_TypeDef* SPIx, u16 SPI_I2S_DMAReq, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  assert_param(IS_SPI_I2S_DMAREQ(SPI_I2S_DMAReq));

  if (NewState != DISABLE)
  {
    /* Enable the selected SPI/I2S DMA requests */
    SPIx->CR2 |= SPI_I2S_DMAReq;
  }
  else
  {
    /* Disable the selected SPI/I2S DMA requests */
    SPIx->CR2 &= (u16)~SPI_I2S_DMAReq;
  }
}

/*******************************************************************************
* Function Name  : SPI_I2S_SendData
* Description    : Transmits a Data through the SPIx/I2Sx peripheral.
* Input          : - SPIx: where x can be :
*                         - 1, 2 or 3 in SPI mode 
*                         - 2 or 3 in I2S mode
*                  - Data : Data to be transmitted..
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_I2S_SendData(SPI_TypeDef* SPIx, u16 Data)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  
  /* Write in the DR register the data to be sent */
  SPIx->DR = Data;
}

/*******************************************************************************
* Function Name  : SPI_I2S_ReceiveData
* Description    : Returns the most recent received data by the SPIx/I2Sx peripheral. 
* Input          : - SPIx: where x can be :
*                         - 1, 2 or 3 in SPI mode 
*                         - 2 or 3 in I2S mode
* Output         : None
* Return         : The value of the received data.
*******************************************************************************/
u16 SPI_I2S_ReceiveData(SPI_TypeDef* SPIx)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  
  /* Return the data in the DR register */
  return SPIx->DR;
}

/*******************************************************************************
* Function Name  : SPI_NSSInternalSoftwareConfig
* Description    : Configures internally by software the NSS pin for the selected 
*                  SPI.
* Input          : - SPIx: where x can be 1, 2 or 3 to select the SPI peripheral.
*                  - SPI_NSSInternalSoft: specifies the SPI NSS internal state.
*                    This parameter can be one of the following values:
*                       - SPI_NSSInternalSoft_Set: Set NSS pin internally
*                       - SPI_NSSInternalSoft_Reset: Reset NSS pin internally
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_NSSInternalSoftwareConfig(SPI_TypeDef* SPIx, u16 SPI_NSSInternalSoft)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_SPI_NSS_INTERNAL(SPI_NSSInternalSoft));

  if (SPI_NSSInternalSoft != SPI_NSSInternalSoft_Reset)
  {
    /* Set NSS pin internally by software */
    SPIx->CR1 |= SPI_NSSInternalSoft_Set;
  }
  else
  {
    /* Reset NSS pin internally by software */
    SPIx->CR1 &= SPI_NSSInternalSoft_Reset;
  }
}

/*******************************************************************************
* Function Name  : SPI_SSOutputCmd
* Description    : Enables or disables the SS output for the selected SPI.
* Input          : - SPIx: where x can be 1, 2 or 3 to select the SPI peripheral.
*                  - NewState: new state of the SPIx SS output. 
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_SSOutputCmd(SPI_TypeDef* SPIx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected SPI SS output */
    SPIx->CR2 |= CR2_SSOE_Set;
  }
  else
  {
    /* Disable the selected SPI SS output */
    SPIx->CR2 &= CR2_SSOE_Reset;
  }
}

/*******************************************************************************
* Function Name  : SPI_DataSizeConfig
* Description    : Configures the data size for the selected SPI.
* Input          : - SPIx: where x can be 1, 2 or 3 to select the SPI peripheral.
*                  - SPI_DataSize: specifies the SPI data size.
*                    This parameter can be one of the following values:
*                       - SPI_DataSize_16b: Set data frame format to 16bit
*                       - SPI_DataSize_8b: Set data frame format to 8bit
* Output         : None
* Return         : None
*******************************************************************************/
void SPI_DataSizeConfig(SPI_TypeDef* SPIx, u16 SPI_DataSize)
{
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_SPI_DATASIZE(SPI_DataSize));

  /* Clear DFF bit */
  SPIx->CR1 &= (u16)~SPI_DataSize_16b;
  /* Set new DFF bit value */
  SPIx->CR1 |= SPI_DataSize;
}

/*******************************************************************************
* Function Name  : SPI_TransmitCRC

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人精品小蝌蚪| 免费高清视频精品| 欧美日本国产视频| 理论电影国产精品| 日韩一区二区视频在线观看| 国产在线精品一区二区三区不卡| 欧美激情一区二区三区四区| 欧美色窝79yyyycom| 国产成人高清在线| 亚洲第一搞黄网站| 国产欧美精品在线观看| 欧美三级乱人伦电影| 五月综合激情日本mⅴ| 亚洲视频一区二区在线| 日韩欧美二区三区| 91精品91久久久中77777| 国产在线国偷精品免费看| 亚洲在线免费播放| 欧美经典一区二区三区| 欧美日韩1234| 91在线观看污| 高清国产午夜精品久久久久久| 午夜视频在线观看一区二区三区| 久久你懂得1024| 欧美美女直播网站| 91免费视频观看| 丁香婷婷综合色啪| 久久国产婷婷国产香蕉| 亚洲一区二区成人在线观看| 欧美激情综合五月色丁香小说| 日韩一区二区三区精品视频| 在线观看不卡视频| 色国产综合视频| 成人免费毛片片v| 国产综合久久久久久久久久久久| 亚洲高清免费一级二级三级| 玉米视频成人免费看| 国产精品电影一区二区| 国产亚洲制服色| 欧美成人国产一区二区| 日韩精品一区二区三区老鸭窝| 欧美午夜精品理论片a级按摩| 92精品国产成人观看免费| 国产一区欧美二区| 五月婷婷久久综合| 日韩高清不卡一区二区| 亚洲一区视频在线| 一区二区久久久久| 日本一区二区三区久久久久久久久不| 久久久综合激的五月天| 91精品国产入口在线| 9191成人精品久久| 欧美精品aⅴ在线视频| 欧美男同性恋视频网站| 91精品综合久久久久久| 欧美日韩一级片在线观看| 91精品国产一区二区三区| 91麻豆精品国产综合久久久久久| 欧美日韩国产高清一区二区| 欧美三级乱人伦电影| 欧美性大战久久| 欧美日韩精品是欧美日韩精品| 欧美日韩小视频| 欧美美女一区二区| 在线亚洲免费视频| 日韩欧美国产午夜精品| 精品欧美一区二区在线观看| 精品卡一卡二卡三卡四在线| 26uuu成人网一区二区三区| 国产欧美日韩在线观看| 一区视频在线播放| 亚洲一区二区三区中文字幕在线 | 91精品国产免费久久综合| 欧美精品在线一区二区| 欧美精品久久99| 日韩免费一区二区| 久久亚洲一级片| 欧美国产国产综合| 欧美国产日本韩| 丝袜亚洲精品中文字幕一区| 美国精品在线观看| 国产成人综合在线观看| www.亚洲免费av| 欧美视频日韩视频在线观看| 日韩午夜在线播放| 国产亲近乱来精品视频| 一个色综合网站| 亚洲图片欧美一区| 久热成人在线视频| 精品在线播放免费| 一本一道波多野结衣一区二区| 欧美日韩在线观看一区二区| 久久影院视频免费| 亚洲精品成人精品456| 亚洲愉拍自拍另类高清精品| 国产伦精品一区二区三区免费 | 久久久久久久久免费| 亚洲日本va午夜在线影院| 亚洲网友自拍偷拍| 国产91清纯白嫩初高中在线观看 | 蜜臀av一级做a爰片久久| 成人avav影音| 1区2区3区国产精品| 亚洲猫色日本管| 伦理电影国产精品| 91麻豆免费在线观看| 欧美变态凌虐bdsm| 亚洲一区二区三区四区五区黄| 激情综合网最新| 91久久免费观看| 中文字幕欧美激情| 久久疯狂做爰流白浆xx| 欧美色电影在线| 国产精品久久久久aaaa| 狠狠久久亚洲欧美| 91精品国产综合久久精品图片| 一区二区在线观看视频| 成人精品国产一区二区4080| 2022国产精品视频| 美脚の诱脚舐め脚责91| 欧美乱妇一区二区三区不卡视频 | 国产成人高清视频| 91麻豆精品国产自产在线| 一区二区三区中文字幕| 不卡影院免费观看| 国产亚洲女人久久久久毛片| 精品在线观看免费| 精品伦理精品一区| 精品一区二区三区不卡| 欧美电影免费观看高清完整版在线| 午夜成人免费电影| 欧美日韩国产综合一区二区| 亚洲一区免费在线观看| 色哟哟精品一区| 亚洲区小说区图片区qvod| 99riav一区二区三区| 国产精品久久久久aaaa| 不卡视频在线观看| 最新热久久免费视频| 色先锋资源久久综合| 亚洲精品国产精华液| 欧洲生活片亚洲生活在线观看| 亚洲精品欧美激情| 欧美性三三影院| 日本三级韩国三级欧美三级| 欧美一区二区三区视频| 日本午夜精品一区二区三区电影 | 久久精品72免费观看| 欧美精品一区二区三区在线播放 | 2022国产精品视频| 国产成人精品免费网站| 中文字幕一区二区三| 日本丶国产丶欧美色综合| 亚洲午夜久久久久久久久电影院 | 毛片一区二区三区| 久久久久久久久岛国免费| 东方aⅴ免费观看久久av| 中文字幕精品—区二区四季| 91麻豆免费视频| 日韩精品一二三区| 欧美精品一区二区高清在线观看| 国产91对白在线观看九色| 一区视频在线播放| 欧美日本韩国一区二区三区视频| 美脚の诱脚舐め脚责91| 国产精品久久久久aaaa樱花| 欧美日韩亚洲综合| 国产麻豆精品95视频| 亚洲猫色日本管| 日韩精品一区国产麻豆| 盗摄精品av一区二区三区| 一二三四社区欧美黄| 日韩欧美一级二级| 高清不卡在线观看| 三级一区在线视频先锋| 久久久99精品免费观看| 一本到三区不卡视频| 理论电影国产精品| 亚洲欧美另类久久久精品2019| 91精品国产手机| www.亚洲在线| 久99久精品视频免费观看| 亚洲人精品一区| 欧美xxxxxxxx| 在线观看精品一区| 国产91精品精华液一区二区三区 | 成人性生交大片免费看在线播放| 亚洲国产成人av好男人在线观看| 久久午夜羞羞影院免费观看| 欧美日韩中文另类| 国产精品综合一区二区| 亚洲国产综合91精品麻豆| 国产日韩欧美高清| 欧美肥大bbwbbw高潮| 成人高清伦理免费影院在线观看| 美女看a上一区| 亚洲国产精品影院| 中文字幕一区日韩精品欧美| 欧美mv日韩mv亚洲| 欧美日韩一区二区电影|