TWR-K70 + MQX + eGUI with external bitmaps

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

TWR-K70 + MQX + eGUI with external bitmaps

ソリューションへジャンプ
1,883件の閲覧回数
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 解決策
1,445件の閲覧回数
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

元の投稿で解決策を見る

3 返答(返信)
1,446件の閲覧回数
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

1,445件の閲覧回数
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 件の賞賛
返信
1,445件の閲覧回数
friederschrempf
Contributor IV

I recompiled the project once more and know it works!

Don't know what was wrong.

Thank you again Petr!

0 件の賞賛
返信