Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# cy22150.h

    00001
    00002 #ifndef CY22150_H
    00003 #define CY22150_H
    00004
    00005 #include "global.h"
    00006
    00007 // device base address
    00008 #define CY22150_I2C_ADDR        0xD2
    00009
    00010 // device registers
    00011 #define CY22150_REG_CLKOE       0x09
    00012 #define CY22150_REG_DIV1        0x0C
    00013 #define CY22150_REG_XDRV        0x12
    00014 #define CY22150_REG_CAPLOAD     0x13
    00015 #define CY22150_REG_PBHI        0x40
    00016 #define CY22150_REG_PBLO        0x41
    00017 #define CY22150_REG_QCNT        0x42
    00018 #define CY22150_REG_MATRIX1     0x44
    00019 #define CY22150_REG_MATRIX2     0x45
    00020 #define CY22150_REG_MATRIX3     0x46
    00021 #define CY22150_REG_DIV2        0x47
    00022
    00023 // possible pin/led states
    00024 #define PCA9532_LED_OFF         0
    00025 #define PCA9532_LED_ON          1
    00026 #define PCA9532_LED_DIM0        2
    00027 #define PCA9532_LED_DIM1        3
    00028
    00029 void cy22150Init(void);
    00030 void cy22150WriteReg(u08 addr, u08 data);
    00031 u08 cy22150ReadReg(u08 addr);
    00032
    00033 void cy22150SetDiv(u08 divreg, u08 div);
    00034 void cy22150SetOutput(u08 clkpin, u08 enable);
    00035 void cy22150SetQ(int q);
    00036 void cy22150SetP(int p);
    00037
    00038
    00039 #endif