#!/usr/bin/python # Copyright (C) 2007 Jan Luebbe # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from ocdfields import OCD, Field ocd = OCD() LCDCON1 = 0x4d000000 CLKVAL = Field(ocd, LCDCON1, 32, 8, 17) MMODE = Field(ocd, LCDCON1, 32, 7, 7) PNRMODE = Field(ocd, LCDCON1, 32, 5, 6) BPPMODE = Field(ocd, LCDCON1, 32, 1, 4) ENVID = Field(ocd, LCDCON1, 32, 0, 0) LCDCON2 = LCDCON1+4 VBPD = Field(ocd, LCDCON2, 32, 31, 24) LINEVAL = Field(ocd, LCDCON2, 32, 14, 23) VFPD = Field(ocd, LCDCON2, 32, 6, 13) VSPW = Field(ocd, LCDCON2, 32, 0, 5) LCDCON3 = LCDCON2+4 HBPD = Field(ocd, LCDCON3, 32, 19, 25) HOZVAL = Field(ocd, LCDCON3, 32, 8, 18) HFPD = Field(ocd, LCDCON3, 32, 0, 7) LCDCON4 = LCDCON3+4 MVAL = Field(ocd, LCDCON4, 32, 8, 15) HSPW = Field(ocd, LCDCON4, 32, 0, 7) LCDCON5 = LCDCON4+4 VSTATUS = Field(ocd, LCDCON5, 32, 15, 16) HSTATUS = Field(ocd, LCDCON5, 32, 13, 14) BPP24BL = Field(ocd, LCDCON5, 32, 12, 12) FRM565 = Field(ocd, LCDCON5, 32, 11, 11) INVVCLK = Field(ocd, LCDCON5, 32, 10, 10) INVVLINE = Field(ocd, LCDCON5, 32, 9, 9) INVVFRAME = Field(ocd, LCDCON5, 32, 8, 8) INVVD = Field(ocd, LCDCON5, 32, 7, 7) INVVDEN = Field(ocd, LCDCON5, 32, 6, 6) INVPWREN = Field(ocd, LCDCON5, 32, 5, 5) INVLEND = Field(ocd, LCDCON5, 32, 4, 4) PWREN = Field(ocd, LCDCON5, 32, 3, 3) ENLEND = Field(ocd, LCDCON5, 32, 2, 2) BSWP = Field(ocd, LCDCON5, 32, 1, 1) HWSWP = Field(ocd, LCDCON5, 32, 0, 0)