Jump to content

Toggle driver


remon

Recommended Posts

I'm trying to get the toggle driver to work however, when compiling I get the following error. I did implement the ginput_lld_toggle_board.h board file and included the driver path in the compiler options.
 

/home/remon/Repositories/Heisenberg/firmware/heisenberg_v2/ugfx_2.5/src/gwin/gwin_widget.c: In function '_gwidgetInit':
/home/remon/Repositories/Heisenberg/firmware/heisenberg_v2/ugfx_2.5/src/gwin/gwin_widget.c:368:26: warning: implicit declaration of function 'ginputGetMouse' [-Wimplicit-function-declaration]
  geventAttachSource(&gl, ginputGetMouse(GMOUSE_ALL_INSTANCES), GLISTEN_MOUSEMETA|GLISTEN_MOUSEDOWNMOVES);
                          ^
/home/remon/Repositories/Heisenberg/firmware/heisenberg_v2/ugfx_2.5/src/gwin/gwin_widget.c:368:41: error: 'GMOUSE_ALL_INSTANCES' undeclared (first use in this function)
  geventAttachSource(&gl, ginputGetMouse(GMOUSE_ALL_INSTANCES), GLISTEN_MOUSEMETA|GLISTEN_MOUSEDOWNMOVES);
                                         ^
/home/remon/Repositories/Heisenberg/firmware/heisenberg_v2/ugfx_2.5/src/gwin/gwin_widget.c:368:41: note: each undeclared identifier is reported only once for each function it appears in
/home/remon/Repositories/Heisenberg/firmware/heisenberg_v2/ugfx_2.5/src/gwin/gwin_widget.c:368:64: error: 'GLISTEN_MOUSEMETA' undeclared (first use in this function)
  geventAttachSource(&gl, ginputGetMouse(GMOUSE_ALL_INSTANCES), GLISTEN_MOUSEMETA|GLISTEN_MOUSEDOWNMOVES);
                                                                ^
/home/remon/Repositories/Heisenberg/firmware/heisenberg_v2/ugfx_2.5/src/gwin/gwin_widget.c:368:82: error: 'GLISTEN_MOUSEDOWNMOVES' undeclared (first use in this function)
  geventAttachSource(&gl, ginputGetMouse(GMOUSE_ALL_INSTANCES), GLISTEN_MOUSEMETA|GLISTEN_MOUSEDOWNMOVES);
                                                                                  ^
make: *** [ugfx/subdir.mk:23: ugfx/gfx_mk.o] Error 1

 

Link to comment
Share on other sites

To further extend what @inmarket said: Until a few days ago, the GWIN module required you to use a mouse (touchscreen). You couldn't just use the toggle inputs alone. This is why you are getting the errors about the missing mouse functions, macros and so on. You need to enable the mouse support by settings GINPUT_NEED_MOUSE to TRUE in your configuration file.
However, this limitation has been removed a couple of days ago, it's now possible to use the GWIN module just with the toggle buttons as inputs (without any mouse/touchscreen). To benefit from this behavior you'd have to grab the very latest version of µGFX (newer than the latest stable release 2.5) from the repository.

Edit: It wasn't actually the GWIN module that required a mouse input device, it was the widgets module which is a GWIN sub-module. So it has always been possible to use GWIN without a mouse. Just not the widgets.

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...