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);
}