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.
Diff: t7utils.h
- Revision:
- 4:682d96ff6d79
- Parent:
- 3:92dae9083c83
- Child:
- 6:2fbcbebed28c
--- a/t7utils.h Tue Jun 07 12:23:28 2011 +0000
+++ b/t7utils.h Wed Sep 11 11:55:51 2013 +0000
@@ -1,7 +1,7 @@
-// t5utils.h - information and definitions needed for communicating with the T5 ECU
+// t7utils.h - information and definitions needed for communicating with the T7 ECU
-// (C) 2011, Sophie Dexter
+// (C) 2011, 2012 Sophie Dexter
#ifndef __T7UTILS_H__
#define __T7UTILS_H__
@@ -16,6 +16,8 @@
#define T7SEC_ID 0x240
#define T7SEC_RX 0x258
#define T7ACK_ID 0x266
+#define T7ANYMSG 0x0
+
// initialise T7
@@ -42,6 +44,10 @@
#define T7FLAJP1A {0x41,0xA1,0x08,0x34,0x00,0x00,0x00,0x00} // Start = 0x000000
#define T7FLAJP1B {0x00,0xA1,0x08,0x00,0x00,0x00,0x00,0x00} // Length = 0x080000
+#define T7FLABINA {0x41,0xA1,0x08,0x34,0x00,0x00,0x00,0x00} // Start = 0x000000
+#define T7FLABINB {0x00,0xA1,0x07,0x00,0x00,0x00,0x00,0x00} // Length = 0x070000
+#define T7FLAHDRA {0x41,0xA1,0x08,0x34,0x07,0xFF,0x00,0x00} // Start = 0x07FF00
+#define T7FLAHDRB {0x00,0xA1,0x00,0x01,0x00,0x00,0x00,0x00} // Length = 0x000100
#define T7FLA_END {0x40,0xA1,0x01,0x37,0x00,0x00,0x00,0x00}
#define T7FLAEXIT {0x40,0xA1,0x02,0x31,0x54,0x00,0x00,0x00}
#define T7FLA_ACK {0x40,0xA1,0x3F,0x00,0x00,0x00,0x00,0x00} // 266h
@@ -50,12 +56,14 @@
#define T7MESSAGETIMEOUT 50 // 50 milliseconds (0.05 of a second) - Seems to be plenty of time to wait for messages on the CAN bus
#define T7LONGERTIMEOUT 500 // 500 milliseconds (0.5 of a second) - Some messages seem to need longer
#define T7CHECKSUMTIMEOUT 2000 // 2 seconds (2,000 milliseconds) - Usually takes less than a second so allowing 2 is plenty
+#define T7CONNECTTIMEOUT 5000 // 5 seconds (5,000 milliseconds) - Usually takes 3 seconds so allowing 5 is plenty
#define T7ERASETIMEOUT 40000 // 40 seconds (60,000 milliseconds) - Usually takes less than 20 seconds so allowing 40 is plenty
extern bool t7_initialise();
extern bool t7_authenticate();
extern bool t7_dump();
extern bool t7_flash();
+extern bool t7_flash_raw();
extern bool t7_erase();
/* global constants */
//#define init_msg { 0x3F, 0x81, 0x00, 0x11, 0x02, 0x40, 0x00, 0x00 }