mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-09-04 08:34:04 +02:00
xilinx: implement spiInterface and pass this instead of jtag to spiFlash class
This commit is contained in:
+11
-1
@@ -1,11 +1,14 @@
|
||||
#ifndef XILINX_HPP
|
||||
#define XILINX_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "bitparser.hpp"
|
||||
#include "device.hpp"
|
||||
#include "jtag.hpp"
|
||||
#include "spiInterface.hpp"
|
||||
|
||||
class Xilinx: public Device {
|
||||
class Xilinx: public Device, SPIInterface {
|
||||
public:
|
||||
Xilinx(Jtag *jtag, std::string filename, bool verbose);
|
||||
~Xilinx();
|
||||
@@ -15,6 +18,13 @@ class Xilinx: public Device {
|
||||
void program_mem(BitParser &bitfile);
|
||||
int idCode();
|
||||
void reset();
|
||||
|
||||
/* spi interface */
|
||||
int spi_put(uint8_t cmd, uint8_t *tx, uint8_t *rx,
|
||||
uint16_t len) override;
|
||||
int spi_put(uint8_t *tx, uint8_t *rx, uint16_t len) override;
|
||||
int spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond,
|
||||
uint32_t timeout, bool verbose = false) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user