Which would be the range for the Canon G11
AFAIK, all known cameras have their all their MMIO in a 16 MB range from 0xC0000000 to 0xC1000000.
The code quoted above searches from 0xC0220000 through 0xC025FFFC, since it does 0xFFFF iterations which each cover
4 bytes.
To avoid this kind of confusion I would write this as:
#define START ((long *)0xc0220000)
#define END ((long *)0xc0224000) // or whatever
void find_led()
{
volatile long *p;
for(p=START;p<END;p++)
{
*p=0x46;
}
}
As to where the G11 LEDs are, that's for you to find. It's probably similar to either the
G10, or one of the recent cameras. The LED addresses for a camera are frequently listed on it's wiki page.
Starting near 0xC0220000 seems to be common, and 0xC0223030 has been the AF led on several recent models.