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

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

?? i2c.c

?? Stellaris公司推出1美元ARM,這是Stellaris驅(qū)動庫源程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
    // Return either the interrupt status or the raw interrupt status as
    // requested.
    //
    if(bMasked)
    {
        return((HWREG(ulBase + I2C_MASTER_O_MIS)) ? true : false);
    }
    else
    {
        return((HWREG(ulBase + I2C_MASTER_O_RIS)) ? true : false);
    }
}
#endif

//*****************************************************************************
//
//! Gets the current I2C Slave interrupt status.
//!
//! \param ulBase base address of the I2C Slave module
//! \param bMasked is false if the raw interrupt status is requested and
//! true if the masked interrupt status is requested.
//!
//! This returns the interrupt status for the I2C Slave module.
//! Either the raw interrupt status or the status of interrupts that are
//! allowed to reflect to the processor can be returned.
//!
//! \return The current interrupt status, returned as \b true if active
//! or \b false if not active.
//
//*****************************************************************************
#if defined(GROUP_slaveintstatus) || defined(BUILD_ALL) || defined(DOXYGEN)
tBoolean
I2CSlaveIntStatus(unsigned long ulBase, tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_SLAVE_BASE);

    //
    // Return either the interrupt status or the raw interrupt status as
    // requested.
    //
    if(bMasked)
    {
        return((HWREG(ulBase + I2C_SLAVE_O_MIS)) ? true : false);
    }
    else
    {
        return((HWREG(ulBase + I2C_SLAVE_O_RIS)) ? true : false);
    }
}
#endif

//*****************************************************************************
//
//! Clears I2C Master interrupt sources.
//!
//! \param ulBase base address of the I2C Master module
//!
//! The I2C Master interrupt source is cleared, so that it no longer asserts.
//! This must be done in the interrupt handler to keep it from being called
//! again immediately upon exit.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_masterintclear) || defined(BUILD_ALL) || defined(DOXYGEN)
void
I2CMasterIntClear(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);

    //
    // Clear the I2C master interrupt source.
    //
    HWREG(ulBase + I2C_MASTER_O_MIS) = I2C_MASTER_MICR_IC;
}
#endif

//*****************************************************************************
//
//! Clears I2C Slave interrupt sources.
//!
//! \param ulBase base address of the I2C Slave module
//!
//! The I2C Slave interrupt source is cleared, so that it no longer asserts.
//! This must be done in the interrupt handler to keep it from being called
//! again immediately upon exit.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_slaveintclear) || defined(BUILD_ALL) || defined(DOXYGEN)
void
I2CSlaveIntClear(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_SLAVE_BASE);

    //
    // Clear the I2C slave interrupt source.
    //
    HWREG(ulBase + I2C_SLAVE_O_SICR) = I2C_SLAVE_SICR_IC;
}
#endif

//*****************************************************************************
//
//! Sets the address that the I2C Master will place on the bus.
//!
//! \param ulBase base address of the I2C Master module
//! \param ucSlaveAddr 7-bit slave address
//! \param bReceive flag indicating the type of communication with the slave
//!
//! This function will set the address that the I2C Master will place on the
//! bus when initiating a transaction. When the parameter \e bReceive is set
//! to \b true, the address will indicate that the I2C Master is initiating
//! a read from the slave; otherwise the address will indicate that the I2C
//! Master is initiating a write to the slave.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_masterslaveaddrset) || defined(BUILD_ALL) || defined(DOXYGEN)
void
I2CMasterSlaveAddrSet(unsigned long ulBase, unsigned char ucSlaveAddr,
                      tBoolean bReceive)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);
    ASSERT(!(ucSlaveAddr & 0x80));

    //
    // Set the address of the slave with which the master will communicate.
    //
    HWREG(ulBase + I2C_MASTER_O_SA) = (ucSlaveAddr << 1) | bReceive;
}
#endif

//*****************************************************************************
//
//! Indicates whether or not the I2C Master is busy.
//!
//! \param ulBase base address of the I2C Master module
//!
//! This function returns an indication of whether or not the I2C Master is
//! busy transmitting or receiving data.
//!
//! \return Returns \b true if the I2C Master is busy; otherwise, returns
//! \b false.
//
//*****************************************************************************
#if defined(GROUP_masterbusy) || defined(BUILD_ALL) || defined(DOXYGEN)
tBoolean
I2CMasterBusy(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);

    //
    // Return the busy status.
    //
    if(HWREG(ulBase + I2C_MASTER_O_CS) & I2C_MASTER_CS_BUSY)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}
