Alex Rivera | Logout

write data to register

Asked 2010-04-16T09:44:27.310
12

i have the memory address of certain register(the address LCDCW1 is C000).

c codes:

#define LCDCW1 0xC000

*LCDCW1=0x31;

i just want to write data to this register. The codes have problems, how to correct it?

thx!

Edit
Report

1 Answer

1

Assuming that register has the same size as a long:

volatile long * ldccw1 = (long*)0xc000;

*lcdcw1 = myValue;
answered 2010-04-16T09:48:44.107

Your Answer