?? sja1000.h
字號:
/* SJA1000.h - definitions for Phillips SJA1000 CAN Controller *//* Copyright 2001 Wind River Systems, Inc. *//* modification history --------------------09nov01,dnb modified for integration into Tornado12jul01,jac written*//* DESCRIPTIONThis file contains the functions declarations, specific to the Phillips SJA1000 CAN controller, that implement the interface defined in the windnet_can.h header file. */#ifndef SJA1000_H_#define SJA1000_H_/* mode register bits */#define MOD_RM 0x01#define MOD_LOM 0x02#define MOD_STM 0x04#define MOD_AFM 0x08#define MOD_SM 0x10/* command register bits */#define CMR_TR 0x01#define CMR_AT 0x02#define CMR_RRB 0x04#define CMR_CDO 0x08#define CMR_SRR 0x10/* status register bits */#define SR_RBS 0x01#define SR_DOS 0x02#define SR_TBS 0x04#define SR_TCS 0x08#define SR_RS 0x10#define SR_TS 0x20#define SR_ES 0x40#define SR_BS 0x80/* interrupt register bits */#define IR_RI 0x01#define IR_TI 0x02#define IR_EI 0x04#define IR_DOI 0x08#define IR_WUI 0x10#define IR_EPI 0x20#define IR_ALI 0x40#define IR_BEI 0x80/* interrupt enable register bits */#define IER_RIE 0x01#define IER_TIE 0x02#define IER_EIE 0x04#define IER_DOIE 0x08#define IER_WUIE 0x10#define IER_EPIE 0x20#define IER_ALIE 0x40#define IER_BEIE 0x80/* error code capture register */#define ECC_SEG0 0x01#define ECC_SEG1 0x02#define ECC_SEG2 0x04#define ECC_SEG3 0x08#define ECC_SEG4 0x10#define ECC_DIR 0x20#define ECC_ERRC0 0x40#define ECC_ERCC1 0x80/* max number of message objects for sja1000 */#define SJA1000_MAX_MSG_OBJ 2/* sja1000 channel types */#define TX_CHN_NUM 0#define RX_CHN_NUM 1extern const UINT g_sja1000chnType[SJA1000_MAX_MSG_OBJ];struct TxMsg{ ULONG id; BOOL ext; BOOL rtr; UCHAR len; UCHAR data[8];};void sja1000ISR(ULONG context);#endif /* SJA1000_H_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -