Jump to content

yuzhubin

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

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

  1. Hi, i want to use uGFX on my walkie-talkie device so i have to port the keybord on my device to uGFX , then i can edit texts switch widgets via the keyboard。 is there any guides for me to follow?
  2. yes i did clone the lastest repository and set GWIN_FLAT_STYLING to GFXON。however thanks for your reply
  3. thanks for reply, i tried GWIN_FLAT_STYLING but nothing changed, i will try to write custom rendering routine
  4. is there any options for supporting word wrap? i try both gwin/label and gwin/textedit, but i can't find any options. do i have to write a custom drawing function?
  5. is there any options to remove the 3D efforts of the widgets? for example the button looks like it has some shadow effects, in order to remove this i try to remove some codes like below void gwinButtonDraw_Normal(GWidgetObject *gw, void *param) { const GColorSet * pcol; fixed alpha; fixed dalpha; coord_t i; color_t tcol, bcol; (void) param; if (gw->g.vmt != (gwinVMT *)&buttonVMT) return; pcol = getButtonColors(gw); /* Fill the box blended from variants of the fill color */ //tcol = gdispBlendColor(GFX_WHITE, pcol->fill, BTN_TOP_FADE); //bcol = gdispBlendColor(GFX_BLACK, pcol->fill, BTN_BOTTOM_FADE); //dalpha = FIXED(255)/gw->g.height; //for(alpha = 0, i = 0; i < gw->g.height; i++, alpha += dalpha) // gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+i, gw->g.x+gw->g.width-2, gw->g.y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); gdispGDrawStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width-1, gw->g.height-1, gw->text, gw->g.font, pcol->text, justifyCenter); //gdispGDrawLine(gw->g.display, gw->g.x+gw->g.width-1, gw->g.y, gw->g.x+gw->g.width-1, gw->g.y+gw->g.height-1, pcol->edge); //gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+gw->g.height-1, gw->g.x+gw->g.width-2, gw->g.y+gw->g.height-1, pcol->edge); // Render highlighted border if focused _gwidgetDrawFocusRect(gw, 0, 0, gw->g.width-1, gw->g.height-1); } it did work for me , the button just show texts right and can be toggled. i wonder is there any better ways to do this?
  6. finally my button work out and my RTOS didn't complained,here is my gos_ files for rtthread gos_rtthread.c gos_rtthread.h
  7. thanks a lot for reply, i tried to set GFX_COMPILER to GFX_COMPILER_KEIL but it didn't work for me. and then i turned off stack checking it did work well but i think it's not a good way to turn it off, other threads still need this to ensure safety running. you mentioned i should see rawrtos or freertos or cmsisv2 for examples then i followed the wiki about using uGFX on freertos, wrote my program like below static void taskInit(void* pvParameters) { (void)pvParameters; gfxInit(); } void main(void) { // Create the initialization task xTaskCreate(taskInit, "Initialization", stackSize, 0, priority, 0); // Initialize FreeRTOS. This will start the scheduler. vTaskStartScheduler(); } but... still stack overflow with my stack checking on. what should i do now? i don't know much about mcu arch or Makefile. could you give me a simple to do this?
  8. i try to debug this and i found the program runs into this function bool_t gfxSemWait(gfxSem *psem, delaytime_t ms) ; i put a log function at the entry of this function rt_kprintf("gfxSemWait ok!\n"); and i found the the log showed 4 times gfxSemWait ok! gfxSemWait ok! gfxSemWait ok! gfxSemWait ok! and then "stack overflow" again
  9. i specified the CPU type to be m7 and i modified the gos_x_threads_cortexm347.h file because arm9 is an arm920T V4T cpu , it dosen't support the "blx" instruction so i change that line to be mov lr, pc bx r1 and then i builded and run , at last , i could see the button show on the screen, but another problem shows, the RTOS(a chinese rtos named rtthread) which uGFX ran on has a "stack overflow" issue immediately, i set the uGFX thread stack to be 200K Bytes , i think it is big enough for it, but stiil "stack overflow". then i comment the whie() part code while(1) { // Get an Event // pe = geventEventWait(&gl, TIME_INFINITE); // // switch(pe->type) { // case GEVENT_GWIN_BUTTON: // if (((GEventGWinButton*)pe)->gwin == ghButton1) { // // Our button has been pressed // if (++which >= sizeof(orients)/sizeof(orients[0])) // which = 0; // // // Setting the orientation during run-time is a bit naughty particularly with // // GWIN windows. In this case however we know that the button is in the top-left // // corner which should translate safely into any orientation. // gdispSetOrientation(orients[which]); // gdispClear(White); // gwinRedrawDisplay(GDISP, FALSE); // } // break; // // default: // break; // } } nothing wrong with the RTOS now but i could't see the button too, what happened? the RTOS's website is https://github.com/RT-Thread/rt-thread it's widely used in china
  10. i configurer my project following the bare metal guide, i filled these two functions systemticks_t gfxSystemTicks(void) { return HAL_GetTick(); } systemticks_t gfxMillisecondsToTicks(delaytime_t ms) { return ms; } and i also filled the driver functions in "drivers\gdisp\ILI9341\board_ILI9341.h", and i copied demo/disp/basic code to my main.c the prroject can be builded and run but i just can't see any thing. the only one can work is gfxinit() function, it did init my scrreen
  11. i checked gfx_compilerr.h and i found cpu options below, but my cpu is Samsung s3c2440, it's a arm9 cpu,i can't found arm9 option, which option should i take? #define GFX_CPU_UNKNOWN 0 //**< Unknown cpu #define GFX_CPU_CORTEX_M0 0x01 //**< Cortex M0 #define GFX_CPU_CORTEX_M1 0x02 //**< Cortex M1 #define GFX_CPU_CORTEX_M2 0x03 //**< Cortex M2 #define GFX_CPU_CORTEX_M3 0x04 //**< Cortex M3 #define GFX_CPU_CORTEX_M4 0x05 //**< Cortex M4 #define GFX_CPU_CORTEX_M4_FP 0x06 //**< Cortex M4 with hardware floating point #define GFX_CPU_CORTEX_M7 0x07 //**< Cortex M7 #define GFX_CPU_CORTEX_M7_FP 0x08 //**< Cortex M7 with hardware floating point #define GFX_CPU_X86 0x10 //**< Intel x86 #define GFX_CPU_X64 0x11 //**< Intel x64 #define GFX_CPU_IA64 0x12 //**< Intel Itanium #define GFX_CPU_POWERPC32 0x20 //**< PowerPC #define GFX_CPU_POWERPC64 0x21 //**< PowerPC #define GFX_CPU_SPARC 0x22 //**< Sparc
  12. what should i do to specified the CPU to uGFX?i have checked the gfxconf.h and i found 3 options below #define GFX_CPU GFX_CPU_UNKNOWN #define GFX_CPU_NO_ALIGNMENT_FAULTS FALSE #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_UNKNOWN
  13. i have configured my project so it can build and run with ugfx, ai first the gdisp/ demos runs well but the gwin/ demos don't work well i can't see any widget display on my screen, just white background.my ide is keil i configure the os type to be bare-mental
×
×
  • Create New...