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

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

?? can.c

?? lm3s下lwip的udp
?? C
?? 第 1 頁 / 共 5 頁
字號:
    IntUnregister(ulIntNumber);

    //
    // Disable the CAN interrupt.
    //
    IntDisable(ulIntNumber);
}

//*****************************************************************************
//
//! Enables individual CAN controller interrupt sources.
//!
//! \param ulBase is the base address of the CAN controller.
//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled.
//!
//! Enables specific interrupt sources of the CAN controller.  Only enabled
//! sources will cause a processor interrupt.
//!
//! The \e ulIntFlags parameter is the logical OR of any of the following:
//!
//! - \b CAN_INT_ERROR - a controller error condition has occurred
//! - \b CAN_INT_STATUS - a message transfer has completed, or a bus error has
//! been detected
//! - \b CAN_INT_MASTER - allow CAN controller to generate interrupts
//!
//! In order to generate any interrupts, \b CAN_INT_MASTER must be enabled.
//! Further, for any particular transaction from a message object to generate
//! an interrupt, that message object must have interrupts enabled (see
//! CANMessageSet()).  \b CAN_INT_ERROR will generate an interrupt if the
//! controller enters the ``bus off'' condition, or if the error counters reach
//! a limit.  \b CAN_INT_STATUS will generate an interrupt under quite a few
//! status conditions and may provide more interrupts than the application
//! needs to handle.  When an interrupt occurs, use CANIntStatus() to determine
//! the cause.
//!
//! \return None.
//
//*****************************************************************************
void
CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(CANBaseValid(ulBase));
    ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0);

    //
    // Enable the specified interrupts.
    //
    CANRegWrite(ulBase + CAN_O_CTL,
                CANRegRead(ulBase + CAN_O_CTL) | ulIntFlags);
}

//*****************************************************************************
//
//! Disables individual CAN controller interrupt sources.
//!
//! \param ulBase is the base address of the CAN controller.
//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled.
//!
//! Disables the specified CAN controller interrupt sources.  Only enabled
//! interrupt sources can cause a processor interrupt.
//!
//! The \e ulIntFlags parameter has the same definition as in the
//! CANIntEnable() function.
//!
//! \return None.
//
//*****************************************************************************
void
CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(CANBaseValid(ulBase));
    ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0);

    //
    // Disable the specified interrupts.
    //
    CANRegWrite(ulBase + CAN_O_CTL,
                CANRegRead(ulBase + CAN_O_CTL) & ~(ulIntFlags));
}

