-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprogalgxcfp.h
44 lines (38 loc) · 1020 Bytes
/
progalgxcfp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* XCFxxP Flash PROM JTAG programming algorithms
*
* Copyright (C) 2010 Joris van Rantwijk
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#ifndef PROGALGXCFP_H
#define PROGALGXCFP_H
#include "bitfile.h"
#include "jtag.h"
#include "progalg.h"
class ProgAlgXCFP : public ProgAlg
{
private:
Jtag *jtag;
unsigned long idcode;
unsigned int narray;
unsigned int block_size;
virtual int erase(int array_mask);
public:
ProgAlgXCFP(Jtag &j, unsigned long id);
virtual ~ProgAlgXCFP() { }
virtual unsigned int getSize() const;
virtual int erase();
virtual int program(BitFile &file);
virtual int verify(BitFile &file);
virtual int read(BitFile &file);
virtual void reconfig();
virtual void disable();
private:
int verify_idcode();
void enable();
};
#endif //PROGALGXCFP_H