Speeduino
Loading...
Searching...
No Matches
comms_CAN.h
Go to the documentation of this file.
1#ifndef COMMS_CAN_H
2#define COMMS_CAN_H
3
4//For BMW e46/e39/e38, rover and mini other CAN instrument clusters
5#define CAN_BMW_ASC1 0x153 //Rx message from ACS unit that includes speed
6#define CAN_BMW_DME1 0x316 //Tx message that includes RPM
7#define CAN_BMW_DME2 0x329 //Tx message that includes CLT and TPS
8#define CAN_BMW_DME4 0x545 //Tx message that includes CLT and TPS
9#define CAN_BMW_ICL2 0x613
10#define CAN_BMW_ICL3 0x615
11
12//For VAG CAN instrument clusters
13#define CAN_VAG_RPM 0x280
14#define CAN_VAG_VSS 0x5A0
15
16//For Haltech IC-7 and IC-10 digital dashes
17#define CAN_HALTECH_DATA1 0x360 //RPM, MAP, TPS, Coolant Pressure. 50Hz
18#define CAN_HALTECH_DATA2 0x361 //Fuel Pressure, Oil Pressure, Load, Wastegate Pressure. 50Hz
19#define CAN_HALTECH_DATA3 0x362 //Advance, INJ Stage 1/2 duty cycles. 50Hz
20#define CAN_HALTECH_PW 0x364 //Pulsewidth 1-4. 50Hz
21#define CAN_HALTECH_LAMBDA 0x368 //Lambda 1-4. 20Hz
22#define CAN_HALTECH_TRIGGER 0x369 //Trigger Counter, sync level, sync error count. 20Hz
23#define CAN_HALTECH_VSS 0x370 //VSS, current gear and inlet cam angles. 20Hz
24#define CAN_HALTECH_DATA4 0x372 //Baro, BatteryV, Target boost. 10Hz
25#define CAN_HALTECH_DATA5 0x3E0 //IAT, CLT, Fuel Temp, Oil Temp. 10Hz
26
27#define CAN_BROADCAST_PROTOCOL_OFF 0
28#define CAN_BROADCAST_PROTOCOL_BMW 1
29#define CAN_BROADCAST_PROTOCOL_VAG 2
30#define CAN_BROADCAST_PROTOCOL_HALTECH 3
31
32
33#define CAN_WBO_RUSEFI 1
34#define CAN_WBO_AEM 2
35
36#define TS_CAN_OFFSET 0x100
37
38#if defined(NATIVE_CAN_AVAILABLE)
39
40void initCAN();
41int CAN_read();
42void CAN_write();
44void receiveCANwbo();
46void can_Command(void);
48void readAuxCanBus();
49
51extern CAN_message_t inMsg;
52
53#endif
54#endif // COMMS_CAN_H
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349