⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 can.h

📁 用于城市轨道交通开发的CBTR 的开发
💻 H
字号:
#define CAN_PORT0    0x50000			//ATP2
#define CAN_PORT1    0x20000		// ATP1
#define CAN_PORT2    0x30000		// 
#define CAN_PORT3    0x40000		// 人机
#define	FLASH_PORT   0x70000		//板上flash
#define	CF_PORT    	 0x80000		//CF
#define	FPGA_PORT    0x10000		//FPGA

#define OFFSET_CAN_CONTROL      0x00
#define OFFSET_CAN_STATUS       0x01
#define OFFSET_CAN_CPUREG       0x02
#define OFFSET_CAN_HIGHSPEED    0x04
#define OFFSET_CAN_MASKSHORT    0x06
#define OFFSET_CAN_MASKLONG     0x08
#define OFFSET_CAN_MASKLASTMSG  0x0C
#define OFFSET_CAN_MESSAGE1     0x10
#define OFFSET_CAN_CLOCKOUT     0x1F
#define OFFSET_CAN_MESSAGE2     0x20
#define OFFSET_CAN_BUSCONFIG    0x2F
#define OFFSET_CAN_MESSAGE3     0x30
#define OFFSET_CAN_TIMING0      0x3F
#define OFFSET_CAN_MESSAGE4     0x40
#define OFFSET_CAN_TIMING1      0x4F
#define OFFSET_CAN_MESSAGE5     0x50
#define OFFSET_CAN_INTERRUPT    0x5F
#define OFFSET_CAN_MESSAGE6     0x60
#define OFFSET_CAN_MESSAGE7     0x70
#define OFFSET_CAN_MESSAGE8     0x80
#define OFFSET_CAN_MESSAGE9     0x90
#define OFFSET_CAN_P1CONFIG     0x9F
#define OFFSET_CAN_MESSAGE10    0xA0
#define OFFSET_CAN_P2CONFIG     0xAF
#define OFFSET_CAN_MESSAGE11    0xB0
#define OFFSET_CAN_P1IN         0xBF
#define OFFSET_CAN_MESSAGE12    0xC0
#define OFFSET_CAN_P2IN         0xCF
#define OFFSET_CAN_MESSAGE13    0xD0
#define OFFSET_CAN_P1OUT        0xDF
#define OFFSET_CAN_MESSAGE14    0xE0
#define OFFSET_CAN_P2OUT        0xEF
#define OFFSET_CAN_MESSAGE15    0xF0
#define OFFSET_CAN_SPI          0xFF

#define OBJECT_CONTR0     0x00
#define OBJECT_CONTR1     0x01
#define OBJECT_ARBITRAT0  0x02
#define OBJECT_ARBITRAT1  0x03
#define OBJECT_ARBITRAT2  0x04
#define OBJECT_ARBITRAT3  0x05
#define OBJECT_MESSCONF   0x06
#define OBJECT_DATA       0x07

#define CAN_S_MASTER      0x01
#define CAN_S_TRACK       0x03
#define CAN_S_RECORD      0x06
#define CAN_S_INTERFACE   0x05

#define OFFSET_FLASH_DIR    0x07
#define OFFSET_FLASH_READ    0x03
#define OFFSET_FLASH_FPGA    	0x02
#define OFFSET_FLASH_IO    		0x04
#define COMMAND_FLASH_DATA    0x14
#define COMMAND_FLASH_ADDR    0x84
#define COMMAND_FLASH_READ    0x04


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -