在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > stm32 SPI 讀取和寫入的問題

            stm32 SPI 讀取和寫入的問題

            作者: 時(shí)間:2016-11-17 來源:網(wǎng)絡(luò) 收藏
            stm32 SPI讀取和寫入和USART 一樣需要判斷標(biāo)志位
            unsigned char SPI1_ReadWrite(unsigned char writedat)
            {
            /* Loop while DR register in not emplty */
            while(SPI_I2S_GetFlagStatus(SPI1,SPI_I2S_FLAG_TXE) == RESET);
            /* Send byte through the SPI1 peripheral */
            SPI_I2S_SendData(SPI1, writedat);
            /* Wait to receive a byte */
            while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET);
            /* Return the byte read from the SPI bus */
            return SPI_I2S_ReceiveData(SPI1);
            }



            關(guān)鍵詞: stm32SPI讀取和寫

            評(píng)論


            技術(shù)專區(qū)

            關(guān)閉