
28 Oct
2009
28 Oct
'09
11:10 a.m.
Dear Wolfgang Denk,
writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER);
like notation
Close, but please also get rid of this "((AT91PS_PIO) AT91C_BASE_PIOA)" thing, especialy the cast is nasty. Declare a real pointer variable to the respective data structure, and use that.
I, think
writel(AT91C_PA23_TXD2, AT91C_PIOA_OER);
is the most correct way. But, there are need some additional def's in AT91RM9200.h. Only the port A registers is defined as pointer variable. If you think also this is the right way, I will send a separate patch for AT91RM9200.h (PORTB .. PORTD, SMC registers)
Best regards,
Jens Scharsig