If I run a little utility (see below) to read and write to the memory register
corresponding to the DIO data on the DIO1 header of the TS-7260 board, I get
different results depending upon whether I'm running the TS stock 2.4 kernel,
or their (unsupported) 2.6.21-ts kernel. Has anyone experienced this? Has
anyone found a way to get the DIO lines to work with the 2.6 kernel?
Any assistance is greatly appreciated!
Don
utility source:
int main(int argc, char **argv)
{
volatile unsigned char *PBDR, *PBDDR;
unsigned char *start, ONE=0x1;
int fd = open("/dev/mem", O_RDWR|O_SYNC);
int i;
start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
0x80840000);
PBDR = (unsigned char *)(start + 0x04); // port b
PBDDR = (unsigned char *)(start + 0x14); // port b direction register
*PBDDR = 0xff;// all output
for(i=0;i<8;i++)
{
*PBDR = ONE<<i;
printf("*PBDR=%02x\n",*PBDR);
sleep(2);
}
close(fd);
return 0;
}
Results, with DIO_4 (pin 9) grounded:
2.4 kernel:
PBDR=01
PBDR=02
PBDR=04
PBDR=08
PBDR=00
PBDR
PBDR=40
PBDR=80
2.6 kernel:
PBDR=0f
PBDR=0f
PBDR=0f
PBDR=0f
PBDR=0f
PBDR=2f
PBDR=4f
PBDR=8f
------------------------------------
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/
|