initial commit

This commit is contained in:
Gwenhael Goavec-Merou
2019-09-26 18:29:20 +02:00
parent 62af4cd266
commit 4530942e17
22 changed files with 2836 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#ifndef DEVICE_HPP
#define DEVICE_HPP
#include <iostream>
#include "ftdijtag.hpp"
/* GGM: TODO: program must have an optional
* offset
* and question: bitstream to load bitstream in SPI mode must
* be hardcoded or provided by user?
*/
class Device {
public:
enum prog_mode {
NONE_MODE = 0,
SPI_MODE,
MEM_MODE
};
Device(FtdiJtag *jtag, enum prog_mode, std::string filename);
virtual void program();
int idCode();
void reset();
protected:
FtdiJtag *_jtag;
std::string _filename;
enum prog_mode _mode;
};
#endif