#endif

//*****************************************************************************
//
//! Indicates whether or not the I2C bus is busy.
//!
//! \param ulBase base address of the I2C Master module
//!
//! This function returns an indication of whether or not the I2C bus is
//! busy. This function can be used in a multi-master environment to
//! determine if another master is currently using the bus.
//!
//! \return Returns \b true if the I2C bus is busy; otherwise, returns
//! \b false.
//
//*****************************************************************************
#if defined(GROUP_masterbusbusy) || defined(BUILD_ALL) || defined(DOXYGEN)
tBoolean
I2CMasterBusBusy(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);

    //
    // Return the bus busy status.
    //
    if(HWREG(ulBase + I2C_MASTER_O_CS) & I2C_MASTER_CS_BUS_BUSY)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}
#endif

//*****************************************************************************
//
//! Controls the state of the I2C Master module.
//!
//! \param ulBase base address of the I2C Master module
//! \param ulCmd command to be issued to the I2C Master module
//!
//! This function is used to control the state of the Master module send and
//! receive operations. The parameter \e ucCmd can be one of the following
//! values:
//!
//! - I2C_MASTER_CMD_SINGLE_SEND
//! - I2C_MASTER_CMD_SINGLE_RECEIVE
//! - I2C_MASTER_CMD_BURST_SEND_START
//! - I2C_MASTER_CMD_BURST_SEND_CONT
//! - I2C_MASTER_CMD_BURST_SEND_FINISH
//! - I2C_MASTER_CMD_BURST_SEND_ERROR_STOP
//! - I2C_MASTER_CMD_BURST_RECEIVE_START
//! - I2C_MASTER_CMD_BURST_RECEIVE_CONT
//! - I2C_MASTER_CMD_BURST_RECEIVE_FINISH
//! - I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_mastercontrol) || defined(BUILD_ALL) || defined(DOXYGEN)
void
I2CMasterControl(unsigned long ulBase, unsigned long ulCmd)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);
    ASSERT((ulCmd == I2C_MASTER_CMD_SINGLE_SEND) ||
           (ulCmd == I2C_MASTER_CMD_SINGLE_RECEIVE) ||
           (ulCmd == I2C_MASTER_CMD_BURST_SEND_START) ||
           (ulCmd == I2C_MASTER_CMD_BURST_SEND_CONT) ||
           (ulCmd == I2C_MASTER_CMD_BURST_SEND_FINISH) ||
           (ulCmd == I2C_MASTER_CMD_BURST_SEND_ERROR_STOP) ||
           (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_START) ||
           (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_CONT) ||
           (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_FINISH) ||
           (ulCmd == I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP));

    //
    // Send the command.
    //
    HWREG(ulBase + I2C_MASTER_O_CS) = ulCmd;
}
#endif

//*****************************************************************************
//
//! Gets the error status of the I2C Master module.
//!
//! \param ulBase base address of the I2C Master module
//!
//! This function is used to obtain the error status of the Master module
//! send and receive operations. It returns one of the following values:
//!
//! - I2C_MASTER_ERR_NONE
//! - I2C_MASTER_ERR_ADDR_ACK
//! - I2C_MASTER_ERR_DATA_ACK
//! - I2C_MASTER_ERR_ARB_LOST
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_mastererr) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
I2CMasterErr(unsigned long ulBase)
{
    unsigned long ulErr;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);

    //
    // Get the raw error state
    //
    ulErr = HWREG(ulBase + I2C_MASTER_O_CS);

    //
    // If the I2C master is busy, then all the other bit are invalid, and
    // don't have an error to report.
    //
    if(ulErr & I2C_MASTER_CS_BUSY)
    {
        return(I2C_MASTER_ERR_NONE);
    }

    //
    // Check for errors.
    //
    if(ulErr & I2C_MASTER_CS_ERROR)
    {
        return(ulErr & (I2C_MASTER_CS_ERR_MASK));
    }
    else
    {
        return(I2C_MASTER_ERR_NONE);
    }
}
#endif

//*****************************************************************************
//
//! Transmits a byte from the I2C Master.
//!
//! \param ulBase base address of the I2C Master module
//! \param ucData data to be transmitted from the I2C Master
//!
//! This function will place the supplied data into I2C Master Data Register.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_masterdataput) || defined(BUILD_ALL) || defined(DOXYGEN)
void
I2CMasterDataPut(unsigned long ulBase, unsigned char ucData)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);

    //
    // Write the byte.
    //
    HWREG(ulBase + I2C_MASTER_O_DR) = ucData;
}
#endif

