Jump to content

Question about GDISP_DRIVER_VMT


wctltya

Recommended Posts

Hi,

In which file I have to define GDISP_DRIVER_VMT? Where is explained what is its purpose? Didn't found in the wiki.

I see that it is used as condition in gdisp_driver.h, and the only file included there is gdriver.h, then should I define it there?

Edited by wctltya
Link to comment
Share on other sites

Hi,

I created a new topic out of your post because it was unrelated to the Kinetis Design Studio.

The GDISP_DRIVER_VMT macro is only used internally. That's why there is no documentation of it. It's a macro that gets defined by the driver itself. Unless you are writing your own driver you don't have to worry about it. Just include the driver(s) that you want to use and everything else should be taken care of.

Link to comment
Share on other sites

  • 7 months later...
On 8/24/2016 at 11:59, Joel Bodenmann said:

Hi,

I created a new topic out of your post because it was unrelated to the Kinetis Design Studio.

The GDISP_DRIVER_VMT macro is only used internally. That's why there is no documentation of it. It's a macro that gets defined by the driver itself. Unless you are writing your own driver you don't have to worry about it. Just include the driver(s) that you want to use and everything else should be taken care of.

Just to clarify. If you are going to add you own display driver, then you should define the GDISP_DRIVER_VMT macro. I added my own display driver so in my case the source file gdisp_lld_XXX.c is like:

-----------------------------------------------------------------

#include "gfx.h"

#if GFX_USE_GDISP

// Define that we are going to compile our own display dirver
#define GDISP_DRIVER_VMT      GDISPVMT_YOURDRIVER

#include "gdisp_lld_config.h"

// I changed the location of the display driver source file
#include "src/gdisp/gdisp_driver.h"

#include "your_board.h"
#include "OtherFilesForYourHardware.h"

-----------------------------------------------------------------

Link to comment
Share on other sites

Follow the example of the other gdisp drivers. To write a new drivers you will only need a new gdisp_lld_config.h and a new driver c file. You will not need to alter any part of the uGFX source itself.

Note that for uGFX V3 the driver interface will be changing. We will port your driver to the new interface (when it is ready) provided your driver has been contributed to be part of the repository. We may rely on you to test that port however.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...