//*****************************************************************************
//
//! Returns the current CAN controller interrupt status.
//!
//! \param ulBase is the base address of the CAN controller.
//! \param eIntStsReg indicates which interrupt status register to read
//!
//! Returns the value of one of two interrupt status registers.  The interrupt
//! status register read is determined by the \e eIntStsReg parameter, which
//! can have one of the following values:
//!
//! - \b CAN_INT_STS_CAUSE - indicates the cause of the interrupt
//! - \b CAN_INT_STS_OBJECT - indicates pending interrupts of all message
//! objects
//!
//! \b CAN_INT_STS_CAUSE returns the value of the controller interrupt register
//! and indicates the cause of the interrupt.  It will be a value of
//! \b CAN_INT_INTID_STATUS if the cause is a status interrupt.  In this case,
//! the status register should be read with the CANStatusGet() function.
//! Calling this function to read the status will also clear the status
//! interrupt.  If the value of the interrupt register is in the range 1-32,
//! then this indicates the number of the highest priority message object that
//! has an interrupt pending.  The message object interrupt can be cleared by
//! using the CANIntClear() function, or by reading the message using
//! CANMessageGet() in the case of a received message.  The interrupt handler
//! can read the interrupt status again to make sure all pending interrupts are
//! cleared before returning from the interrupt.
//!
//! \b CAN_INT_STS_OBJECT returns a bit mask indicating which message objects
//! have pending interrupts.  This can be used to discover all of the pending
//! interrupts at once, as opposed to repeatedly reading the interrupt register
//! by using \b CAN_INT_STS_CAUSE.
//!
//! \return Returns the value of one of the interrupt status registers.
//
//*****************************************************************************
unsigned long
CANIntStatus(unsigned long ulBase, tCANIntStsReg eIntStsReg)
{
    unsigned long ulStatus;

    //
    // Check the arguments.
    //
    ASSERT(CANBaseValid(ulBase));

    //
    // See which status the caller is looking for.
    //
    switch(eIntStsReg)
    {
        //
        // The caller wants the global interrupt status for the CAN controller
        // specified by ulBase.
        //
        case CAN_INT_STS_CAUSE:
        {
            ulStatus = CANRegRead(ulBase + CAN_O_INT);
            break;
        }

        //
        // The caller wants the current message status interrupt for all
        // messages.
        //
        case CAN_INT_STS_OBJECT:
        {
            //
            // Read and combine both 16 bit values into one 32bit status.
            //
            ulStatus = (CANRegRead(ulBase + CAN_O_MSG1INT) &
                        CAN_MSG1INT_INTPND_M);
            ulStatus |= (CANRegRead(ulBase + CAN_O_MSG2INT) << 16);
            break;
        }

        //
        // Request was for unknown status so just return 0.
        //
        default:
        {
            ulStatus = 0;
            break;
        }
    }
    //
    // Return the interrupt status value
    //
    return(ulStatus);
}

//*****************************************************************************
//
//! Clears a CAN interrupt source.
//!
//! \param ulBase is the base address of the CAN controller.
//! \param ulIntClr is a value indicating which interrupt source to clear.
//!
//! This function can be used to clear a specific interrupt source.  The
//! \e ulIntClr parameter should be one of the following values:
//!
//! - \b CAN_INT_INTID_STATUS - Clears a status interrupt.
//! - 1-32 - Clears the specified message object interrupt
//!
//! It is not necessary to use this function to clear an interrupt.  This
//! should only be used if the application wants to clear an interrupt source
//! without taking the normal interrupt action.
//!
//! Normally, the status interrupt is cleared by reading the controller status
//! using CANStatusGet().  A specific message object interrupt is normally
//! cleared by reading the message object using CANMessageGet().
//!
//! \note Since there is a write buffer in the Cortex-M3 processor, it may take
//! several clock cycles before the interrupt source is actually cleared.
//! Therefore, it is recommended that the interrupt source be cleared early in
//! the interrupt handler (as opposed to the very last action) to avoid
//! returning from the interrupt handler before the interrupt source is
//! actually cleared.  Failure to do so may result in the interrupt handler
//! being immediately reentered (since NVIC still sees the interrupt source
//! asserted).
//!
//! \return None.
//
//*****************************************************************************
void
CANIntClear(unsigned long ulBase, unsigned long ulIntClr)
{
    //
    // Check the arguments.
    //
    ASSERT(CANBaseValid(ulBase));
    ASSERT((ulIntClr == CAN_INT_INTID_STATUS) ||
           ((ulIntClr>=1) && (ulIntClr <=32)));

    if(ulIntClr == CAN_INT_INTID_STATUS)
    {
        //
        // Simply read and discard the status to clear the interrupt.
        //
        CANRegRead(ulBase + CAN_O_STS);
    }
    else
    {
        //
        // Wait to be sure that this interface is not busy.
        //
        while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY)
        {
        }

        //
        // Only change the interrupt pending state by setting only the
        // CAN_IF1CMSK_CLRINTPND bit.
        //
        CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_CLRINTPND);

        //
        // Send the clear pending interrupt command to the CAN controller.
        //
        CANRegWrite(ulBase + CAN_O_IF1CRQ, ulIntClr & CAN_IF1CRQ_MNUM_M);

        //
        // Wait to be sure that this interface is not busy.
        //
        while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY)
        {
        }
    }
}

