181dee67eSSudip Mukherjee #ifndef DDK750_POWER_H__ 281dee67eSSudip Mukherjee #define DDK750_POWER_H__ 381dee67eSSudip Mukherjee 4259fef35SJuston Li typedef enum _DPMS_t { 581dee67eSSudip Mukherjee crtDPMS_ON = 0x0, 681dee67eSSudip Mukherjee crtDPMS_STANDBY = 0x1, 781dee67eSSudip Mukherjee crtDPMS_SUSPEND = 0x2, 881dee67eSSudip Mukherjee crtDPMS_OFF = 0x3, 981dee67eSSudip Mukherjee } 1081dee67eSSudip Mukherjee DPMS_t; 1181dee67eSSudip Mukherjee 1281dee67eSSudip Mukherjee #define setDAC(off) \ 1381dee67eSSudip Mukherjee { \ 1481dee67eSSudip Mukherjee POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \ 1581dee67eSSudip Mukherjee MISC_CTRL, \ 1681dee67eSSudip Mukherjee DAC_POWER, \ 1781dee67eSSudip Mukherjee off)); \ 1881dee67eSSudip Mukherjee } 1981dee67eSSudip Mukherjee 2081dee67eSSudip Mukherjee void ddk750_setDPMS(DPMS_t); 2181dee67eSSudip Mukherjee 2281dee67eSSudip Mukherjee unsigned int getPowerMode(void); 2381dee67eSSudip Mukherjee 2481dee67eSSudip Mukherjee /* 2581dee67eSSudip Mukherjee * This function sets the current power mode 2681dee67eSSudip Mukherjee */ 2781dee67eSSudip Mukherjee void setPowerMode(unsigned int powerMode); 2881dee67eSSudip Mukherjee 2981dee67eSSudip Mukherjee /* 3081dee67eSSudip Mukherjee * This function sets current gate 3181dee67eSSudip Mukherjee */ 3281dee67eSSudip Mukherjee void setCurrentGate(unsigned int gate); 3381dee67eSSudip Mukherjee 3481dee67eSSudip Mukherjee /* 3581dee67eSSudip Mukherjee * This function enable/disable the 2D engine. 3681dee67eSSudip Mukherjee */ 3781dee67eSSudip Mukherjee void enable2DEngine(unsigned int enable); 3881dee67eSSudip Mukherjee 3981dee67eSSudip Mukherjee /* 4081dee67eSSudip Mukherjee * This function enable/disable the ZV Port 4181dee67eSSudip Mukherjee */ 4281dee67eSSudip Mukherjee void enableZVPort(unsigned int enable); 4381dee67eSSudip Mukherjee 4481dee67eSSudip Mukherjee /* 4581dee67eSSudip Mukherjee * This function enable/disable the DMA Engine 4681dee67eSSudip Mukherjee */ 4781dee67eSSudip Mukherjee void enableDMA(unsigned int enable); 4881dee67eSSudip Mukherjee 4981dee67eSSudip Mukherjee /* 5081dee67eSSudip Mukherjee * This function enable/disable the GPIO Engine 5181dee67eSSudip Mukherjee */ 5281dee67eSSudip Mukherjee void enableGPIO(unsigned int enable); 5381dee67eSSudip Mukherjee 5481dee67eSSudip Mukherjee /* 5581dee67eSSudip Mukherjee * This function enable/disable the PWM Engine 5681dee67eSSudip Mukherjee */ 5781dee67eSSudip Mukherjee void enablePWM(unsigned int enable); 5881dee67eSSudip Mukherjee 5981dee67eSSudip Mukherjee /* 6081dee67eSSudip Mukherjee * This function enable/disable the I2C Engine 6181dee67eSSudip Mukherjee */ 6281dee67eSSudip Mukherjee void enableI2C(unsigned int enable); 6381dee67eSSudip Mukherjee 6481dee67eSSudip Mukherjee /* 6581dee67eSSudip Mukherjee * This function enable/disable the SSP. 6681dee67eSSudip Mukherjee */ 6781dee67eSSudip Mukherjee void enableSSP(unsigned int enable); 6881dee67eSSudip Mukherjee 6981dee67eSSudip Mukherjee 7081dee67eSSudip Mukherjee #endif 71