This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

huge to far

Hello,

I think I finally found a Problem which caused me Trouble over the past Days, and now I'm trying to find a satisfying solution.

I'm using an Infineon XC161CJ with a grapical Display.
I use a struct which defines a variable width font:

typedef struct
{
...
// Font Bitmap Array
const ubyte huge *ubElement;
// Element Width
const ubyte *ubElementWidth;
} LCD_sFont;

const LCD_sFont cgsFont24x23 = {...};


The font array exceeds 16K so it must be declared as huge.

The Function which prints out the single characters expects a far pointer.

Obviously it causes trouble when accessing the character of the huge-array crossing the 16k page boundary by simply passing the adress of the huge-array + offset.


I would be glad to know if there is a posibility to get out of this without changing the Parameter of the Display-Function or making a temporary copy of the actual character.
A simple cast would be perfect but I'm afraid the solution will not be that easy ...


Thx and Best Regards,
Marcus

Parents Reply Children
No data