#ifndef INTERFACE_H #define INTERFACE_H #include #include #include #include "serial2.h" #define TIMER 0x0a000004 #define PARAMETER 0x0a000008 FILE* fropen(char *filename); FILE* fwopen(char *filename); void makeCommand(char c, int a, int d, unsigned char* command); int toInt( unsigned char *inBuf ); inline int getFinishStatus(CSerial2 *s); void startExecution(CSerial2 *s); void waitForFPGA(CSerial2 *s); int getExecutionTime(CSerial2 *s); void exitFPGA(CSerial2 *s); void writeBytes(unsigned char *outBuf, int nBytes, int address, CSerial2 *s); void readBytes(unsigned char *inBuf, int nBytes, int address, CSerial2 *s); void writeInt32(int *outBuf, int words, int address, CSerial2 *s); void readInt32(int *inBuf, int words, int address, CSerial2 *s); void writeRegister(int value, int address, CSerial2 *s); int readRegister(int address, CSerial2 *s); #endif