DISP_ADD_FUNC
![]() |
![]() |
![]() |
![]() |
DISP_ADD_FUNC()
Add an entry to a function table
Synopsis:
#include <display.h> #define DISP_ADD_FUNC(tabletype, table, entry, func, limit) ...
Description:
When the graphics framework calls your driver's entry points:
- devg_get_contextfuncs()
- devg_get_corefuncs()
- devg_get_memfuncs()
- devg_get_miscfuncs()
- devg_get_modefuncs()
- devg_get_vcapfuncs()
- devg_get_vidfuncs()
use the DISP_ADD_FUNC() macro to add your driver's functions to the appropriate table:
- disp_draw_contextfuncs_t
- disp_draw_corefuncs_t
- disp_draw_miscfuncs_t
- disp_memfuncs_t
- disp_modefuncs_t
- disp_vcapfuncs_t
- disp_vidfuncs_t
The DISP_ADD_FUNC() macro adds the function only if there's room for it in the table. If you use this macro, newer drivers that supply more functions will run properly with older versions of Photon that supply smaller function tables.
The arguments are:
- tabletype
- The data type for the table (e.g. disp_draw_contextfuncs_t).
- table
- A pointer to the instance of the table that you want to add the function to.
- entry
- The name of the entry you want to set in the table (e.g. draw_span).
- func
- A pointer to the function that your driver provides.
- limit
- The size of the table, in bytes.
Examples:
DISP_ADD_FUNC (disp_draw_corefuncs_t,
&my_contextfuncs, blit1,
&my_blit1_fn, tabsize);
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
devg_get_contextfuncs(), devg_get_corefuncs(), devg_get_memfuncs(), devg_get_miscfuncs(), devg_get_modefuncs(), devg_get_vcapfuncs(), devg_get_vidfuncs(), disp_draw_contextfuncs_t, disp_draw_corefuncs_t, disp_draw_miscfuncs_t, disp_memfuncs_t, disp_modefuncs_t, disp_vcapfuncs_t, disp_vidfuncs_t
![]() |
![]() |
![]() |
![]() |
![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)