//*****************************************************************************
//
//! Sets the CAN controller automatic retransmission behavior.
//!
//! \param ulBase is the base address of the CAN controller.
//! \param bAutoRetry enables automatic retransmission.
//!
//! Enables or disables automatic retransmission of messages with detected
//! errors.  If \e bAutoRetry is \b true, then automatic retransmission is
//! enabled, otherwise it is disabled.
//!
//! \return None.
//
//*****************************************************************************
void
CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry)
{
    unsigned long ulCtlReg;

    //
    // Check the arguments.
    //
    ASSERT(CANBaseValid(ulBase));

    ulCtlReg = CANRegRead(ulBase + CAN_O_CTL);

    //
    // Conditionally set the DAR bit to enable/disable auto-retry.
    //
    if(bAutoRetry)
    {
        //
        // Clearing the DAR bit tells the controller to not disable the
        // auto-retry of messages which were not transmited or received
        // correctly.
        //
        ulCtlReg &= ~CAN_CTL_DAR;
    }
    else
    {
        //
        // Setting the DAR bit tells the controller to disable the auto-retry
        // of messages which were not transmited or received correctly.
        //
        ulCtlReg |= CAN_CTL_DAR;
    }

    CANRegWrite(ulBase + CAN_O_CTL, ulCtlReg);
}

//*****************************************************************************
//
//! Returns the current setting for automatic retransmission.
//!
//! \param ulBase is the base address of the CAN controller.
//!
//! Reads the current setting for the automatic retransmission in the CAN
//! controller and returns it to the caller.
//!
//! \return Returns \b true if automatic retransmission is enabled, \b false
//! otherwise.
//
//*****************************************************************************
tBoolean
CANRetryGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(CANBaseValid(ulBase));

    //
    // Read the disable automatic retry setting from the CAN controller.
    //
    if(CANRegRead(ulBase + CAN_O_CTL) & CAN_CTL_DAR)
    {
        //
        // Automatic data retransmission is not enabled.
        //
        return(false);
    }

    //
    // Automatic data retransmission is enabled.
    //
    return(true);
}

