Hi all,
As you know, if you do something like this:
[b]uint8_t a = 123;[/b]
then [b]&a[/b] will be a 16 bit number which is the address of the variable "a" in memory.
What I need is a way to force 32 bit pointers. For example, if I do this:
[b]uint8_t a = 123;
[/b]
[b]&a[/b] may be something like [b]"0x21F7"[/b]. But what I need it to be is [b]"0x000021F7"[/b].
Is there a way to do this or force the compiler to do this?
What I need it for is this: My graphics display driver takes a pointer to bitmap data as [b]"*data"[/b] then does many [b]"pgm_read_byte (data + offsets)"[/b] to get the bitmap data to send to the display.
Of course, because pointers are only 16 bit, I cannot have bitmaps or font data ABOVE the 64K address line, else I can't get at it.
I know that I can use [b]"pgm_read_byte_far (32 bit address)"[/b] to access all of the PROGMEM, but I need to be able to do it using a pointer, not an explicit address.
I thought of using a [b]uint32_t[/b] instead of [b]uint8_t *[/b], but then I don't know how to pass it the address of a bitmap. The bitmap might be something like this:
static const uint8_t bitmap[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00,
0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00, 0x00,
0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00, 0x00,
0x23, 0x13, 0x08, 0x64, 0x62, 0x00, 0x00,
0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00,
};
...but if it resides above the 64K mark, how do I access it?
Any ideas will be appreciated.