Sebastien Baldacchino ha scritto:
Hi all,
I am new with uclinux. I would like to read and write in a peripheral
that I have put in uclinux. I use the kernel 2.4.
I have seen on internet that uclinux has no MMU. So I think to I can
write and read directly to the physical address of my peripheral.
Is it possible to use this code to read and write directly to the
physical address of my register?
char *ptr = (char *)0x30000000;
*ptr=0x01;
Is there a tutorial or anything else to write in a peripheral user?
Thank you for your help,
Sebastien
------------------------------------------------------------------------
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
yes you can, but it's a good practice to use volatile keyword to avoid
compiler optimization issue
when access to hw registers.
Example:
#define CS1_BASE (0x41000000)
#define CPGA_LCD_D_W *((volatile unsigned char *)(CS1_BASE+0x100))
--
Daniele Ziglioli
Signal S.r.l.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev