I don't know if you've solved it at this point, but I just saw it.
What I did to get the XDIO working is:
unsigned char* XDIO_REG1, XDIO_REG2. XDIO_REG3;
unsigned int * start;
start = mmap(blah,blah,blah,0x12c00000);
XDIO_REG0 = (unsigned char*)(start + 0x00);
XDIO_REG1 = (unsigned char*)(start + 0x01);
XDIO_REG2 = (unsigned char*)(start + 0x02);
//XDIO_REG3 = (unsigned char*)(start + 0x03); // I dont use this one
// Set Mode
*XDIO_REG0 = 0x00;
// Set Direction
*XDIO_REG1 = 0xFF; // All output
// Toggle Data
while(1){
*XDIO_REG2 = 0xFF; // All on
sleep(1);
*XDIO_REG2 = 0x00; // All off
sleep(1)
}
good luck,
-S
--- In "loranger78" <> wrote:
>
> Hi!
>
> I have a 7260 and I would and adapt the sample program for the matrix keypad
> to the DIO2 (because I'm using the SPI bus on DIO1 for another peripheral).
>
> I tried to change the GPIOBASE to 0x12C00000, the data register (offset) to
> 0x00, and the data direction register to 0x01 but it's not working.
>
> Since this IO port is emulated by the CPLD, is the function mmap() working?
> What will be the quickest modification to do on the sample to be able to use
> it (I took a look at the XDIO API but I don't really want to use it) ?
>
> Thanks a lot for your answers!
> Chris
>
------------------------------------
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/
|