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: BaseEmuISP.h
- Revision:
- 3:ccc673a10485
- Parent:
- 2:e3c085ac77f1
- Child:
- 4:05f33cc747fd
diff -r e3c085ac77f1 -r ccc673a10485 BaseEmuISP.h
--- a/BaseEmuISP.h Sat Mar 12 09:34:38 2016 +0900
+++ b/BaseEmuISP.h Tue Mar 22 16:25:41 2016 +0900
@@ -1,9 +1,11 @@
-// BaseEmuISP.h 2016/3/10
+// BaseEmuISP.h 2016/3/22
#pragma once
#include <string>
#include <vector>
+#include <stdint.h>
typedef std::vector<int> vint_t;
+typedef std::vector<uint8_t> vbyte_t;
enum Mode_t {
M_RESET = 0,
@@ -46,10 +48,12 @@
void Poll();
protected:
+ virtual int BootCodeVersion() { return 4<<8|13; } // 4.13
virtual int PartID() { return 0x00008100; } // LPC810M021FN8
- virtual void WriteData(int addr, int c) {}
+ virtual bool UuencodeMode() { return false; }
+ virtual bool WriteData(int addr, int c) { return false; }
virtual int ReadData(int addr) { return 0; }
- virtual void CopyData(int dst, int src, int count) {}
+ virtual bool CopyData(int dst, int src, int count) { return false; }
virtual bool Compare(int addr1, int addr2, int count) { return true; }
virtual bool Prepare(int sector) { return true; }
virtual bool Erase(int sector) { return true; }
@@ -76,6 +80,8 @@
ReturnCode_t cmd_m(vint_t ¶m);
ReturnCode_t cmd_n(vint_t ¶m);
ReturnCode_t cmd_s(vint_t ¶m);
+ bool cmd_w_data();
+ bool cmd_r_data();
void putln(const char *s);
bool line_proc();
void debugPrintf(const char *format, ...);
@@ -86,6 +92,13 @@
std::string line;
int freq;
int addr;
- int count;
+ int dataLine;
+ int dataCount;
+ int dataCurrent;
+ int dataCksum;
+ struct {
+ uint8_t major;
+ uint8_t minor;
+ } version;
};