On Thu, 1 Jun 2006, pdaderko wrote:
> I'm basing my code on button.c, where for interfacing with DIO1 I use:
> start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> 0x80840000);, PBDR = (unsigned char *)(start + 0x04);, and PBDDR =
> (unsigned char *)(start + 0x14);, then the usual setting of the data
> and direction regs.
>
> For DIO2, from the manual/memory map, I believe I should do: start =
> mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> 0x12C00000);, PBDR = (unsigned char *)(start + 0x00);, and PBDDR =
> (unsigned char *)(start + 0x01);, but this doesn't work.
you entering for an obfuscated code contest or something :-)
You got a typo....
PBDDR=(unsigned char *)(start + 0x10);
I have a general purpose program for playing around with the dio and lcd
digi ports and the 12 bit ADC option, it's referenced on my ts7200 page at
http://www.comp.leeds.ac.uk/jj/linux/arm-sbc.html
and is at
http://www.comp.leeds.ac.uk/jj/linux/adio.tgz
The ts72xx specific stuff is in the c file ts7200io.c
> Does anyone see what I'm doing wrong, or have any example code for
> DIO2? Is there something I have to do first to disable the TS-XDIO,
> or to tell the board that DIO2 should be standard DIO ports? Thanks,
cheers
Jim
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|