//*****************************************************************************
//
//! Receives a byte that has been sent to the I2C Master.
//!
//! \param ulBase base address of the I2C Master module
//!
//! This function reads a byte of data from the I2C Master Data Register.
//!
//! \return Returns the byte received from by the I2C Master, cast as an
//! unsigned long.
//
//*****************************************************************************
#if defined(GROUP_masterdataget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
I2CMasterDataGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_MASTER_BASE);

    //
    // Read a byte.
    //
    return(HWREG(ulBase + I2C_MASTER_O_DR));
}
#endif

//*****************************************************************************
//
//! Gets the I2C Slave module status
//!
//! \param ulBase base address of the I2C Slave module
//!
//! This function will return the action requested from a master, if any. The
//! possible values returned are:
//!
//! - I2C_SLAVE_ACT_NONE
//! - I2C_SLAVE_ACT_RREQ
//! - I2C_SLAVE_ACT_TREQ
//!
//! where I2C_SLAVE_ACT_NONE means that no action has been requested of the
//! I2C Slave module, I2C_SLAVE_ACT_RREQ means that an I2C master has sent
//! data to the I2C Slave module, and I2C_SLAVE_ACT_TREQ means that an I2C
//! master has requested that the I2C Slave module send data.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_slavestatus) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
I2CSlaveStatus(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_SLAVE_BASE);

    //
    // Return the slave status.
    //
    return(HWREG(ulBase + I2C_SLAVE_O_CSR));
}
#endif

//*****************************************************************************
//
//! Transmits a byte from the I2C Slave.
//!
//! \param ulBase base address of the I2C Slave module
//! \param ucData data to be transmitted from the I2C Slave
//!
//! This function will place the supplied data into I2C Slave Data Register.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_slavedataput) || defined(BUILD_ALL) || defined(DOXYGEN)
void
I2CSlaveDataPut(unsigned long ulBase, unsigned char ucData)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_SLAVE_BASE);

    //
    // Write the byte.
    //
    HWREG(ulBase + I2C_SLAVE_O_DR) = ucData;
}
#endif

