ts-7000
[Top] [All Lists]

[ts-7000] Re: Ts- 7260 LCD Power

To:
Subject: [ts-7000] Re: Ts- 7260 LCD Power
From: "slkiri88" <>
Date: Sat, 13 Jan 2007 04:12:46 -0000
Here is the code that I am using... It works for turning the LCD 
power off but I am not able to turn it back on unless i reboot.. any 
help on this will help.. 

thanks

Here is the code that I have


#define PADR    0

volatile unsigned int *pheader;


power = (unsigned int *)mmap(0, getpagesize(), 
      PROT_READ|PROT_WRITE, MAP_SHARED, fd, POWERBASE);

pheader = &power[PADR];


void lcdPowerOff(void) { 
    unsigned char temp = *pheader;
    unsigned char temp2;
    printf("Value before power off %d",temp);
    temp2 = *pheader & 0xfb;
    *pheader = temp2;
    printf("Value after powering off %d",temp2); 

}

void lcdPowerOn(void) {
    unsigned char temp = *pheader;
    printf("Value before power on %d",temp);
    *pheader = 0x0f;
    unsigned char temp2 = *pheader;
    printf("Value after powering on %d",temp2); 
}












--- In  "kendwyer" <> wrote:
>
> Hi,
> 
> If you are not using peek8 etc and are using C code to access the
> power management register make sure you use 8bit read and write 
accesses. 
> 
> For example:
> 
> ....
> .......
> 
> unsigned char *dat, *start;
> unsigned char *PSREGc;
> 
> int fd1 = open("/dev/mem", O_RDWR);
> start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED,fd1,
> 0x12000000);
> dat = start; // read the register at addr
> printf("Power Saving Register read data = 0x%x\n",*dat);
> 
> PSREGc = start;
>  
> *PSREGc = 0x09 ; // write to Power Saving Register, turn off USB and
> LCD 5V supply
> dat = start; // read the Power Saving Register
> printf("Power Saving Register read data = 0x%x\n",*dat);
> 
> *PSREGc = 0x0f ; // write to Power Saving Register, turn on USB and
> LCD 5V supply
> dat = start; // read the Power Saving Register
> printf("Power Saving Register read data = 0x%x\n",*dat);
> 
> close(fd1);
> 
> ....
> .....
> 
> 
> Ken
> 
> 
> --- In  Eddie Dawydiuk <eddie@> wrote:
> >
> > Hello,
> > 
> > > My problem I am trying to use the power management option on 
the LCD's
> > > I tried following the data sheet. The problem I am encountering 
is
> that
> > > the LCD powers of, but it doesn't power on when its set to do 
so. when
> > > you change bit 2 of the register to 0 all other bits change to 
zero as
> > > well.
> > 
> > I'm unable to reproduce this, could you post some code 
demonstrating
> > this?
> > 
> > e.g.
> > 
> >   $ peek8 0x12000000
> >   0x7
> >   $ poke8 0x12000000 0x3
> >   $ peek8 0x12000000
> >   0x3
> >   $ poke8 0x12000000 0x7
> >   $ peek8 0x12000000
> >   0x7
> >   $
> > 
> > //Eddie
> >
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU