TWR-K70 + MQX + eGUI with external bitmaps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TWR-K70 + MQX + eGUI with external bitmaps

Jump to solution
1,060 Views
friederschrempf
Contributor IV

I'm trying to load bitmaps from an external location (usb device) with eGui (D4D) v3 beta on TWR-K70.

When I enable the external file support with

#define D4D_EXTSRC_FILE_ENABLE  D4D_TRUE

I get errors when I try to compile the project which tell me that d4d_extsrcFile (which is defined in d4d_extsrc.h) is undeclared in d4d_bmp.c and d4d_font.c.

There is a

extern const D4DFILE_FUNCTIONS d4d_extsrcFile;

in d4d_extsrc.h.

Does someone have an idea what might be wrong?

Thanks!

1 Solution
622 Views
Gargy
NXP Employee
NXP Employee

Hello,

if you switch on external bitmap support, you also have to define the eGUI API to file system, like this example:

D4D_DECLARE_FILE_FUNCTIONS(My_FileOpen, My_FileClose, My_FileRead, My_FileWrite, My_FileFseek, My_FileFtell) 

And the functions My_FileOpen... must exists in your project.

Check the examples what I put on : https://community.freescale.com/message/323071#323071

Petr

View solution in original post

3 Replies
623 Views
Gargy
NXP Employee
NXP Employee

Hello,

if you switch on external bitmap support, you also have to define the eGUI API to file system, like this example:

D4D_DECLARE_FILE_FUNCTIONS(My_FileOpen, My_FileClose, My_FileRead, My_FileWrite, My_FileFseek, My_FileFtell) 

And the functions My_FileOpen... must exists in your project.

Check the examples what I put on : https://community.freescale.com/message/323071#323071

Petr

622 Views
friederschrempf
Contributor IV

Thank you Petr!

I added the file functions and it know compiles without errors.

Still I can't see the bitmap on my screen. I added a bmp file with 8bit color to my USB stick root directory and made sure that the LCD screen is loaded after the usb initialization. Reading from the stick in general works fine.

I declared the bitmap with

D4D_DECLARE_BMPFILE(bmp_as, "AS.BMP")

and put it in a picture object with

D4D_DECLARE_STD_PICTURE(ds_logo_as, 130, 100, &bmp_as)

and finally added it to the screen

D4D_DECLARE_SCREEN_OBJECT(ds_logo_as) 

What is missing?

Thanks!

0 Kudos
622 Views
friederschrempf
Contributor IV

I recompiled the project once more and know it works!

Don't know what was wrong.

Thank you again Petr!

0 Kudos