//*****************************************************************************
//
//! Receives a byte that has been sent to the I2C Slave.
//!
//! \param ulBase base address of the I2C Slave module
//!
//! This function reads a byte of data from the I2C Slave Data Register.
//!
//! \return Returns the byte received from by the I2C Slave, cast as an
//! unsigned long.
//
//*****************************************************************************
#if defined(GROUP_slavedataget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
I2CSlaveDataGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == I2C_SLAVE_BASE);

    //
    // Read a byte.
    //
    return(HWREG(ulBase + I2C_SLAVE_O_DR));
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品免费在线观看| 欧美v日韩v国产v| 麻豆91免费观看| 亚洲日本在线a| 亚洲v日本v欧美v久久精品| 欧美成人精品3d动漫h| 不卡电影免费在线播放一区| 日本va欧美va精品| 亚洲激情五月婷婷| 国产性天天综合网| 欧美一级二级在线观看| 91麻豆精品在线观看| 国产成人精品一区二| 奇米777欧美一区二区| 一区二区三区美女视频| 国产精品传媒视频| 久久久久久黄色| 欧美一级在线免费| 欧美性高清videossexo| 91在线丨porny丨国产| 国产一区二区三区不卡在线观看| 午夜精品成人在线视频| 亚洲精品国久久99热| 中文字幕av资源一区| 国产亚洲va综合人人澡精品| 精品国偷自产国产一区| 日韩精品一区二区三区swag| 91精品国产综合久久久久久| 欧美性高清videossexo| 欧美午夜精品久久久久久孕妇| 91在线看国产| 99久久99久久免费精品蜜臀| 成人毛片在线观看| 福利一区在线观看| 国产不卡免费视频| 国产999精品久久久久久| 激情av综合网| 国产98色在线|日韩| 不卡av在线网| 99久久亚洲一区二区三区青草| 国产盗摄一区二区三区| 国产福利一区二区三区视频| 国产精品资源网| 国产精品91xxx| 丁香婷婷综合色啪| jizzjizzjizz欧美| 色综合中文字幕| 91黄色在线观看| 欧美天堂亚洲电影院在线播放| 欧美日韩免费观看一区二区三区 | 欧美另类久久久品| 精品视频在线免费观看| 欧美日本在线播放| 日韩视频123| 久久久久久久精| 亚洲视频每日更新| 亚洲一区二区三区在线播放| 日日摸夜夜添夜夜添国产精品| 琪琪久久久久日韩精品| 久久精品国产亚洲aⅴ| 国产一区二区在线影院| gogo大胆日本视频一区| 91精品1区2区| 日韩欧美一区中文| 国产精品视频九色porn| 亚洲精品你懂的| 免费久久99精品国产| 国产九九视频一区二区三区| 成人app网站| 欧美日本在线观看| 国产亚洲精品久| 尤物av一区二区| 午夜伊人狠狠久久| 国产精品综合一区二区| 91亚洲精品久久久蜜桃| 51精品秘密在线观看| 日本一区二区免费在线 | 综合自拍亚洲综合图不卡区| 亚洲欧美二区三区| 天堂一区二区在线| 国产精品1区二区.| 欧美色倩网站大全免费| 欧美tickle裸体挠脚心vk| 国产精品欧美精品| 日日骚欧美日韩| 不卡一区二区在线| 欧美喷水一区二区| 中文字幕日韩av资源站| 麻豆91在线看| 色婷婷久久综合| 久久综合999| 亚洲男人天堂av| 国产精品一区二区无线| 欧美三级日韩三级国产三级| 国产精品天美传媒| 日本中文在线一区| 色哟哟日韩精品| 国产欧美日韩中文久久| 免费一级片91| 在线观看日韩电影| 国产精品网站在线播放| 秋霞电影一区二区| 色一情一乱一乱一91av| 久久久99免费| 午夜久久电影网| 色国产综合视频| 久久精品视频免费观看| 美女脱光内衣内裤视频久久网站| 色婷婷亚洲一区二区三区| 欧美经典一区二区| 国内外成人在线| 日韩午夜在线观看视频| 亚洲一线二线三线久久久| 日韩三级av在线播放| 午夜精品福利视频网站| 在线观看亚洲成人| 亚洲另类春色校园小说| 丁香婷婷深情五月亚洲| 国产三级精品三级在线专区| 日本不卡视频在线| 欧美一区二区视频在线观看2020 | 国产欧美一区视频| 麻豆一区二区三| 欧美日韩aaa| 亚洲va韩国va欧美va| 在线看日本不卡| 亚洲一区二区三区四区在线| 91小视频免费观看| 亚洲少妇30p| 色综合久久久久综合体桃花网| 中文字幕在线一区二区三区| 国产成a人亚洲| 欧美国产日韩精品免费观看| 国产iv一区二区三区| 久久精品日韩一区二区三区| 国产一区二区久久| 欧美高清一级片在线观看| 国产乱码一区二区三区| 欧美国产综合一区二区| 成人18视频在线播放| √…a在线天堂一区| 色狠狠av一区二区三区| 亚洲午夜久久久久久久久电影网| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲人123区| 欧美视频自拍偷拍| 日韩影院精彩在线| 精品国免费一区二区三区| 国产精品综合一区二区| 国产精品三级视频| 国产91对白在线观看九色| 国产精品伦理在线| 一本久久a久久免费精品不卡| 亚洲一区二区三区在线看| 7777精品伊人久久久大香线蕉完整版 | 欧美日韩国产综合久久| 蜜臀精品久久久久久蜜臀| 337p日本欧洲亚洲大胆色噜噜| 国产精品18久久久久久久网站| 国产精品妹子av| 在线免费观看日本欧美| 奇米影视7777精品一区二区| 久久久久久久综合日本| 91蜜桃在线免费视频| 午夜国产精品一区| www国产成人| 色8久久人人97超碰香蕉987| 日韩激情中文字幕| 国产视频视频一区| 欧美一级日韩不卡播放免费| 国产成人精品一区二| 亚洲一区二区三区四区在线观看 | 欧美激情一区在线观看| 色欧美乱欧美15图片| 免费欧美在线视频| 国产精品久99| 欧美一激情一区二区三区| 成人午夜免费av| 亚洲18色成人| 日本一区二区久久| 51久久夜色精品国产麻豆| av电影在线观看一区| 麻豆精品国产91久久久久久| 国产精品网站在线观看| 欧美一级黄色片| av成人免费在线观看| 久久精品国产99国产精品| 日韩毛片一二三区| 日韩免费观看高清完整版在线观看| 99精品欧美一区| 极品瑜伽女神91| 亚洲电影中文字幕在线观看| 亚洲国产成人一区二区三区| 51精品久久久久久久蜜臀| 99在线精品免费| 精品一区二区三区av| 亚洲成人精品一区二区| 亚洲欧洲av另类| 久久久精品免费免费| 日韩一级片网站|