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

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

?? can.h

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? H
字號:
//*****************************************************************************
//
// can.h - Defines and Macros for the CAN controller.
//
// Copyright (c) 2006-2007 Luminary Micro, Inc.  All rights reserved.
// 
// Software License Agreement
// 
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
// 
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  Any use in violation
// of the foregoing restrictions may subject the user to criminal sanctions
// under applicable laws, as well as to civil liability for the breach of the
// terms and conditions of this license.
// 
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 1408 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************

#ifndef __CAN_H__
#define __CAN_H__

#ifdef __cplusplus
extern "C"
{
#endif

//*****************************************************************************
//
//! \addtogroup can_api
//! @{
//
//*****************************************************************************

//*****************************************************************************
//
// Miscellaneous defines for Message ID Types
//
//*****************************************************************************

//*****************************************************************************
//
//! These are the flags used by the tCANMsgObject variable when calling the
//! the CANMessageSet() and CANMessageGet() APIs.
//
//*****************************************************************************
typedef enum
{
    //
    //! This indicates that transmit interrupts should be enabled, or are
    //! enabled.
    //
    MSG_OBJ_TX_INT_ENABLE =     0x00000001,

    //
    //! This indicates that receive interrupts should be enabled or are
    //! enabled.
    //
    MSG_OBJ_RX_INT_ENABLE =     0x00000002,

    //
    //! This indicates that a message object will use or is using an extended
    //! identifier.
    //
    MSG_OBJ_EXTENDED_ID =       0x00000004,

    //
    //! This indicates that a message object will use or is using filtering
    //! based on the object's message Identifier.
    //
    MSG_OBJ_USE_ID_FILTER =     0x00000008,

    //
    //! This indicates that new data was available in the message object.
    //
    MSG_OBJ_NEW_DATA =          0x00000080,

    //
    //! This indicates that data was lost since this message object was last
    //! read.
    //
    MSG_OBJ_DATA_LOST =         0x00000100,

    //
    //! This indicates that a message object will use or is using filtering
    //! based on the direction of the transfer. If the direction filtering is
    //! used then ID filtering must also be enabled.
    //
    MSG_OBJ_USE_DIR_FILTER =    (0x00000010 | MSG_OBJ_USE_ID_FILTER),

    //
    //! This indicates that a message object will use or is using message
    //! identifier filtering based of the the extended identifier.
    //! If the extended identifier filtering is used then ID filtering must
    //! also be enabled.
    //
    MSG_OBJ_USE_EXT_FILTER =    (0x00000020 | MSG_OBJ_USE_ID_FILTER),

    //
    //! This indicates that a message object is a remote frame.
    //
    MSG_OBJ_REMOTE_FRAME =      0x00000040,

    //
    //! This indicates that a message object has no flags set.
    //
    MSG_OBJ_NO_FLAGS =          0x00000000
}
tCANObjFlags;

//*****************************************************************************
//
//! This define is used with the #tCANObjFlags enumerated values to allow
//! checking only status flags and not configuration flags.
//
//*****************************************************************************
#define MSG_OBJ_STATUS_MASK     (MSG_OBJ_NEW_DATA | MSG_OBJ_DATA_LOST)

//*****************************************************************************
//
//! This structure used for encapsulating all the items associated with a CAN
//! message object in the CAN controller.
//
//*****************************************************************************
typedef struct
{
    //
    //! The CAN message identifier used for 11 or 29 bit identifiers.
    //
    unsigned long ulMsgID;

    //
    //! The message identifier mask used when identifier filtering is enabled.
    //
    unsigned long ulMsgIDMask;

    //
    //! This value holds various status flags and settings specified by
    //! tCANObjFlags.
    //
    unsigned long ulFlags;

    //
    //! This value is the number of bytes of data in the message object.
    //
    unsigned long ulMsgLen;

    //
    //! This is a pointer to the message object's data.
    //
    unsigned char *pucMsgData;
}
tCANMsgObject;

//*****************************************************************************
//
//! This structure is used for encapsulating the values associated with setting
//! up the bit timing for a CAN controller. The structure is used when calling
//! the CANGetBitTiming and CANSetBitTiming functions.
//
//*****************************************************************************
typedef struct
{
    //
    //! This value holds the sum of the Synchronization, Propagation, and Phase
    //! Buffer 1 segments, measured in time quanta.  The valid values for this
    //! setting range from 2 to 16.
    //
    unsigned int uSyncPropPhase1Seg;

    //
    //! This value holds the Phase Buffer 2 segment in time quanta. The valid
    //! values for this setting range from 1 to 8.
    //
    unsigned int uPhase2Seg;

    //
    //! This value holds the Resynchronization Jump Width in time quanta. The
    //! valid values for this setting range from 1 to 4.
    //
    unsigned int uSJW;

    //
    //! This value holds the CAN_CLK divider used to determine time quanta.
    //! The valid values for this setting range from 1 to 1023.
    //
    unsigned int uQuantumPrescaler;

}
tCANBitClkParms;

//*****************************************************************************
//
//! This data type is used to identify the interrupt status register.  This is
//! used when calling the a CANIntStatus() function.
//
//*****************************************************************************
typedef enum
{
    //
    //! Read the CAN interrupt status information.
    //
    CAN_INT_STS_CAUSE,

    //
    //! Read a message object's interrupt status.
    //
    CAN_INT_STS_OBJECT
}
tCANIntStsReg;

//*****************************************************************************
//
//! This data type is used to identify which of the several status registers
//! to read when calling the CANStatusGet() function.
//
//*****************************************************************************
typedef enum
{
    //
    //! Read the full CAN controller status.
    //
    CAN_STS_CONTROL,

    //
    //! Read the full 32 bit mask of message objects with a transmit request
    //! set.
    //
    CAN_STS_TXREQUEST,

    //
    //! Read the full 32 bit mask of message objects with a new data available.
    //
    CAN_STS_NEWDAT,

    //
    //! Read the full 32 bit mask of message objects that are enabled.
    //
    CAN_STS_MSGVAL
}
tCANStsReg;

//*****************************************************************************
//
//! These definitions are used to specify interrupt sources to CANIntEnable()
//! and CANIntDisable().
//
//*****************************************************************************
typedef enum
{
    //
    //! This flag is used to allow a CAN controller to generate error
    //! interrupts.
    //
    CAN_INT_ERROR =             0x00000008,

    //
    //! This flag is used to allow a CAN controller to generate status
    //! interrupts.
    //
    CAN_INT_STATUS =            0x00000004,

    //
    //! This flag is used to allow a CAN controller to generate any CAN
    //! interrupts. If this is not set then no interrupts will be generated by
    //! the CAN controller.
    //
    CAN_INT_MASTER =            0x00000002
}
tCANIntFlags;

//*****************************************************************************
//
//! This definition is used to determine the type of message object that will
//! be set up via a call to the CANMessageSet() API.
//
//*****************************************************************************
typedef enum
{
    //
    //! Transmit message object.
    //
    MSG_OBJ_TYPE_TX,

    //
    //! Transmit remote request message object
    //
    MSG_OBJ_TYPE_TX_REMOTE,

    //
    //! Receive message object.
    //
    MSG_OBJ_TYPE_RX,

    //
    //! Receive remote request message object.
    //
    MSG_OBJ_TYPE_RX_REMOTE,

    //
    //! Remote frame receive remote, with auto-transmit message object.
    //
    MSG_OBJ_TYPE_RXTX_REMOTE
}
tMsgObjType;

//*****************************************************************************
//
//! The following enumeration contains all error or status indicators that
//! can be returned when calling the CANStatusGet() API.
//
//*****************************************************************************
typedef enum
{
    //
    //! CAN controller has entered a Bus Off state.
    //
    CAN_STATUS_BUS_OFF =        0x00000080,

    //
    //! CAN controller error level has reached warning level.
    //
    CAN_STATUS_EWARN =          0x00000040,

    //
    //! CAN controller error level has reached error passive level.
    //
    CAN_STATUS_EPASS =          0x00000020,

    //
    //! A message was received successfully since the last read of this status.
    //
    CAN_STATUS_RXOK =           0x00000010,

    //
    //! A message was transmitted successfully since the last read of this
    //! status.
    //
    CAN_STATUS_TXOK =           0x00000008,

    //
    //! This is the mask for the last error code field.
    //
    CAN_STATUS_LEC_MSK =        0x00000007,

    //
    //! There was no error.
    //
    CAN_STATUS_LEC_NONE =       0x00000000,

    //
    //! A bit stuffing error has occurred.
    //
    CAN_STATUS_LEC_STUFF =      0x00000001,

    //
    //! A formatting error has occurred.
    //
    CAN_STATUS_LEC_FORM =       0x00000002,

    //
    //! An acknowledge error has occurred.
    //
    CAN_STATUS_LEC_ACK =        0x00000003,

    //
    //! The bus remained a bit level of 1 for longer than is allowed.
    //
    CAN_STATUS_LEC_BIT1 =       0x00000004,

    //
    //! The bus remained a bit level of 0 for longer than is allowed.
    //
    CAN_STATUS_LEC_BIT0 =       0x00000005,

    //
    //! A CRC error has occurred.
    //
    CAN_STATUS_LEC_CRC =        0x00000006,

    //
    //! This is the mask for the CAN Last Error Code (LEC).
    //
    CAN_STATUS_LEC_MASK =       0x00000007
}
tCANStatusCtrl;

//*****************************************************************************
//
// API Function prototypes
//
//*****************************************************************************
extern void CANInit(unsigned long ulBase);
extern void CANEnable(unsigned long ulBase);
extern void CANDisable(unsigned long ulBase);
extern void CANSetBitTiming(unsigned long ulBase, tCANBitClkParms *pClkParms);
extern void CANGetBitTiming(unsigned long ulBase, tCANBitClkParms *pClkParms);
extern unsigned long CANReadReg(unsigned long ulRegAddress);
extern void CANWriteReg(unsigned long ulRegAddress, unsigned long ulRegValue);
extern void CANMessageSet(unsigned long ulBase, unsigned long ulObjID,
                          tCANMsgObject *pMsgObject, tMsgObjType eMsgType);
extern void CANMessageGet(unsigned long ulBase, unsigned long ulObjID,
                          tCANMsgObject *pMsgObject, tBoolean bClrPendingInt);
extern unsigned long CANStatusGet(unsigned long ulBase, tCANStsReg eStatusReg);
extern void CANMessageClear(unsigned long ulBase, unsigned long ulObjID);
extern void CANIntRegister(unsigned long ulBase, void (*pfnHandler)(void));
extern void CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags);
extern void CANIntDisable(unsigned long ulBase, unsigned long ulIntFlags);
extern void CANIntClear(unsigned long ulBase, unsigned long ulIntClr);
extern unsigned long CANIntStatus(unsigned long ulBase,
                                  tCANIntStsReg eIntStsReg);
