Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
t8utils.h
00001 00002 // t8utils.h - information and definitions needed for communicating with the T7 ECU 00003 00004 // (C) 2011, 2012 Sophie Dexter 00005 00006 #ifndef __T8UTILS_H__ 00007 #define __T8UTILS_H__ 00008 00009 #include "mbed.h" 00010 00011 #include "common.h" 00012 #include "canutils.h" 00013 00014 //#include "t8bootloaders.h" 00015 #include "gmlan.h" 00016 00017 00018 #define T8TSTRID 0x7E0 00019 #define T8ECU_ID 0x7E8 00020 #define T8ANYMSG 0x0 00021 00022 // initialise T8 00023 00024 //#define T8REQVIN {0x02,0x09,0x02,0x00,0x00,0x00,0x00,0x00} 00025 // Request VIN using ReadDataByIdentifier method using DID 00026 #define T8REQVIN {0x02,0x1A,0x90,0x00,0x00,0x00,0x00,0x00} 00027 00028 00029 // A "Flow Control" message. Send to let T8 it is OK to send the rest of the messages it has 00030 #define T8FLOCTL {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00} 00031 00032 00033 // read_trionic8 00034 00035 00036 // flash_trionic8 00037 00038 00039 #define T8MESSAGETIMEOUT 50 // 50 milliseconds (0.05 of a second) - Seems to be plenty of time to wait for messages on the CAN bus 00040 #define T8LONGERTIMEOUT 500 // 500 milliseconds (0.5 of a second) - Some messages seem to need longer 00041 #define T8CHECKSUMTIMEOUT 2000 // 2 seconds (2,000 milliseconds) - Usually takes less than a second so allowing 2 is plenty 00042 #define T8CONNECTTIMEOUT 5000 // 5 seconds (5,000 milliseconds) - Usually takes 3 seconds so allowing 5 is plenty 00043 #define T8ERASETIMEOUT 120000 // 120 seconds (120,000 milliseconds) - Usually takes less than 90 seconds so allowing 120 is plenty 00044 00045 extern bool t8_initialise(); 00046 extern bool t8_show_VIN(); 00047 extern bool t8_write_VIN(); 00048 extern bool t8_authenticate(uint32_t ReqID, uint32_t RespID, char level); 00049 extern bool t8_dump(); 00050 extern bool t8_flash(); 00051 extern bool t8_recover(); 00052 00053 00054 #endif
Generated on Thu Jul 14 2022 04:28:18 by
1.7.2