Rev 12 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef PtsModule__H_
#define PtsModule__H_
#define BYTE_PER_DOT 8192
#define ADR_CSR0 0x00 // D[1] LEDTEST; D[0] RESET
#define ADR_CLK 0x04 // D[15:12] CLKOUT1; D[11:8] CLKOUT0;
// D[7:4] SCLK; D[3:0] PCLK
#define ADR_VMECLK 0x08 // D[3] CLKOUT1; D[2] CLKOUT0;
// D[1] SCLK; D[0] PCLK
#define ADR_BUSA_REG 0x10
#define ADR_BUSA_IN 0x14
#define ADR_BUSA_DIR 0x18 // D[9:8] BUSA;
#define ADR_CFG 0x40
#define ADR_CSR1 0x44 // D[8] DONE; D[1] VCS_; D[0] PROGRAM_
#define ADR_MODE 0x48
#define ADR_SYSRESET 0xfc // write D=0 to sysreset
#define CSR1_PROGRAM_ 0x1
#define CSR1_VCS_ 0x2
#define CSR1_DONE 0x100
#define SELECTMAP_MODE 2
#define SLAVESERIAL_MODE 3
int Pts_erase(int);
// int Pts_configure( const char *filename, int mode=SLAVESERIAL_MODE,
// int Pts_configure(const char *, int, int );
int Pts_configure_bit(const char *, int, int);
// int Pts_configure_rbt(const char *, int, int);
int Pts_check_configure(int);
int Pts_reset(int);
#define PTSADDR 0x50000000
//#define Pts_write(VME,DATA) VME_write_32(udev,Ext_NoPriv_Data,PTSADDR+(VME),(DATA))
//#define Pts_read(VME,DATA) VME_read_32(udev,Ext_NoPriv_Data,PTSADDR+(VME),(DATA))
#endif