Jump to content

dynfer

Members
  • Posts

    4
  • Joined

  • Last visited

  1. For now everything seems to work fine :). The font disortion was caused by the DMA2D not working. Now its looking good. However the questions are not over I want to test an image, I've used "lcd-image-converter" to generate a byte array, I've included the header as the first 8 elements like follows: 0x4E, 0x49, (1024 & 0xFF), ((1024 >> 8) & 0xFF), (600 & 0xFF), ((600 >> 8) & 0xFF), (0x2565 & 0xFF) But I struggle to find the correct function to draw it.
  2. Thanks I've did the switch with the results in the attachments, I've also changed the font size to 32 to show the defects better. Additionally gdispGFillArea(g, 0, 0, 1024, 600, Blue) doesnt seem to work. //Update the issues were caused by my DMA2D clocks not being initialized. Afterwards its working as expected.
  3. Hello Joel, Thanks for responding! Im using 2.9 release from the main website. The board in question is an Alieexpress dev board featuring an h743/256Mbit SDRAM and LTDC screen. As for ChibiOS its the current master branch v21 //Update, the following code results in the following #include "ch.h" #include "hal.h" #include "gfx.h" #include "gfx_thread.h" GListener glistener; static gdispImage myImage; static THD_WORKING_AREA(waGUI, 512); static THD_FUNCTION(GUIThread, arg) { (void)arg; gfxInit(); geventListenerInit(&glistener); gwinAttachListener(&glistener); const font_t font = gdispOpenFont("DEJAVUSANS10"); GDisplay * g = gdispGetDisplay(0); while (true) { chThdSleepMilliseconds(200); gdispGClear(g, Black); gdispGFlush(g); gdispGDrawString(g, 20, 20, "Hello from ChibiOS with UGFX", font, Yellow); gdispGFlush(g); chThdSleepMilliseconds(200); gdispGDrawCircle(g, 256, 300, 150, Yellow); gdispGFlush(g); gdispGDrawChar(g, 256, 300, "X", font, Blue); gdispGFlush(g); } } void startGFX(void) { chThdCreateStatic(waGUI, sizeof(waGUI), NORMALPRIO, GUIThread, NULL); }
  4. Hello, I'm currently implementing uGFX on a STM32H743iit6 with an 1024x600 screen via LTDC (rgb565). I'm running in some problems where the code from below doesn't render properly. What could be the cause? #include "ch.h" #include "hal.h" #include "gfx.h" #include "gfx_thread.h" GListener glistener; static THD_WORKING_AREA(waGUI, 512); static THD_FUNCTION(GUIThread, arg) { (void)arg; gfxInit(); geventListenerInit(&glistener); gwinAttachListener(&glistener); const font_t font = gdispOpenFont("DEJAVUSANS10"); GDisplay * g = gdispGetDisplay(0); gCoord width, height; width = 512; height = 300; while (true) { chThdSleepMilliseconds(1500); gdispClear(Black); gdispDrawString(10, 10, "Hello, uGFX with ChibiOS!", font, White); chThdSleepMilliseconds(1500); gdispDrawCircle(g, (width, height), 150, Yellow); } } void startGFX(void) { chThdCreateStatic(waGUI, sizeof(waGUI), NORMALPRIO, GUIThread, NULL); } Like seen in the picture the font is disorted and the circle isn't drawn in the center of the screen, however the Y axis seems to be ok?
×
×
  • Create New...