ts-7000
[Top] [All Lists]

[ts-7000] TS-7260 DIO with 2.6.21-ts kernel

To:
Subject: [ts-7000] TS-7260 DIO with 2.6.21-ts kernel
From: "Rekcut_Nod" <>
Date: Wed, 31 Aug 2011 17:34:37 -0000
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/

<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