extern tBoolean CANRetryGet(unsigned long ulBase);
extern void CANRetrySet(unsigned long ulBase, tBoolean bAutoRetry);
extern tBoolean CANErrCntrGet(unsigned long ulBase, unsigned long *pulRxCount,
                              unsigned long *pulTxCount);
extern long CANGetIntNumber(unsigned long ulBase);
extern void CANReadDataReg(unsigned char *pucData, unsigned long *pulRegister,
                           int iSize);
extern void CANWriteDataReg(unsigned char *pucData, unsigned long *pulRegister,
                            int iSize);

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

#ifdef __cplusplus
}
#endif

#endif //  __CAN_H__

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美吞精做爰啪啪高潮| 欧美日韩国产精品自在自线| 91精品国产高清一区二区三区| 亚洲精品乱码久久久久久黑人| 91官网在线免费观看| 亚洲成av人在线观看| 日韩亚洲欧美中文三级| 国内外精品视频| 国产精品美日韩| 欧美性极品少妇| 久久99久久精品| 国产欧美久久久精品影院| 波多野结衣91| 亚洲成va人在线观看| 欧美成人a在线| 成人午夜精品在线| 亚洲电影一区二区三区| 91精品国产福利| 成人aa视频在线观看| 亚洲va国产va欧美va观看| 欧美xfplay| av成人免费在线观看| 亚洲国产成人porn| 国产亚洲精久久久久久| 欧美午夜片在线看| 国产麻豆精品95视频| 依依成人综合视频| 欧美成人免费网站| 色妞www精品视频| 精品一区二区三区欧美| 亚洲欧洲成人精品av97| 欧美日韩你懂得| 国产成人av资源| 日本欧美一区二区| 最新久久zyz资源站| 日韩久久精品一区| 色综合久久中文字幕| 韩国v欧美v亚洲v日本v| 一区二区三区免费在线观看| 精品国产sm最大网站免费看| 99久久婷婷国产| 国产在线日韩欧美| 性久久久久久久久久久久| 久久久99久久| 337p亚洲精品色噜噜噜| 91香蕉视频在线| 国产成人综合亚洲91猫咪| 午夜国产精品一区| 国产精品久久久久久久第一福利| 欧美一二三区精品| 欧美三级电影网| 91蝌蚪porny成人天涯| 国产一区二区精品久久91| 天堂成人免费av电影一区| 国产精品国产三级国产aⅴ入口| 日韩亚洲欧美在线观看| 欧美日韩在线亚洲一区蜜芽| 99久久国产综合精品色伊| 国产精品77777| 美女视频网站久久| 日韩在线一区二区三区| 亚洲妇熟xx妇色黄| 亚洲免费成人av| **欧美大码日韩| 亚洲天堂福利av| 欧美国产亚洲另类动漫| 久久九九国产精品| 久久免费电影网| 2022国产精品视频| 久久这里只有精品视频网| 欧美一区二区三区四区五区| 欧美性色黄大片| 欧美日韩国产美女| 欧美日韩国产影片| 欧美精品在线视频| 欧美人伦禁忌dvd放荡欲情| 欧洲精品中文字幕| 91丨九色丨蝌蚪富婆spa| 99re热这里只有精品视频| 99热99精品| 91美女片黄在线| 在线观看av一区二区| 欧美日韩国产一二三| 欧美伦理视频网站| 91精品在线观看入口| 日韩欧美一二区| 久久这里只精品最新地址| 久久久精品影视| 国产精品嫩草影院com| 国产精品电影一区二区| 国产精品大尺度| 亚洲香肠在线观看| 男人的天堂久久精品| 精品一区二区三区蜜桃| 高清成人免费视频| 播五月开心婷婷综合| 色婷婷综合视频在线观看| 欧美视频一区二区三区| 91精品福利在线一区二区三区| 日韩欧美电影一二三| 国产蜜臀97一区二区三区| 亚洲欧洲性图库| 亚洲国产三级在线| 久草这里只有精品视频| 高清不卡一区二区| 欧美三区在线观看| 久久综合九色综合97_久久久| 国产欧美日韩精品一区| 一个色妞综合视频在线观看| 日本强好片久久久久久aaa| 国产精品中文有码| 91福利区一区二区三区| 日韩欧美一二三四区| 国产精品福利在线播放| 天堂成人免费av电影一区| 国产精品一二二区| 91成人免费在线视频| 26uuu亚洲婷婷狠狠天堂| 亚洲丝袜美腿综合| 美女一区二区三区在线观看| 99精品视频在线观看| 7777精品伊人久久久大香线蕉| 久久久99精品久久| 天堂午夜影视日韩欧美一区二区| 国产一区二区三区四区五区美女| 99国产精品久久久久| 欧美xxx久久| 一区二区三区精品视频| 国产酒店精品激情| 欧美日韩精品欧美日韩精品一综合| 久久这里都是精品| 午夜av一区二区三区| 粉嫩欧美一区二区三区高清影视| 8v天堂国产在线一区二区| 亚洲欧洲一区二区在线播放| 久久er精品视频| 欧美日韩专区在线| 1区2区3区精品视频| 国产米奇在线777精品观看| 欧美精品高清视频| 亚洲三级电影网站| 国产成人在线电影| 日韩精品自拍偷拍| 亚洲一级二级三级在线免费观看| 国产v综合v亚洲欧| 精品日韩成人av| 热久久国产精品| 欧美日韩高清影院| 亚洲精品ww久久久久久p站| 成人免费观看av| 国产亚洲精品中文字幕| 精品在线免费观看| 日韩一区二区在线免费观看| 亚洲电影视频在线| 欧洲一区二区av| 亚洲免费av高清| 91蝌蚪porny成人天涯| 国产精品毛片高清在线完整版| 国产一区二区三区蝌蚪| 欧美videos中文字幕| 日本视频一区二区三区| 制服丝袜亚洲播放| 丝袜美腿高跟呻吟高潮一区| 欧美网站一区二区| 亚洲成a人片综合在线| 欧美系列日韩一区| 亚洲综合一二区| 欧美视频三区在线播放| 亚洲国产日韩精品| 91.com视频| 久久er99精品| 久久嫩草精品久久久精品| 国产一区二区调教| 国产欧美va欧美不卡在线| 国产精品一二三区在线| 国产色产综合色产在线视频| 福利电影一区二区| 中文字幕在线不卡一区| 91在线你懂得| 亚洲电影你懂得| 欧美一激情一区二区三区| 久久99国产精品成人| 久久精品一区八戒影视| 不卡的av电影在线观看| 自拍偷拍亚洲综合| 欧美综合欧美视频| 性久久久久久久| 亚洲精品一区二区精华| 国产成人亚洲精品狼色在线| 国产精品高潮呻吟久久| 欧美亚洲禁片免费| 捆绑变态av一区二区三区| 久久久久久久久久久久久女国产乱 | 亚洲成av人片在线观看无码| 欧美一区二区在线免费播放| 国产综合色在线| 亚洲视频中文字幕| 欧美一区二区三区在线电影| 狠狠色狠狠色综合系列| 亚洲天堂久久久久久久|