//*****************************************************************************
//
//! Reads one of the controller status registers.
//!
//! \param ulBase is the base address of the CAN controller.
//! \param eStatusReg is the status register to read.
//!
//! Reads a status register of the CAN controller and returns it to the caller.
//! The different status registers are:
//!
//! - \b CAN_STS_CONTROL - the main controller status
//! - \b CAN_STS_TXREQUEST - bit mask of objects pending transmission
//! - \b CAN_STS_NEWDAT - bit mask of objects with new data
//! - \b CAN_STS_MSGVAL - bit mask of objects with valid configuration
//!
//! When reading the main controller status register, a pending status
//! interrupt will be cleared.  This should be used in the interrupt handler
//! for the CAN controller if the cause is a status interrupt.  The controller
//! status register fields are as follows:
//!
//! - \b CAN_STATUS_BUS_OFF - controller is in bus-off condition
//! - \b CAN_STATUS_EWARN - an error counter has reached a limit of at least 96
//! - \b CAN_STATUS_EPASS - CAN controller is in the error passive state
//! - \b CAN_STATUS_RXOK - a message was received successfully (independent of
//! any message filtering).
//! - \b CAN_STATUS_TXOK - a message was successfully transmitted
//! - \b CAN_STATUS_LEC_MSK - mask of last error code bits (3 bits)
//! - \b CAN_STATUS_LEC_NONE - no error
//! - \b CAN_STATUS_LEC_STUFF - stuffing error detected
//! - \b CAN_STATUS_LEC_FORM - a format error occurred in the fixed format part
//! of a message
//! - \b CAN_STATUS_LEC_ACK - a transmitted message was not acknowledged
//! - \b CAN_STATUS_LEC_BIT1 - dominant level detected when trying to send in
//! recessive mode
//! - \b CAN_STATUS_LEC_BIT0 - recessive level detected when trying to send in
//! dominant mode
//! - \b CAN_STATUS_LEC_CRC - CRC error in received message
//!
//! The remaining status registers are 32-bit bit maps to the message objects.
//! They can be used to quickly obtain information about the status of all the
//! message objects without needing to query each one.  They contain the
//! following information:
//!
//! - \b CAN_STS_TXREQUEST - if a message object's TxRequest bit is set, that
//! means that a transmission is pending on that object.  The application can
//! use this to determine which objects are still waiting to send a message.
//! - \b CAN_STS_NEWDAT - if a message object's NewDat bit is set, that means
//! that a new message has been received in that object, and has not yet been
//! picked up by the host application
//! - \b CAN_STS_MSGVAL - if a message object's MsgVal bit is set, that means
//! it has a valid configuration programmed.  The host application can use this
//! to determine which message objects are empty/unused.
//!
//! \return Returns the value of the status register.
//

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美岛国在线观看| 久久久一区二区三区捆绑**| 欧美激情一区三区| 美女视频黄免费的久久| 欧美一区二区三区四区久久| 亚洲h在线观看| 欧美精品日日鲁夜夜添| 蜜桃视频第一区免费观看| 欧美一区二区二区| 狠狠色综合色综合网络| 国产亚洲欧洲一区高清在线观看| 国产91在线观看| 亚洲视频 欧洲视频| 欧美日韩一区二区三区在线| 麻豆高清免费国产一区| 国产日韩欧美激情| 91国偷自产一区二区使用方法| 天堂一区二区在线| 精品不卡在线视频| av在线不卡免费看| 午夜视频在线观看一区| 91精品国产欧美一区二区| 国产精品一级二级三级| 夜夜亚洲天天久久| 欧美精品一区二区三区很污很色的 | 精品中文字幕一区二区| 国产亚洲欧美日韩在线一区| 91小视频免费看| 人人爽香蕉精品| 中文字幕一区二区三区在线观看| 欧美日韩视频在线一区二区| 国产一区二区精品久久| 一级女性全黄久久生活片免费| 日韩精品中午字幕| 91日韩精品一区| 久久国产综合精品| 亚洲日本va在线观看| 日韩精品在线一区| 一本色道久久加勒比精品| 久久福利资源站| 亚洲国产日产av| 久久九九影视网| 欧美一区二区在线播放| 91偷拍与自偷拍精品| 久久99热99| 亚洲电影视频在线| 国产精品青草综合久久久久99| 欧美喷潮久久久xxxxx| 97se亚洲国产综合自在线 | 亚洲精品免费一二三区| 欧美成人bangbros| 欧美日韩精品欧美日韩精品一 | 91在线观看美女| 国产精品一级黄| 国模冰冰炮一区二区| 日韩精品三区四区| 亚洲资源中文字幕| 国产精品麻豆欧美日韩ww| 久久久夜色精品亚洲| 欧美一区二区三区四区久久| 欧美日韩一卡二卡| 91国产精品成人| 色婷婷国产精品综合在线观看| 成人av中文字幕| 国产酒店精品激情| 国产在线播精品第三| 喷水一区二区三区| 日本视频中文字幕一区二区三区| 亚洲综合色网站| 一区二区视频在线| 一区二区三区在线免费播放| 综合亚洲深深色噜噜狠狠网站| 国产亚洲婷婷免费| 国产欧美在线观看一区| 国产亚洲综合在线| 久久精品欧美一区二区三区麻豆 | 国产丝袜在线精品| 国产午夜精品在线观看| 久久久亚洲精品一区二区三区 | 99久久久久久| 91色在线porny| 色哦色哦哦色天天综合| 91论坛在线播放| 欧美性受xxxx黑人xyx性爽| 在线免费精品视频| 欧美日韩的一区二区| 欧美丰满少妇xxxxx高潮对白 | 亚洲夂夂婷婷色拍ww47| 亚洲一区二区五区| 日韩电影免费在线观看网站| 麻豆国产欧美一区二区三区| 国产精品一区二区三区99| 成人av高清在线| 日本久久一区二区| 91精品欧美一区二区三区综合在 | 亚洲综合免费观看高清完整版在线| 亚洲六月丁香色婷婷综合久久 | 色婷婷综合视频在线观看| 欧美手机在线视频| 精品国产乱码久久久久久蜜臀| 久久精品一级爱片| 中文字幕亚洲综合久久菠萝蜜| 一区二区三区高清不卡| 免费在线观看精品| 白白色 亚洲乱淫| 欧美日韩在线播放三区| 91精品一区二区三区久久久久久| 2024国产精品| 亚洲人午夜精品天堂一二香蕉| 视频在线观看一区二区三区| 国产一区二区三区免费看| 91香蕉视频在线| 91精品欧美福利在线观看| 26uuu国产电影一区二区| 亚洲欧美综合色| 日韩一区精品视频| 国产91丝袜在线播放0| 欧美日韩dvd在线观看| www久久精品| 亚洲午夜精品一区二区三区他趣| 韩国精品主播一区二区在线观看 | 91精品国产美女浴室洗澡无遮挡| 久久精品综合网| 午夜激情久久久| 成人黄色av网站在线| 欧美一区二区在线观看| 亚洲同性gay激情无套| 久久成人综合网| 在线观看一区日韩| 国产精品色在线观看| 日韩va欧美va亚洲va久久| 99这里只有久久精品视频| 欧美一区二区三区免费观看视频 | 亚洲国产精品一区二区久久| 国产久卡久卡久卡久卡视频精品| 欧美丝袜丝交足nylons| 中文字幕在线观看一区| 精品一区二区三区日韩| 欧美老肥妇做.爰bbww| 亚洲美腿欧美偷拍| 国产.欧美.日韩| 欧美大片在线观看| 亚洲福中文字幕伊人影院| 不卡的av网站| 久久精品视频免费| 国产在线一区二区| 日韩欧美中文字幕精品| 亚洲精品伦理在线| 成人国产精品免费观看动漫| 久久先锋影音av鲁色资源| 欧美aaa在线| 欧美一级艳片视频免费观看| 亚洲夂夂婷婷色拍ww47| 91女神在线视频| 亚洲视频电影在线| 97精品国产露脸对白| 国产精品三级电影| 高清国产一区二区| 国产亚洲人成网站| 国产一区二区不卡老阿姨| 欧美成人vps| 狠狠色丁香久久婷婷综| 欧美sm美女调教| 美国三级日本三级久久99 | 国内成人自拍视频| 精品国产精品网麻豆系列| 久久国产视频网| 日韩三级中文字幕| 久久草av在线| 一本到不卡精品视频在线观看| 国产成人精品亚洲日本在线桃色 | 一区二区不卡在线播放 | 久久国内精品自在自线400部| 一区二区三区不卡在线观看 | 欧美人与禽zozo性伦| 久久―日本道色综合久久| 中文字幕一区三区| 久久99日本精品| 日本丶国产丶欧美色综合| 久久久久久久久久久久久女国产乱| 欧美一级爆毛片| 91精品久久久久久久99蜜桃| 在线国产电影不卡| 精品视频一区二区三区免费| 欧美日韩国产一二三| 欧美亚洲另类激情小说| 88在线观看91蜜桃国自产| 色网站国产精品| 欧美亚洲动漫精品| jizz一区二区| 亚洲综合一区二区三区| 欧美日本在线观看| 麻豆国产91在线播放| 亚洲国产精品成人综合色在线婷婷| 99视频国产精品| 99久久99久久久精品齐齐| 日韩亚洲欧美成人一区| 亚洲大片在线观看| 激情亚洲综合在线| av在线不卡观看免费观看|