Jump to content

jj8431

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you very much for the detailed reply Joel. I did have the config file set as the demo, but I missed one thing, it's the #define GWIN_REDRAW_IMMEDIATE GFXON The redrawing mode article is help full. Now I know what's happened, I used the original demo code first, but didn't set the heap to a large enough size, and found it's not working. then I removed the event listening lines and changed the heap size, but apparently if you don't use the geventEventWait(), 'IMMEDIATE DRAWING' must be on. So that's the reason I can't see the button drawn on the sreen. Is there a generic guide on how mush the heap should be for an application ? I feel I a bit lost on setting the heap size. Can uGFX give an error message or something if the heap is too small ?
  2. Hi, I'm just start using uGFX and doing some 'hello world' testing. I'm using a bare metal STM32F103 mcu with ILI9341 320*240 touch LCD. I've already got the 'benchmark' demo code running and have correct result. Now I'm trying to test a 'push button' widget, but I found I couldn't even get the button displayed on the screen. My test code is based on the ugfx/demos/modules/gwin/button/main.c My environment is Segger Embedded Studio and using the single gfx_mk.c file approach. I noticed in the gfxconf.h it's said an OS is required but unfortunately bare metal is not in there, but I didn't see any OS specific code in the demo main.c, any to simplify my situation, I even disabled the event checking for the button, but I still can't get the button displayed. Is there any spcial requirements to use the widgets on a bare metal system? like calling some 'display refresh' function periodically? I couldn't find any documentation on this, anybody can help? If you can help me on the display issue, maybe you can also tell me is there anything I should care about using the 'event' system on a bare metal? Thanks in advance. Tim. Following is my test code : (The uGFX logo is shown at the start, but then I only got a white screen) int main(void) { init(); // this is GPIO init etc. GEvent* pe; static const gOrientation orients[] = { gOrientation0, gOrientation90, gOrientation180, gOrientation270 }; unsigned which; // Initialize the display gfxInit(); // We are currently at gOrientation0 which = 0; gdispSetOrientation(orients[which]); // Set the widget defaults gwinSetDefaultFont(gdispOpenFont("UI2")); gwinSetDefaultStyle(&WhiteWidgetStyle, gFalse); gdispClear(GFX_WHITE); // create the widget createWidgets(); // We want to listen for widget events //geventListenerInit(&gl); //gwinAttachListener(&gl); while(1); }
×
×
  • Create New...