Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. I wanted to just use Python and ctypes to use ugfx as a lib instead. The example won't even compile so I can't get that far yet.
  3. Last week
  4. The problem here is a build problem. GDISP builds in 2 possible modes - single display and multiple display. Which it uses is a complex combination of include paths, variables in gfxconf.h and linking. The build results in quite different code for the two options. If your gdisp_lld_init is not being called it means you have this process wrong. First GDISP_TOTAL_DISPLAYS, GDISP_DRIVER_LIST and GDISP_PIXEL_FORMAT should not be defined at all in your gfxconf.h for a single display. Instead the specific driver directory you want to use should be on your compiler INCLUDE path and the specific driver files should be included in the build. Also, the various _options.h files should not be altered. All your customizations should be in your gfxconf.h file. See the example demo programs and the provided gfx.conf.example file in the top directory. In general look carefully at the provided build files and the wiki if you have any questions.
  5. Hi, I'm currently tryying to implement an ILI9341 using an STM32F429, HAL, cmsis_os2 and uGFX, programming in SW4STM32. As i'm working in an RT environment, i declared gfxInit() in the very first task running, which terminates itself after running. Everything compiles fine but thta's during debug that things go south, let me explain. From peripheral inits to kernel strating, everything's fine. In debug mode in gfxInit(), it goes through to _gdispInit() and then gDriverRegister() as intended. But eventhough i changed GDISP_TOTAL_DISPLAYS to 1 instead of 2 by default and defining GDISP_DRIVER_LIST which was set to GDISPVMT_Win32, GDISPVMT_SSD1306 to GDISPVMT_ILI9341 in gdisp_options.h, it won't callback _gdispInitDriver to launch the gdisp_lld_init function and other write functions. What's the actual problem then ? When calling gdispFillStringBox() and going through it in debug mode, i noticed that the instructions g->p.x through g->p.cy don't actually do anything (the values don't change after those calls according to the debug), same deal when manually calling gdisp_lld_init() in my test thread, with instructions g->g.width through g->g.Contrast, which don't actually change the value in the g struct. This results in the fillarea(g) call from gdispFillStringBox to cycle through 44M values (area = g->p.cx * g->p.cy). Note that when manually calling gdisp_lld_init(), my ILI9341 get reset and initialized fine, but the first gdispFillStringBox() gets pulled into that 44M values for(;;) loop. I know that GDISP (the default display) and the GDisplay overall struct is a blackbox, but i can't quite understand why internal uGFX calls and API functions can't change the attributes of the GDisplay object. I'm linking relevant files thereafter. Thanks in advance for our answer and the time you'll take to help me ! Cheers, Arthur gdisp_lld_ILI9341.c /* * This file is subject to the terms of the GFX License. If a copy of * the license was not distributed with this file, you can obtain one at: * * http://ugfx.io/license.html */ #include "gfx.h" #if GFX_USE_GDISP #if defined(GDISP_SCREEN_HEIGHT) || defined(GDISP_SCREEN_HEIGHT) #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT #warning "GDISP: This low level driver does not support setting a screen size. It is being ignored." #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO COMPILER_WARNING("GDISP: This low level driver does not support setting a screen size. It is being ignored.") #endif #undef GDISP_SCREEN_WIDTH #undef GDISP_SCREEN_HEIGHT #endif #define GDISP_DRIVER_VMT GDISPVMT_ILI9341 #include "gdisp_lld_config.h" #include "../../../src/gdisp/gdisp_driver.h" #include "board_ILI9341.h" /*===========================================================================*/ /* Driver local definitions. */ /*===========================================================================*/ #define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; } #define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); } #define write_data16(g, data) { write_data(g, data >> 8); write_data(g, (gU8)data); } #define delay(us) gfxSleepMicroseconds(us) #define delayms(ms) gfxSleepMilliseconds(ms) static void set_viewport(GDisplay *g) { write_index(g, 0x2A); write_data(g, (g->p.x >> 8)); write_data(g, (gU8) g->p.x); write_data(g, (g->p.x + g->p.cx - 1) >> 8); write_data(g, (gU8) (g->p.x + g->p.cx - 1)); write_index(g, 0x2B); write_data(g, (g->p.y >> 8)); write_data(g, (gU8) g->p.y); write_data(g, (g->p.y + g->p.cy - 1) >> 8); write_data(g, (gU8) (g->p.y + g->p.cy - 1)); } /*===========================================================================*/ /* Driver exported functions. */ /*===========================================================================*/ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { // No private area for this controller g->priv = 0; // Initialise the board interface init_board(g); // Hardware reset setpin_reset(g, gTrue); gfxSleepMilliseconds(20); setpin_reset(g, gFalse); gfxSleepMilliseconds(20); // Get the bus for the following initialisation commands acquire_bus(g); write_index(g, 0x01); //software reset gfxSleepMilliseconds(5); write_index(g, 0x28); // display off //--------------------------------------------------------- // magic? write_index(g, 0xcf); write_data(g, 0x00); write_data(g, 0x83); write_data(g, 0x30); write_index(g, 0xed); write_data(g, 0x64); write_data(g, 0x03); write_data(g, 0x12); write_data(g, 0x81); write_index(g, 0xe8); write_data(g, 0x85); write_data(g, 0x01); write_data(g, 0x79); write_index(g, 0xcb); write_data(g, 0x39); write_data(g, 0x2c); write_data(g, 0x00); write_data(g, 0x34); write_data(g, 0x02); write_index(g, 0xf7); write_data(g, 0x20); write_index(g, 0xea); write_data(g, 0x00); write_data(g, 0x00); //------------power control------------------------------ write_index(g, 0xc0); //power control write_data(g, 0x26); write_index(g, 0xc1); //power control write_data(g, 0x11); //--------------VCOM write_index(g, 0xc5); //vcom control write_data(g, 0x35);//35 write_data(g, 0x3e);//3E write_index(g, 0xc7); //vcom control write_data(g, 0xbe); // 0x94 //------------memory access control------------------------ write_index(g, 0x36); // memory access control write_data(g, 0x48); //0048 my,mx,mv,ml,BGR,mh,0.0 write_index(g, 0x3a); // pixel format set write_data(g, 0x55);//16bit /pixel //----------------- frame rate------------------------------ write_index(g, 0xb1); // frame rate write_data(g, 0x00); write_data(g, 0x1B); //70 //----------------Gamma--------------------------------- write_index(g, 0xf2); // 3Gamma Function Disable write_data(g, 0x08); write_index(g, 0x26); write_data(g, 0x01); // gamma set 4 gamma curve 01/02/04/08 write_index(g, 0xE0); //positive gamma correction write_data(g, 0x1f); write_data(g, 0x1a); write_data(g, 0x18); write_data(g, 0x0a); write_data(g, 0x0f); write_data(g, 0x06); write_data(g, 0x45); write_data(g, 0x87); write_data(g, 0x32); write_data(g, 0x0a); write_data(g, 0x07); write_data(g, 0x02); write_data(g, 0x07); write_data(g, 0x05); write_data(g, 0x00); write_index(g, 0xE1); //negamma correction write_data(g, 0x00); write_data(g, 0x25); write_data(g, 0x27); write_data(g, 0x05); write_data(g, 0x10); write_data(g, 0x09); write_data(g, 0x3a); write_data(g, 0x78); write_data(g, 0x4d); write_data(g, 0x05); write_data(g, 0x18); write_data(g, 0x0d); write_data(g, 0x38); write_data(g, 0x3a); write_data(g, 0x1f); //--------------ddram --------------------- write_index(g, 0x2a); // column set // size = 239 write_data(g, 0x00); write_data(g, 0x00); write_data(g, 0x00); write_data(g, 0xEF); write_index(g, 0x2b); // page address set // size = 319 write_data(g, 0x00); write_data(g, 0x00); write_data(g, 0x01); write_data(g, 0x3F); // write_index(g, 0x34); //write_index(g, 0x35); // tearing effect off // tearing effect on // write_index(g, 0xb4); // display inversion // write_data(g, 0x00); write_index(g, 0xb7); //entry mode set write_data(g, 0x07); //-----------------display--------------------- write_index(g, 0xb6); // display function control write_data(g, 0x0a); write_data(g, 0x82); write_data(g, 0x27); write_data(g, 0x00); write_index(g, 0x11); //sleep out gfxSleepMilliseconds(100); write_index(g, 0x29); // display on gfxSleepMilliseconds(100); // Finish Init post_init_board(g); // Release the bus release_bus(g); /* Turn on the back-light */ set_backlight(g, GDISP_INITIAL_BACKLIGHT); /* Initialise the GDISP structure */ g->g.Width = (gCoord) GDISP_SCREEN_WIDTH; g->g.Height = (gCoord)GDISP_SCREEN_HEIGHT; g->g.Orientation = gOrientation0; g->g.Powermode = gPowerOn; g->g.Backlight = (gCoord)GDISP_INITIAL_BACKLIGHT; g->g.Contrast = (gCoord)GDISP_INITIAL_CONTRAST; return gTrue; } #if GDISP_HARDWARE_STREAM_WRITE LLDSPEC void gdisp_lld_write_start(GDisplay *g) { acquire_bus(g); set_viewport(g); write_index(g, 0x2C); } LLDSPEC void gdisp_lld_write_color(GDisplay *g) { write_data16(g, gdispColor2Native(g->p.color)); } LLDSPEC void gdisp_lld_write_stop(GDisplay *g) { release_bus(g); } #endif #if GDISP_HARDWARE_STREAM_READ LLDSPEC void gdisp_lld_read_start(GDisplay *g) { acquire_bus(g); set_viewport(g); write_index(g, 0x2E); setreadmode(g); dummy_read(g); } LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) { gU16 data; data = read_data(g); return gdispNative2Color(data); } LLDSPEC void gdisp_lld_read_stop(GDisplay *g) { setwritemode(g); release_bus(g); } #endif #if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL LLDSPEC void gdisp_lld_control(GDisplay *g) { switch(g->p.x) { case GDISP_CONTROL_POWER: if (g->g.Powermode == (gPowermode)g->p.ptr) return; switch((gPowermode)g->p.ptr) { case gPowerOff: case gPowerSleep: case gPowerDeepSleep: acquire_bus(g); write_reg(g, 0x0010, 0x0001); /* enter sleep mode */ release_bus(g); break; case gPowerOn: acquire_bus(g); write_reg(g, 0x0010, 0x0000); /* leave sleep mode */ release_bus(g); break; default: return; } g->g.Powermode = (gPowermode)g->p.ptr; return; case GDISP_CONTROL_ORIENTATION: if (g->g.Orientation == (gOrientation)g->p.ptr) return; switch((gOrientation)g->p.ptr) { case gOrientation0: acquire_bus(g); write_reg(g, 0x36, 0x48); /* X and Y axes non-inverted */ release_bus(g); g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Width = GDISP_SCREEN_WIDTH; break; case gOrientation90: acquire_bus(g); write_reg(g, 0x36, 0xE8); /* Invert X and Y axes */ release_bus(g); g->g.Height = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_HEIGHT; break; case gOrientation180: acquire_bus(g); write_reg(g, 0x36, 0x88); /* X and Y axes non-inverted */ release_bus(g); g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Width = GDISP_SCREEN_WIDTH; break; case gOrientation270: acquire_bus(g); write_reg(g, 0x36, 0x28); /* Invert X and Y axes */ release_bus(g); g->g.Height = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_HEIGHT; break; default: return; } g->g.Orientation = (gOrientation)g->p.ptr; return; case GDISP_CONTROL_BACKLIGHT: if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100; set_backlight(g, (unsigned)g->p.ptr); g->g.Backlight = (unsigned)g->p.ptr; return; //case GDISP_CONTROL_CONTRAST: default: return; } } #endif #endif /* GFX_USE_GDISP */ My test task StartLCDTask in main.c, that has a .stack_size of 1280. void StartLCDTask(void *argument) { gCoord width, height, x, y; width = height = x = y = 0; // Initialize the display HAL_GPIO_WritePin(RST_LCD_GPIO_Port, RST_LCD_Pin, GPIO_PIN_SET); // Get the screen size width = gdispGetWidth(); gFont font1, font2; gCoord fheight1, fheight2; const char *line1, *line2; char buf[8]; // Initialize and clear the display // Get the screen size width = 240; // Get the fonts we want to use font1 = gdispOpenFont("DejaVuSans10*"); font2 = gdispOpenFont("UI1*"); //font2 = gdispOpenFont("Geosans*"); //font2 = gdispOpenFont("Free*"); //font2 = gdispOpenFont("Hellovetica*"); //font2 = gdispOpenFont("babyblue*"); //font2 = gdispOpenFont("PF Ronda*"); //font2 = gdispOpenFont("Apple*"); y = 0; fheight1 = gdispGetFontMetric(font1, gFontHeight)+2; fheight2 = gdispGetFontMetric(font2, gFontHeight)+2; line1 = "Check out my FONTS STM32F4"; line2 = "0123456789~!@#$%^&*_-+=(){}[]<>|/\\:;,.?'\"`"; // Font 1 gdispFillStringBox(0, y, width, 20, line1, font1, GFX_BLACK, GFX_WHITE, gJustifyCenter); y += fheight1+1; gdispFillStringBox(0, y, width, 40, line2, font1, GFX_BLACK, GFX_WHITE, gJustifyCenter); y += fheight1+1; // Font 2 gdispFillStringBox(0, y, width, fheight2, line1, font2, GFX_BLACK, GFX_WHITE, gJustifyCenter); y += fheight2+1; gdispFillStringBox(0, y, width, fheight2, line2, font2, GFX_BLACK, GFX_WHITE, gJustifyCenter); y += fheight2+1; // Font 1 drawing White on the (GFX_WHITE) background gdispDrawStringBox(0, y, width, fheight1, line1, font1, GFX_WHITE, gJustifyCenter); y += fheight1+1; gdispDrawStringBox(0, y, width, fheight1, line2, font1, GFX_WHITE, gJustifyCenter); y += fheight1+1; // Show Sizes buf[0] = (fheight1-2)/10 + '0'; buf[1] = (fheight1-2)%10 + '0'; buf[2] = ','; buf[3] = ' '; buf[4] = (fheight2-2)/10 + '0'; buf[5] = (fheight2-2)%10 + '0'; buf[6] = 0; gdispFillStringBox(0, y, width, fheight1, buf, font1, GFX_RED, GFX_WHITE, gJustifyCenter); /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) { osDelay(1); } /* USER CODE END 5 */ } gfxconf.h #define GFX_USE_OS_CMSIS2 GFXON #define GFX_OS_NO_INIT GFXON #define GFX_USE_GDISP GFXON #define GDISP_NEED_VALIDATION GFXON #define GDISP_NEED_CIRCLE GFXON #define GDISP_NEED_MULTITHREAD GFXON #define GDISP_NEED_STREAMING GFXON #define GDISP_NEED_TEXT GFXON #define GDISP_NEED_UTF8 GFXON #define GDISP_INCLUDE_FONT_UI1 GFXON #define GDISP_INCLUDE_FONT_DEJAVUSANS10 GFXON #define GFX_USE_GTIMER GFXON board_ili9341.h #ifndef _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H #include "main.h" #define LCD_DC_CMD HAL_GPIO_WritePin(DC_LCD_GPIO_Port, DC_LCD_Pin, GPIO_PIN_RESET) #define LCD_DC_DATA HAL_GPIO_WritePin(DC_LCD_GPIO_Port, DC_LCD_Pin, GPIO_PIN_SET) #define LCD_RST_SET HAL_GPIO_WritePin(RST_LCD_GPIO_Port, RST_LCD_Pin, GPIO_PIN_SET) #define LCD_RST_RES HAL_GPIO_WritePin(RST_LCD_GPIO_Port, RST_LCD_Pin, GPIO_PIN_RESET) #define LCD_CS_RES HAL_GPIO_WritePin(CS_LCD_GPIO_Port, CS_LCD_Pin, GPIO_PIN_RESET) #define LCD_CS_SET HAL_GPIO_WritePin(CS_LCD_GPIO_Port, CS_LCD_Pin, GPIO_PIN_SET) /** * SPI configuration structure. * Speed 12 MHz, CPHA=0, CPOL=0, 8bits frames, MSb transmitted first. * Soft slave select. */ SPI_HandleTypeDef hspi4; static void send_data(gU16 data); /** * @brief Initialise the board for the display. * * @param[in] g The GDisplay structure * * @note Set the g->board member to whatever is appropriate. For multiple * displays this might be a pointer to the appropriate register set. * * @notapi */ static void init_board(GDisplay *g) { // As we are not using multiple displays we set g->board to NULL as we don't use it. g->board = NULL; LCD_CS_SET; LCD_DC_CMD; } /** * @brief After the initialisation. * * @param[in] g The GDisplay structure * * @notapi */ static void post_init_board(GDisplay *g) { (void) g; LCD_DC_DATA; } /** * @brief Set or clear the lcd reset pin. * * @param[in] g The GDisplay structure * @param[in] state gTrue = lcd in reset, gFalse = normal operation * * @notapi */ static void setpin_reset(GDisplay *g, gBool state) { (void) g; if (state == -1) { LCD_RST_RES; } else { LCD_RST_SET; } } /** * @brief Set the lcd back-light level. * * @param[in] g The GDisplay structure * @param[in] percent 0 to 100% * * @notapi */ static void set_backlight(GDisplay *g, gU8 percent) { (void) g; (void) percent; } /** * @brief Take exclusive control of the bus * * @param[in] g The GDisplay structure * * @notapi */ static void acquire_bus(GDisplay *g) { (void) g; LCD_CS_RES; } /** * @brief Release exclusive control of the bus * * @param[in] g The GDisplay structure * * @notapi */ static void release_bus(GDisplay *g) { (void) g; LCD_CS_SET; } /** * @brief Send data to the lcd. * * @param[in] data The data to send * * @notapi */ static inline void send_data(gU16 data) { HAL_SPI_Transmit(&hspi4, &data, sizeof(data), HAL_MAX_DELAY); } /** * @brief Send data to the index register. * * @param[in] g The GDisplay structure * @param[in] index The index register to set * * @notapi */ static inline void write_index(GDisplay *g, gU16 index) { (void) g; LCD_DC_CMD; send_data(index); LCD_DC_DATA; } /** * @brief Send data to the lcd with DC control. * * @param[in] g The GDisplay structure * @param[in] data The data to send * * @notapi */ static inline void write_data(GDisplay *g, gU16 data) { (void) g; LCD_DC_DATA; send_data(data); } /** * @brief Set the bus in read mode * * @param[in] g The GDisplay structure * * @notapi */ static inline void setreadmode(GDisplay *g) { (void) g; } /** * @brief Set the bus back into write mode * * @param[in] g The GDisplay structure * * @notapi */ static inline void setwritemode(GDisplay *g) { (void) g; } /** * @brief Read data from the lcd. * @return The data from the lcd * * @param[in] g The GDisplay structure * * @notapi */ static inline gU16 read_data(GDisplay *g) { (void) g; return 0; } #endif /* _GDISP_LLD_BOARD_H */
  6. Earlier
  7. hi there was already a version in the download section. I used it to convert files into header files and include them into my project, there is this ugfx studio? i need it again kind regards cheater
  8. If you're having issues compiling µGFX successfully, you can always open a thread in the support forum where you'll find people that are happy to help where they can. µGFX is being compiled a lot against / for the win32 platform as it is being used a lot as a development environment.
  9. I've submitted a pull request (https://git.ugfx.io/uGFX/uGFX/pulls/41). I tested it with the SPI connection, but I don't have a module with 16-bit parallel connection. I don't see why it would not work, but it would be nice if somebody could test it on a parallel module.
  10. Hello and welcome to the µGFX community. Providing pre-built libraries (either static or dynamic) for µGFX is not a very good idea. The library makes heavy use of compile time optimization based on the various configuration options given in the main configuration file and the driver configuration files. All those compile-time options influence the code that is being presented to the compiler during the pre-processor stage. Therfore, the binary code produced by the compiler (and eventually also the linker) depend on those options. This reason makes it very useless to publish binaries. For certain things such as the GDISP feature set we could just enable everything which would result in a larger binary and call it a day but for many of the other options that's simply not possible because the pre-processor makes changes based on the underlying system, the compiler being used and so on. Furthermore, some options are application specific (eg. GDISP_NEED_MULTITHREAD). TL;DR: Publishing pre-built binaries for uGFX is not a good idea because of lots of pre-processor modifications.
  11. Please post the patch files or better please put in a pull request for your changes. If it breaks other code (board files etc) that code will need to be appropriately fixed.
  12. Can we please get a precompiled dll that we can just use the way we want??? All I need is a dll. And the instructions do not work for mingw, it get's compile errors like cannot find file half way thru. Broken win32 build is so sad. win32dll please that is at least winXP compatible just cause.
  13. I was wondering if this driver ever worked for anybody at all. I think I understand now. It turned out that ILI9488 can be configured to use either SPI or the parallel interface (8 bit or 16-bit). I'm using the 4-line SPI interface, but I guess that the driver was designed for 16-bit parallel interface only, which is part of the problem. The driver should not make any assumptions about the connection type, that's the job of the board file. Also, depending on the connection type, some colour modes may be not available. In particular, the RGB565 mode used by the driver is only allowed for parallel connections. For the SPI connection the choice is between RGB111 (1 byte) or RGB666 (2 bytes). The logical conclusion is that the colour mode should also be defined in the board file. I'd like to submit a patch for the driver, but I don't see any way to fix it without breaking the backward compatibility. I can fork it under a different name (any suggestions?) and fix the new one. Is any of the maintainers reading this? Would you accept it?
  14. Thank you Joel, this is very helpful for me. I did a local modification as recommended by you. I don't know anything about software versioning systems. If I want to do a pull request, I guess I need to sign up for GIT or CVS or something like that!? I will have a look at it, but it will need some time. Have a nice day!
  15. Thank you for bringing this to our attention. We have fixed the problem.
  16. I had this exact same issue. The solution I have is this... (I did not use the drivers provided by the uGFX repository, so this code may not be directly usable...) #if GDISP_HARDWARE_STREAM_WRITE static uint8 ColorWriteState = 0; static uint16 ColorFirst = 0; static uint8 ColorNext = 0; LLDSPEC void gdisp_lld_write_start(GDisplay *g) { acquire_bus(g); set_viewport(g); write_index(g, MEMORY_WRITE); } LLDSPEC void gdisp_lld_write_color(GDisplay *g) { if (ColorWriteState == 0) { /*Save B and G for writing next time*/ ColorFirst = (uint16)((BLUE_OF(g->p.color) << 8) | GREEN_OF(g->p.color)); /*Save R for the next time*/ ColorNext = RED_OF(g->p.color); /*Switch state*/ ColorWriteState = !ColorWriteState; return; } else { /*Write first B and G*/ write_data(g, ColorFirst); /*Write first R and second B*/ write_data(g, (uint16)((ColorNext << 8) | BLUE_OF(g->p.color))); /*Write second G and R*/ write_data(g, (uint16)((GREEN_OF(g->p.color) << 8) | RED_OF(g->p.color))); ColorWriteState = !ColorWriteState; } } LLDSPEC void gdisp_lld_write_stop(GDisplay *g) { if (ColorWriteState) { /*Write first B and G*/ write_data(g, ColorFirst); /*Write first R and second B*/ write_data(g, (uint16)(ColorNext << 8)); ColorWriteState = 0; } release_bus(g); }
  17. I bought an ILI9488 module recently, and it took me a few hours to make it work with uGFX. I think I found a bug in the ILI9488 driver. The driver uses this command the set the RGB565 mode: write_index(g, 0x3A); write_data(g, 0x55); This mode requires two bytes per pixel, but the gdisp_lld_write_color() function calls write_data() only once. Everywhere else the driver expects write_data() to send only the lower byte to the controller, as in the example above. However, gdisp_lld_write_color() assumes that write_data() would transmit both bytes of the 16-bit data. There is no way to implement write_data() so that it would send either one byte or two bytes, depending on the context. Well, there might be a way, but it would be ugly. I would expect gdisp_lld_write_color to call write_data16(), as ILI9341 driver does. Ideally, I'd prefer to be able to implement write_data16() myself in the board file, as it could be done a bit more efficiently than just calling write_data() twice. Or, even better, to remove the assumption about the color mode, the board file could implement these two functions: static GFXINLINE void write_byte(GDisplay *g, gU8 data); static GFXINLINE void write_pixel(GDisplay *g, gColor pixel); This would allow support for 18bits/pixel and 24bits/pixel as well. What do you think?
  18. Thank you Joel, But, could you give an example, please? I'm using version 2.8.
  19. The imagebox widget (in the code the GImageObject structure) contains the gImage member. I didn't try it but you should be able to just open a file regularly and load it into a gImage object (named gdispImage in older versions of the library) and then assign that to the imagebox widget's gImage member. Afterwards you have to trigger a re-render of the imagebox widget. Note that the underlying widget object should always be treated as a blackbox and you should only use the GWIN highlevel API passing GHandle around. If you want this functionality I'd recommend that you implement a proper API call for this in the imagebox widget. Pull requests are of course welcome 😉
  20. Hi, I have to render a GIF image in many image boxes. So far I'm doing it in a loop, for example GHandle image_handle[NumberOf]; for(i = 0; i < NumberOf; i++) { .... image_handle = gwinImageCreate(0, &wi.g); gwinImageOpenFile(image_handle, "image_file.gif"); } Is there another way, open file once, then link it to the imagebox handlers? I know that there are several other function to open image file once, then to draw it, etc, but I don't see a function to link it to the imagebox handler. I don't have frame buffer, the screen is rendered directly in the display memory.
  21. wctltya

    Forums site

    Hi guys, something is wrong with this web site, the pages links(2, 3..., next, etc) doesn't work
  22. The clearing operation is currently hard coded in the GDISP driver post-init procedure: https://git.ugfx.io/uGFX/uGFX/src/master/src/gdisp/gdisp.c#L659 It would be rather easy to wrap that call in a macro such as `GDISP_STARTUP_CLEAR` so that it can be controller in the configuration file. Pull requests are welcomed 😉
  23. Thanks for your reply. It's not a high priority topic, because as I found out my STM32 micro has lot of computing power and I get high refresh rates also when I have to overwrite with my desired color. However, I just don't like the idea of having superfluous pixmap color filling - I always try to optimize, even it it's not necessary 🙂 Is there a way to completely disable the background color initializations of all GDISPs (including pixmaps) that I use in my project? I would prefer to take care of it on my own and just get an uninitialized piece of display buffer / pixmap RAM.
  24. Hello & welcome to the µGFX comunity! The µGFX library has been designed to be completely agnostic. In the 7 years of its existence we never came across a situation (platform, operating system, compiler, architecture, ...) where µGFX didn't run on. The library comes with built-in drivers to run on Linux. The "Linux drivers" support X, SDL or direct kernel framebuffer. You can find more information in the documentation (eg. the wiki & API docs). There is no existing display driver for the ATSAMA5D36. Which driver is the closest to take as a starting point depends on how the display controller works. µGFX supports all possible display driver models (see the driver docs wiki). You can find all existing drivers in the /drivers/gdisp directory. We're happy to help where we can - The more specific questions you ask the further we'll get.
  25. Dear sir/madam, 1) We want to run ugfx on yocto embedded linux(version 4.14.73-linux4sam-6.0).We are using ATSAMA5D36 xplained board.Please tell us the ugfx compatibelity with this linux kernel version. 2)We want to integrate following display with ATSAMA5D36,please find the following link https://www.adafruit.com/product/2279 http://www.linsnled.com/product/outdoor-led-display-module-os5.html Please tell us whether this kind of display driver will support by ugfx. If not please tell us the closest driver to start with that. Thanks & Regards, Pawan
  26. Hi, Currently there's no way to modify the behavior of the default clearing & orientation of the pixmaps. The startup color clearing behavior is implicitly implemented by the fact that a pixmap is just regular GDISP driver like any other "real" / "physical" display. The GDISP driver calls gdispInit() as part of the driver initialization - and therefore also when creating a new pixmap. The orientation is simply hardcoded. You can find the related code here: https://git.ugfx.io/uGFX/uGFX/src/master/src/gdisp/gdisp_pixmap.c#L113
  27. Hello and welcome to the µGFX community! Those fonts (and the two UI fonts) have been custom designed by the µGFX developers. The sources of these fonts are not openly available and therefore there won't be any easy solution for you to modify them. If you're a commercial customer you can contact us via e-mail to further discuss possible solutions.
  28. Just before we dive too much into this: Can you replicate the same issue with the latest version of the µGFX library? The font stuff (especially wrapping and alignment/justification) has been reworked intensively in a release after 2.4 (can't remember, was 2.7 or 2.8 I think - check the changelogs). If you integrated µGFX properly into your project you should be able to just replace the library directory. If upgrading is for some reason not an option, I'd recommend you to first investigate and re-evaluate why that is not an option and if the situation stays the same you can go through the changelogs and git history to figure out which patches were applied to this and cherry-pick those patches to your copy of µGFX 2.4.
  1. Load more activity
  • Create New...