亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久久久国产精品麻豆 | 国产精品资源站在线| 欧美国产丝袜视频| 欧美久久久久久久久| 成人aaaa免费全部观看| 日本成人在线电影网| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 日韩欧美国产综合在线一区二区三区| 高清成人免费视频| 免费人成黄页网站在线一区二区| 中文字幕第一区| 精品国产成人系列| 欧美精品精品一区| 在线免费观看日本一区| 成人国产在线观看| 国产91在线看| 国产在线视频一区二区| 免费三级欧美电影| 午夜欧美视频在线观看| 亚洲一区二区高清| 亚洲另类春色校园小说| 中文字幕一区二区三区在线观看 | 成人免费毛片app| 九色porny丨国产精品| 三级精品在线观看| 亚洲国产精品欧美一二99| 亚洲欧美二区三区| 国产精品久久久久影院色老大| 久久网这里都是精品| 久久综合久久鬼色中文字| 日韩一卡二卡三卡| 日韩免费福利电影在线观看| 欧美顶级少妇做爰| 欧美福利视频一区| 在线播放日韩导航| 欧美日韩综合不卡| 欧美精品色综合| 在线播放国产精品二区一二区四区| 色香色香欲天天天影视综合网| 成人激情免费网站| 91亚洲精品久久久蜜桃| 99riav久久精品riav| 91麻豆国产福利精品| 色婷婷久久久久swag精品 | 欧美亚洲高清一区二区三区不卡| 99久久精品一区二区| 色综合中文字幕国产 | proumb性欧美在线观看| 99久久er热在这里只有精品15| 成人午夜视频在线观看| 成人av网站免费观看| 91丨九色丨蝌蚪富婆spa| 91丝袜美女网| 欧美日韩高清不卡| 日韩欧美高清一区| 国产亚洲一区二区三区在线观看| 亚洲国产精品黑人久久久| 亚洲欧美一区二区三区孕妇| 亚洲综合在线观看视频| 日韩在线卡一卡二| 国产美女主播视频一区| 99热在这里有精品免费| 欧美网站大全在线观看| 欧美成人国产一区二区| 中文字幕国产一区| 洋洋成人永久网站入口| 麻豆免费精品视频| av亚洲产国偷v产偷v自拍| 欧美剧情电影在线观看完整版免费励志电影 | 91视视频在线观看入口直接观看www | 日韩视频免费观看高清完整版 | 中文字幕在线免费不卡| 亚洲成人精品影院| 国产老妇另类xxxxx| 91视频com| 精品嫩草影院久久| 亚洲欧美日韩久久| 经典三级视频一区| 色哟哟一区二区三区| 精品国产电影一区二区| 亚洲精品成人悠悠色影视| 久久国产成人午夜av影院| 成人a级免费电影| 91精品久久久久久久久99蜜臂| 国产视频不卡一区| 午夜精品国产更新| 99精品久久只有精品| 日韩欧美亚洲国产另类| 亚洲色图制服诱惑 | 97久久精品人人爽人人爽蜜臀| 在线综合亚洲欧美在线视频| 国产精品电影一区二区三区| 蜜臀99久久精品久久久久久软件 | www一区二区| 亚洲午夜电影在线观看| 成人一区二区三区视频在线观看| 欧美日韩国产综合草草| 国产精品久久一卡二卡| 美国毛片一区二区三区| 在线精品视频一区二区三四| 久久精品人人做人人爽人人| 强制捆绑调教一区二区| 在线精品视频免费播放| 欧美高清一级片在线观看| 另类欧美日韩国产在线| 欧美日韩激情一区| 国产精品福利av| 从欧美一区二区三区| 精品国产区一区| 日本系列欧美系列| 欧美日韩国产成人在线91| 亚洲精品免费视频| jlzzjlzz国产精品久久| 国产三级精品在线| 狠狠色丁香婷综合久久| 91精品国产综合久久精品app | 亚洲国产精品ⅴa在线观看| 男人的天堂亚洲一区| 欧美色大人视频| 亚洲欧美一区二区三区国产精品| 国产高清久久久久| 久久亚洲精精品中文字幕早川悠里| 日本中文字幕一区二区视频| 欧美日韩性生活| 亚洲超碰97人人做人人爱| 91久久精品日日躁夜夜躁欧美| 亚洲人成小说网站色在线| 99国产一区二区三精品乱码| 亚洲国产精品成人综合| 成人性生交大片| 亚洲欧美在线视频观看| 91在线视频18| 亚洲精品视频在线观看网站| 91热门视频在线观看| 亚洲美女视频一区| 91蝌蚪porny| 亚洲一级二级三级在线免费观看| 91理论电影在线观看| 亚洲四区在线观看| 在线视频中文字幕一区二区| 亚洲视频在线一区| 欧美网站大全在线观看| 日韩电影在线观看电影| 精品久久免费看| 国产乱妇无码大片在线观看| 亚洲国产精品成人综合| a级精品国产片在线观看| 亚洲美女在线一区| 精品视频999| 精品在线免费视频| 久久久99精品免费观看| av日韩在线网站| 亚洲尤物在线视频观看| 欧美一区二区女人| 国产精品1区二区.| 亚洲女女做受ⅹxx高潮| 欧美日韩国产bt| 国产一区二区不卡| 亚洲乱码日产精品bd| 884aa四虎影成人精品一区| 久久99最新地址| 国产精品久久久久久久浪潮网站| 色综合一个色综合亚洲| 青娱乐精品视频| 国产精品久久久久久久久动漫 | 日韩精品中文字幕一区| 国产精品中文有码| 亚洲精品免费电影| 精品精品欲导航| 99久精品国产| 免费久久99精品国产| 中文字幕一区二区三区av| 欧美日本在线播放| 成人免费毛片高清视频| 首页国产丝袜综合| 国产欧美精品一区aⅴ影院| 欧美在线免费观看视频| 国产一区二区日韩精品| 亚洲国产一区二区在线播放| 26uuu精品一区二区| 欧美性色aⅴ视频一区日韩精品| 老司机免费视频一区二区三区| 中文字幕一区在线观看视频| 日韩欧美高清在线| 91激情在线视频| 国产经典欧美精品| 日韩电影一区二区三区| 中文字幕佐山爱一区二区免费| 3751色影院一区二区三区| av激情综合网| 极品少妇xxxx精品少妇偷拍| 一区二区三区影院| 国产欧美综合在线观看第十页| 欧美片网站yy| 99国产精品久久久久| 国产在线精品一区二区| 天使萌一区二区三区免费观看| 国产精品毛片无遮挡高清| 欧美本精品男人aⅴ天堂| 欧美视频自拍偷拍|