Marta Avramovic / CANlibrary

Dependents:   CAN_Library_Example Ekran CAN-library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CANadressID.h Source File

CANadressID.h

00001 #ifndef _CAN_IDADRESS_H_
00002 #define _CAN_IDADRESS_H_
00003 /*
00004  *  CANadreess.h sadrzi macro functions za svaki podatak:
00005  *      - ID sa kojeg se cita
00006  *      - poziciju u poruci
00007  * 
00008  *  Ovo se koristi pri funkciji: uint16_t get_data(char, char);
00009  *  - prvi argument je ID sa kojeg se cita
00010  *  - drugi argument je pozicija podatka u poruci
00011  *  Jedna CAN poruka moze da procita 4 podatka velicine 2B i pozicija koja je u
00012  *  opsegu od 0 do 3. 
00013  *
00014  *  Svaki novipodatak se "kaci" na CAN tako sto mu se upise ID i adresa ovde
00015  *
00016 */
00017 
00018 //MACRO potpis: ID,POS
00019 /*
00020 #define DTA1_RPM 8192,0
00021 #define DTA1_TPS 8192,1
00022 #define DTA1_WaterTemp 8192,2
00023 #define DTA1_AirTemp 8192,3
00024 
00025 #define DTA2_MAP 8193,0
00026 #define DTA2_Lambda 8193,1
00027 #define DTA2_Speed 8193,2
00028 #define DTA2_OilPres 8193,3
00029 
00030 #define DTA3_OilTemp 8194,1
00031 #define DTA3_Volts 8194,2
00032 
00033 #define DTA4_Gear 8195,0
00034 
00035 //#define DTA5_ 8196,0
00036 
00037 #define DTA6_Crank 8197,2
00038 */
00039 
00040 #define DTA1_RPM 0,0
00041 #define DTA1_TPS 0,1
00042 #define DTA1_WaterTemp 0,2
00043 #define DTA1_AirTemp 0,3
00044 
00045 #define DTA2_MAP 1,0
00046 #define DTA2_Lambda 1,1
00047 #define DTA2_Speed 1,2
00048 #define DTA2_OilPres 1,3
00049 
00050 #define DTA3_OilTemp 2,1
00051 #define DTA3_Volts 2,2
00052 
00053 #define DTA4_Gear 3,0
00054 
00055 //#define DTA5_ 4,0
00056 
00057 #define DTA6_Crank 5,2
00058 
00059 #define LVDT_FRONT_FLLVDT0 4096,0
00060 #define LVDT_FRONT_FLLVDT1 4096,1
00061 
00062 #define LVDT_REAR_RLLVDT0 4097,0
00063 #define LVDT_REAR_RLLVDT1 4097,1
00064 
00065 #define BRAKES 4097,0
00066 
00067 #endif