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:
- 6:2fbcbebed28c
- Parent:
- 4:682d96ff6d79
--- a/t7utils.h Sat Apr 25 17:07:08 2015 +0000
+++ b/t7utils.h Sat Apr 23 18:31:40 2016 +0000
@@ -42,6 +42,8 @@
// flash_trionic7
+#define T7FLASTRT {0x41,0xA1,0x08,0x34,0x00,0x00,0x00,0x00} // Start = 0x000000
+#define T7FLASIZE {0x00,0xA1,0x00,0x00,0x00,0x00,0x00,0x00} // Length = 0x000000
#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
@@ -57,14 +59,17 @@
#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
+#define T7ERASETIMEOUT 40000 // 40 seconds (40,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 FILE * t7_file_open(const char* fname);
+extern bool t7_dump(bool blockmode);
extern bool t7_erase();
+extern bool t7_flash(FILE *, bool blockmode);
+extern bool t7_recover(FILE *);
+bool t7_flash_segment(FILE *, uint32_t address, uint32_t size, bool blockmode);
+extern bool t7_reset();
/* global constants */
//#define init_msg { 0x3F, 0x81, 0x00, 0x11, 0x02, 0x40, 0x00, 0x00 }