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

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

?? i2c.c

?? FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
?? C
?? 第 1 頁 / 共 2 頁
字號:
    {
        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_MICR) = I2C_MASTER_MICR_IC;

    //
    // Workaround for I2C master interrupt clear errata for rev B Stellaris
    // devices.  For later devices, this write is ignored and therefore
    // harmless (other than the slight performance hit).
    //
    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.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区在线看片| 91亚洲精品一区二区乱码| 精品亚洲国产成人av制服丝袜| 日韩电影在线免费看| 欧美在线你懂的| 国产日韩欧美a| 亚洲国产欧美日韩另类综合| 日韩国产高清在线| 91浏览器打开| 精品欧美一区二区三区精品久久| 中文字幕av一区二区三区免费看 | 国产亚洲女人久久久久毛片| 日本一区二区动态图| 午夜不卡av免费| 色综合久久99| 亚洲成人午夜电影| 免费日韩伦理电影| 91女神在线视频| 欧美成人一级视频| 亚洲福利一区二区三区| 国产成人精品一区二区三区四区| 欧美专区在线观看一区| 国产欧美一区二区精品性色超碰| 亚洲成人在线网站| 91看片淫黄大片一级在线观看| xf在线a精品一区二区视频网站| 婷婷成人激情在线网| 欧美伊人久久久久久久久影院| 中文字幕人成不卡一区| 粗大黑人巨茎大战欧美成人| 久久亚洲一区二区三区明星换脸| 裸体在线国模精品偷拍| 日韩三级在线免费观看| 日韩电影网1区2区| 日韩一区二区三区精品视频| 日韩精品免费专区| 精品福利二区三区| 国产麻豆日韩欧美久久| 久久久久久一二三区| 国产综合久久久久影院| 国产亚洲欧洲997久久综合| 粉嫩av一区二区三区在线播放 | 亚洲免费观看高清完整| 欧美日韩大陆在线| 韩国av一区二区三区在线观看| 欧美电视剧在线看免费| 国产成人精品免费网站| 亚洲精品福利视频网站| 日韩精品中文字幕一区二区三区| 国产精品自拍在线| 一区二区三区不卡在线观看| 欧美一级在线免费| 成人黄色电影在线 | 久久久久久久久久久99999| 不卡av在线网| 青青草成人在线观看| 国产精品久久久久永久免费观看 | 91免费观看国产| 久久99精品久久只有精品| 亚洲欧美另类久久久精品2019| 欧美一区二区福利在线| 91在线丨porny丨国产| 国产一区亚洲一区| 日韩成人精品视频| 亚洲尤物在线视频观看| 中文字幕 久热精品 视频在线| 91精品国产综合久久精品图片| 成人av动漫在线| 成人黄色av网站在线| 国产盗摄女厕一区二区三区| 日本麻豆一区二区三区视频| 亚洲国产视频直播| 亚洲18女电影在线观看| 亚洲午夜私人影院| 亚洲大片精品永久免费| 亚洲第一综合色| 亚洲综合色婷婷| 亚洲最大成人网4388xx| 一区二区三区中文字幕电影| 亚洲欧美日韩久久| 午夜精品福利一区二区三区av| 亚洲国产日韩在线一区模特| 亚洲图片有声小说| 久久www免费人成看片高清| 精品制服美女久久| 国产成人精品午夜视频免费| bt欧美亚洲午夜电影天堂| 99久久亚洲一区二区三区青草| 99re这里只有精品首页| 欧美日韩亚洲国产综合| 欧美一区二区大片| 国产嫩草影院久久久久| 亚洲欧美视频在线观看| 免费在线视频一区| 不卡影院免费观看| 精品毛片乱码1区2区3区| 精品区一区二区| 亚洲精品日日夜夜| 久久国产麻豆精品| 色综合色狠狠综合色| 欧美电影免费提供在线观看| 亚洲日韩欧美一区二区在线| 日韩专区中文字幕一区二区| 国产成人在线观看免费网站| 欧美三级三级三级| 中文字幕亚洲精品在线观看| 久久99国产精品久久99 | 亚洲精品久久嫩草网站秘色| 高清成人免费视频| 日韩视频一区在线观看| 亚洲一区二区在线视频| 97精品国产露脸对白| 国产亚洲一区二区在线观看| 美女看a上一区| 91精品国产福利| 免费看黄色91| 日韩一区二区在线看| 美女免费视频一区| 久久亚洲捆绑美女| 日本不卡一二三| 精品人在线二区三区| 日韩和欧美一区二区三区| 欧美四级电影在线观看| 亚洲一区二区三区美女| 在线精品视频一区二区| 亚洲欧美日韩一区二区| 日本久久电影网| 日韩中文字幕一区二区三区| 欧美日产在线观看| 五月天激情综合| 日韩精品中文字幕一区二区三区| 免费久久99精品国产| 欧美成人a在线| 欧美视频一区在线观看| 日韩av一级片| 国产色爱av资源综合区| 成人毛片视频在线观看| 一区二区三区蜜桃| 欧美一区二区三级| 国产成人免费视频网站高清观看视频| 亚洲国产成人在线| 欧美日韩一区二区在线观看视频| 国产91精品精华液一区二区三区| 国产乱人伦偷精品视频不卡 | 蜜臀99久久精品久久久久久软件| 国产精品久久久久久久久搜平片| 欧美日韩视频在线观看一区二区三区 | 韩国女主播一区| 亚洲精选视频在线| 日韩一区二区麻豆国产| 91在线观看美女| av激情综合网| 国产一区二区三区高清播放| 免费精品视频在线| 韩国欧美国产1区| 国产在线精品视频| 国产精品一二三四| 国产剧情一区二区三区| 成人网男人的天堂| av不卡在线观看| 在线精品亚洲一区二区不卡| 91在线视频免费观看| 91在线观看一区二区| 91美女精品福利| 欧美视频完全免费看| 日韩视频一区二区在线观看| 欧美成人伊人久久综合网| 欧美日韩中文字幕一区二区| 婷婷中文字幕一区三区| 免费观看在线综合色| 福利一区二区在线观看| 欧美制服丝袜第一页| 日韩欧美国产综合在线一区二区三区| 精品久久久久久久久久久久久久久久久| 欧美一级电影网站| 欧美国产日韩一二三区| 亚洲欧美另类久久久精品| 日韩精品亚洲专区| 色综合天天天天做夜夜夜夜做| 欧美日韩精品一区二区三区蜜桃 | 国产一区二区三区黄视频 | 天堂久久一区二区三区| 久久精品国产99国产| 99精品视频在线观看| 8v天堂国产在线一区二区| 久久久久久久久岛国免费| 亚洲午夜精品一区二区三区他趣| 麻豆精品一区二区综合av| 色综合久久久久综合体| 国产精品毛片久久久久久| 久久精品国产澳门| 欧美xfplay| 狠狠久久亚洲欧美| 久久亚洲综合色一区二区三区| 蜜桃精品视频在线| 国产亚洲欧洲997久久综合| 高清久久久久久| 亚洲天天做日日做天天谢日日欢 | 欧美第一区第二区| 亚洲一区二区偷拍精品|