00001
00002 #ifndef FPGA_CLOCK_IOCTYPE
00003
00004
00005 #define FPGA_CLOCK_IOCTYPE 131 // same as major
00006 #define FPGA_CLOCK_IOCTYPE_RD 135 // read clock frequency (now - just shadow)
00007
00008
00009
00010 #define FPGA_CLOCK_I2C_WRITEREG 0x1
00011 #define FPGA_CLOCK_I2C_READREG 0x2
00012 #endif
00013
00014 #ifndef I2C_ARGVALUE
00015
00016
00017
00018
00019 #define I2C_ARGBUS(arg) (((arg) >> 24) & 0x1)
00020 #define I2C_ARGSLAVE(arg) (((arg) >> 16) & 0xff)
00021 #define I2C_ARGREG(arg) (((arg) >> 8) & 0xff)
00022 #define I2C_ARGVALUE(arg) ((arg) & 0xff)
00023 #endif
00024
00025 #ifndef ERR_I2C_SCL_ST0
00026 #define ERR_I2C_SCL_ST0 1
00027 #define ERR_I2C_SDA_ST0 2
00028 #define ERR_I2C_SCL_ST1 4
00029 #define ERR_I2C_SDA_ST1 8
00030 #define ERR_I2C_SCL_NOPULLUP 16
00031 #define ERR_I2C_SDA_NOPULLUP 32
00032
00033
00034 #define ERR_I2C_NOTDETECTED 64
00035 #define ERR_I2C_SHORT 128
00036 #define ERR_I2C_BSY 256
00037 #define ERR_I2C_NACK 512
00038 #endif