devices: simplify write RAM/Flash

This commit is contained in:
Gwenhael Goavec-Merou
2021-02-18 21:09:34 +01:00
parent 48e65fa0ad
commit 5f9a8835da
10 changed files with 37 additions and 37 deletions
+8
View File
@@ -2,6 +2,7 @@
#define DEVICE_HPP
#include <iostream>
#include <string>
#include "jtag.hpp"
@@ -18,11 +19,18 @@ class Device {
FLASH_MODE = 1,
MEM_MODE = 2
};
typedef enum {
WR_SRAM = 0,
WR_FLASH = 1
} prog_type_t;
Device(Jtag *jtag, std::string filename, int8_t verbose = false);
virtual ~Device();
virtual void program(unsigned int offset = 0) = 0;
virtual int idCode() = 0;
virtual void reset();
protected:
Jtag *_jtag;
std::string _filename;