<?xml version="1.0"?>
<rss version="2.0"><channel><title>User Projects Latest Topics</title><link>https://community.ugfx.io/forum/6-user-projects/</link><description>User Projects Latest Topics</description><language>en</language><item><title>&#x441;&#x43E;&#x43C;&#x435; adjustments if someone wants to use uGFX-2.9 with ESP32 Xtensa rtos variant</title><link>https://community.ugfx.io/topic/4336-%D1%81%D0%BE%D0%BC%D0%B5-adjustments-if-someone-wants-to-use-ugfx-29-with-esp32-xtensa-rtos-variant/</link><description><![CDATA[<p>
	Xtensa have had made some changes in the freertos for ESP32 . <span lang="en" xml:lang="en"><span><span>If someone is interested in uGFX-2.9 for ESP32 they should make an correction to the graphics library tree.</span></span></span>
</p>

<p>
	There are a few minor changes in the:
</p>

<p>
	src/gos/gos_freertos.h
</p>

<p>
	src/gqueue/gqueue.c
</p>

<p>
	src/gqueue/gqueue.h
</p>

<p>
	to enable ugfx window manager.
</p>

<p>
	how we can discuss this and whether it is of interest ... cheers gents.
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">4336</guid><pubDate>Wed, 23 Feb 2022 16:08:14 +0000</pubDate></item><item><title>using Win1251 fonts.</title><link>https://community.ugfx.io/topic/4394-using-win1251-fonts/</link><description><![CDATA[<p>
	I trying to use in my home project cyrilic font, but its not work for me.
</p>

<p>
	Is somebody explain me how to use such font by view words?
</p>

<p>
	- What font I have to use for this.
</p>

<p>
	- I have to
</p>

<div style="background-color:#ffffff;padding-left:2px;padding-top:0px;padding-right:0px;padding-bottom:0px;">
	<div style="color:#000000;background-color:#ffffff;font-family:Consolas;font-size:10pt;">
		<p style="background-color:#e8f2fe;">
			<span style="color:#7f0055;font-weight:bold;">#define</span><span style="color:#000000;"> MF_ENCODING MF_ENCODING_ASCII</span>
		</p>

		<p style="background-color:#e8f2fe;">
			 
		</p>

		<p style="background-color:#e8f2fe;">
			<span style="color:#000000;">----</span>
		</p>

		<p style="background-color:#e8f2fe;">
			<span style="color:#000000;">Something wrong with my project or settings and library shows bugs on the screan and not latter</span>
		</p>
	</div>
</div>
]]></description><guid isPermaLink="false">4394</guid><pubDate>Fri, 12 Apr 2024 05:47:36 +0000</pubDate></item><item><title>ILI9488 SPI Driver</title><link>https://community.ugfx.io/topic/4355-ili9488-spi-driver/</link><description><![CDATA[<p>
	Dear All,
</p>

<p>
	Created an SPI variant of ILI9488 display driver.
</p>

<p>
	In SPI mode only RGB666 mode available, so init code was modified accordingly.
</p>

<p>
	Added HARDWARE_FILLS and HARDWARE_BITFILLS functionality with DMA using a small intermediate buffer (this gives a ~2x speed improvement, and CPU offload  at a cost of few hundred bytes of memory). This "hack" can be implemented on other SPI based display, even with non standard RGB565 pixel format.
</p>

<p>
	Also added PWM backlight contolol.
</p>

<p>
	Tested on STM32F401 with ChibiOS 21.11
</p>

<p>
	 
</p>

<p>
	Please feel free to use it...
</p>

<p>
	Cheers
</p>
<p>
<a class="ipsAttachLink" href="https://community.ugfx.io/applications/core/interface/file/attachment.php?id=1260&amp;key=5246223bbb4b07e910f31ab482eb2bca" data-fileExt='zip' data-fileid='1260' data-filekey='5246223bbb4b07e910f31ab482eb2bca'>ILI9488_SPI.zip</a></p>]]></description><guid isPermaLink="false">4355</guid><pubDate>Sat, 05 Aug 2023 15:44:52 +0000</pubDate></item><item><title>I'm trying port ugfx on nrf52840 nrf5_SDK 17.0.1 but only i added the make file getting lots for error.</title><link>https://community.ugfx.io/topic/4348-im-trying-port-ugfx-on-nrf52840-nrf5_sdk-1701-but-only-i-added-the-make-file-getting-lots-for-error/</link><description><![CDATA[<p>
	I'm first time using this library not have much idea how can i port this because there is not a single example for that board. i'm adding my project here if you can check please go through it.
</p>

<p>
	Compiling file: gfx_mk.c<br />
	In file included from ./ugfx/src/../src/gfx.h:158,<br />
	                 from ./ugfx/src/../gfx.h:7,<br />
	                 from ./ugfx/src/gfx.c:16,<br />
	                 from ./ugfx/src/gfx_mk.c:14:<br />
	./ugfx/src/../src/gos/gos_rules.h:20:3: error: #error "GOS: No operating system has been defined."<br />
	   20 |  #error "GOS: No operating system has been defined."<br />
	      |   ^~~~~<br />
	./ugfx/src/../src/gos/gos_rules.h:24:3: error: #error "GOS: More than <br />
	one operation system has been defined as GFXON."<br />
	   24 |  #error "GOS: More than one operation system has been defined <br />
	as GFXON."<br />
	      |   ^~~~~<br />
	In file included from ./ugfx/src/../src/gfx.h:167,<br />
	                 from ./ugfx/src/../gfx.h:7,<br />
	                 from ./ugfx/src/gfx.c:16,<br />
	                 from ./ugfx/src/gfx_mk.c:14:<br />
	./ugfx/src/../src/gos/gos.h:496:3: error: #error "Your operating system is not supported yet"<br />
	  496 |  #error "Your operating system is not supported yet"<br />
	      |   ^~~~~<br />
	./ugfx/src/../src/gos/gos.h:500:10: error: unknown type name 'gDelay' <br />
	  500 |  typedef gDelay   delaytime_t;<br />
	      |          ^~~~~~<br />
	./ugfx/src/../src/gos/gos.h:506:10: error: unknown type name 'gTicks' <br />
	  506 |  typedef gTicks   systemticks_t;<br />
	      |          ^~~~~~<br />
	./ugfx/src/../src/gos/gos.h:507:10: error: unknown type name 'gThread'  507 |  typedef gThread   gfxThreadHandle;<br />
	      |          ^~~~~~~<br />
	./ugfx/src/../src/gos/gos.h:510:10: error: unknown type name 'gThreadreturn'<br />
	  510 |  typedef gThreadreturn threadreturn_t;<br />
	      |          ^~~~~~~~~~~~~<br />
	./ugfx/src/../src/gos/gos.h:512:10: error: unknown type name 'gThreadpriority'<br />
	  512 |  typedef gThreadpriority threadpriority_t;<br />
	      |          ^~~~~~~~~~~~~~~<br />
	./ugfx/src/../src/gos/gos.h:516:10: error: unknown type name 'gSem'   <br />
	  516 |  typedef gSem   gfxSem;<br />
	      |          ^~~~<br />
	./ugfx/src/../src/gos/gos.h:518:10: error: unknown type name 'gMutex' <br />
	  518 |  typedef gMutex   gfxMutex;<br />
	      |          ^~~~~~<br />
	In file included from ./ugfx/src/gdriver/gdriver_mk.c:8,<br />
	                 from ./ugfx/src/gfx_mk.c:16:<br />
	./ugfx/src/gdriver/gdriver.c: In function 'gdriverRegister':<br />
	./ugfx/src/gdriver/gdriver.c:45:7: warning: implicit declaration of function 'gfxAlloc' [-Wimplicit-function-declaration]<br />
	   45 |  pd = gfxAlloc(vmt-&gt;objsize);<br />
	      |       ^~~~~~~~<br />
	./ugfx/src/gdriver/gdriver.c:45:5: warning: assignment to 'GDriver *' <br />
	from 'int' makes pointer from integer without a cast [-Wint-conversio <br />
	]<br />
	   45 |  pd = gfxAlloc(vmt-&gt;objsize);<br />
	      |     ^<br />
	./ugfx/src/gdriver/gdriver.c:51:3: warning: implicit declaration of function 'gfxFree' [-Wimplicit-function-declaration]<br />
	   51 |   gfxFree(pd);<br />
	      |   ^~~~~~~<br />
	make: *** [C:\workspace\nRF5_SDK\nRF5_SDK/components/toolchain/gcc/Makefile.common:272: _build/nrf52840_xxaa/gfx_mk.c.o] Error 1
</p>
<p>
<a class="ipsAttachLink" href="https://community.ugfx.io/applications/core/interface/file/attachment.php?id=1254&amp;key=a7eefd75dc23356bc771fcb5e072d512" data-fileExt='zip' data-fileid='1254' data-filekey='a7eefd75dc23356bc771fcb5e072d512'>ugfx_nrf52840dk.zip</a></p>]]></description><guid isPermaLink="false">4348</guid><pubDate>Thu, 17 Nov 2022 11:42:36 +0000</pubDate></item><item><title>uGFX port for ESP32 and ESP-IDF</title><link>https://community.ugfx.io/topic/4345-ugfx-port-for-esp32-and-esp-idf/</link><description><![CDATA[<p>
	Hello,
</p>

<p>
	I'm newbie with uGFX!
</p>

<p>
	Has anyone already ported uGFX for ESP32 with ESP-IDF? Possibly even for ESP32 with FT81x display module?
</p>

<p>
	I found two articles on this forum related to ESP32 but they are not helpful.
</p>
]]></description><guid isPermaLink="false">4345</guid><pubDate>Thu, 28 Jul 2022 07:03:28 +0000</pubDate></item><item><title>uGFX 2.9 on WT32-SC01 3.5" with ST7796s driver</title><link>https://community.ugfx.io/topic/4335-ugfx-29-on-wt32-sc01-35-with-st7796s-driver/</link><description><![CDATA[<p>
	Hello guys,
</p>

<p>
	<span lang="en" xml:lang="en"><span><span>I am at the very beginning of the project, but I am fascinated by the possibilities and design of the library, if anyone is also interested and working on a similar hardware, I am glad to exchange information ... congrats .. </span></span></span>
</p>

<p><a href="https://community.ugfx.io/uploads/monthly_2022_02/IMG_20220218_234333.jpg.b360aeefefe8776dd01880778cfa74c4.jpg" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="1227" src="https://community.ugfx.io/uploads/monthly_2022_02/IMG_20220218_234333.thumb.jpg.234451595f3fb44f35b69e9ad1f6ae39.jpg" data-ratio="45" width="1000" class="ipsImage ipsImage_thumbnailed" alt="IMG_20220218_234333.jpg"></a></p>]]></description><guid isPermaLink="false">4335</guid><pubDate>Tue, 22 Feb 2022 20:30:36 +0000</pubDate></item><item><title>Getting Started with STM32F411 and ST7789 Display</title><link>https://community.ugfx.io/topic/1885-getting-started-with-stm32f411-and-st7789-display/</link><description><![CDATA[<p>
	My goal is the following: To show a uGFX logo on the display. 
</p>

<p>
	My hardware is the following: <br />
	Controller -&gt; STM32F411RET6<br />
	Display -&gt; China Display with ST7789 Driver<br />
	Environment: STM32CubeIDE
</p>

<p>
	Which files do I need to reach my goal? I know I need to modify some files but which?
</p>

<p>
	I've already looked at the documentation but don't quite understand what I need. Also from the examples it is not quite clear to me which files I need. 
</p>

<p>
	Thanks for your help
</p>
]]></description><guid isPermaLink="false">1885</guid><pubDate>Tue, 29 Sep 2020 08:28:12 +0000</pubDate></item><item><title>&#xB5;GFX:How to getting start with chibios 20.3</title><link>https://community.ugfx.io/topic/1928-%C2%B5gfxhow-to-getting-start-with-chibios-203/</link><description><![CDATA[<p>
	HI
</p>

<p>
	1-<br />
	I have STM32F769I discovery and i want to use the touch screen with µGFX  with chibios.<br />
	is there a demo project ?
</p>

<p>
	2-<br />
	I have add <a href="https://git.ugfx.io/uGFX/uGFX" rel="external nofollow">µGFX</a> to the project , i have also modify  the make file <a href="https://wiki.ugfx.io/index.php/Using_ChibiOS/RT" rel="external nofollow">doc</a> but i have an "error GOS:unsupported version of chibios" ,i am using chibios 20.3.2 kernal 6.1.2 .<br />
	how can i solve this problem?<br />
	is there µGFX v3 if yes how can i download it?
</p>

<p>
	<br />
	best regard,<br />
	raj
</p>
]]></description><guid isPermaLink="false">1928</guid><pubDate>Mon, 19 Oct 2020 11:14:34 +0000</pubDate></item><item><title>Running &#xB5;GFX on ESP32 and Arduino IDE</title><link>https://community.ugfx.io/topic/1009-running-%C2%B5gfx-on-esp32-and-arduino-ide/</link><description><![CDATA[<p>
	See <a href="https://community.ugfx.io/topic/921-errors-into-compile-ili9341-driver-for-arduino/?tab=comments#comment-6704" rel="">https://community.ugfx.io/topic/921-errors-into-compile-ili9341-driver-for-arduino/?tab=comments#comment-6704</a>
</p>

<p>
	and for the sake of documentation for other users: If you want to run µGFX on an ESP32 and Arduino IDE, you need to enable as OS "FreeRTOS" and not "Arduino":
</p>

<pre class="ipsCode prettyprint lang-c prettyprinted">
<span class="com">#define</span><span class="pln"> GFX_USE_OS_FREERTOS	TRUE
</span><span class="com">#define</span><span class="pln"> GFX_OS_NO_INIT 		TRUE</span></pre>

<p>
	You might get a compiler error that "FreeRTOSConfig.h" cannot be found. Something seems to be wrong with the include paths, see <a href="https://github.com/espressif/arduino-esp32/issues/1423" rel="external nofollow">https://github.com/espressif/arduino-esp32/issues/1423</a>
</p>

<p>
	In "gos_freertos.h", change the includes as follows:
</p>

<pre class="ipsCode prettyprint lang-c prettyprinted">
<span class="com">#include</span><span class="pln"> </span><span class="str">"freertos/FreeRTOS.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"freertos/FreeRTOSConfig.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"freertos/semphr.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"freertos/task.h"</span></pre>

<p>
	Then it should compile.
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">1009</guid><pubDate>Sat, 26 May 2018 21:14:00 +0000</pubDate></item><item><title>stm32f746 SPI DMA problem in uGFX</title><link>https://community.ugfx.io/topic/1175-stm32f746-spi-dma-problem-in-ugfx/</link><description><![CDATA[<pre class="ipsCode prettyprint lang-c">
 </pre>

<p>
	hai, before it i have done make data aquition with ADC external using SPI DMA...
</p>

<p>
	but when i mix it in uGFX, interrupt not show up... anyone can help?
</p>

<p>
	this is my code
</p>

<p>
	-------------------------------------------------------------------------------------------------------------------------------------------------------------------
</p>

<p>
	#if 1<br>
	//DMA1 stream 3<br>
	CH_FAST_IRQ_HANDLER(STM32_DMA1_CH3_HANDLER){<br>
	    CH_IRQ_PROLOGUE();<br>
	    chSysLockFromISR();
</p>

<p>
	    // THIS IS NEVER RUNNING <img alt=":(" data-emoticon="" height="20" src="https://community.ugfx.io/uploads/emoticons/sad.png" srcset="https://community.ugfx.io/uploads/emoticons/sad@2x.png 2x" title=":(" width="20">
</p>

<p>
	    palSetLine(LINE_ARD_D4);<br>
	    palClearLine(LINE_ARD_D4);
</p>

<p>
	    //TCIF[3:0]: stream x transfer complete interrupt flag (x = 3..0)<br>
	    //in DMA low interrupt status register (DMA_LISR)<br>
	    if ((DMA1-&gt;LISR &amp; DMA_LISR_TCIF3) != 0) {<br>
	        //NSS high<br>
	        SPI2-&gt;CR1 |= SPI_CR1_SSI;<br>
	        //disable SPI<br>
	        SPI2-&gt;CR1 &amp;= ~SPI_CR1_SPE;<br>
	        stop_sclk();<br>
	        palSetLine(LINE_ARD_D4);
</p>

<p>
	        uint32_t e_adc = (ADC_ConvertedValue[0] &lt;&lt; 16) | (ADC_ConvertedValue[ 1 ]);// &amp; 0xFF00);<br>
	        <br>
	        if(titik_spi&lt;SAMPLING_AMBIL){<br>
	            #ifdef LIHAT_HEX<br>
	                data_sample[titik_spi] = e_adc;<br>
	            #else<br>
	                data_sample[titik_spi] = e_adc &amp; 0xffffff00;<br>
	            #endif // DEBUG<br>
	            titik_spi++;<br>
	        }else sudah_penuh=true;<br>
	        <br>
	        //CTCIF[3:0]: stream x clear transfer complete interrupt flag (x = 3..0)<br>
	        //Writing 1 to this bit clears the corresponding TCIFx flag in the DMA_LISR register.<br>
	        DMA1-&gt;LIFCR |= DMA_LIFCR_CTCIF3;<br>
	        palClearLine(LINE_ARD_D4);<br>
	        spi_process++;<br>
	    }<br>
	    <br>
	    chSysUnlockFromISR();<br>
	    CH_IRQ_EPILOGUE();<br>
	}<br>
	#endif
</p>

<p>
	// this is run in main function          <br>
	void dma_config(){<br>
	    // enable clock dma1<br>
	    RCC-&gt;AHB1ENR |= RCC_AHB1ENR_DMA1EN;<br>
	    <br>
	    // de init dma<br>
	    DMA1_Stream3-&gt;CR = 0;<br>
	    DMA1_Stream3-&gt;FCR = 0;<br>
	    DMA1_Stream3-&gt;NDTR = 0;<br>
	    DMA1_Stream3-&gt;PAR = 0;<br>
	    DMA1_Stream3-&gt;M0AR = 0;
</p>

<p>
	    uint32_t tmpreg = 0;
</p>

<p>
	    /*------------------------- DMAy Streamx CR Configuration ------------------*/<br>
	      /* Get the DMAy_Streamx CR value */<br>
	    tmpreg = DMA1_Stream3-&gt;CR;
</p>

<p>
	    /* Clear CHSEL, MBURST, PBURST, PL, MSIZE, PSIZE, MINC, PINC, CIRC and DIR bits */<br>
	    tmpreg &amp;= ((uint32_t)~(DMA_SxCR_CHSEL | DMA_SxCR_MBURST | DMA_SxCR_PBURST | \<br>
	                         DMA_SxCR_PL | DMA_SxCR_MSIZE | DMA_SxCR_PSIZE | \<br>
	                         DMA_SxCR_MINC | DMA_SxCR_PINC | DMA_SxCR_CIRC | \<br>
	                         DMA_SxCR_DIR));
</p>

<p>
	    /* Configure DMAy Streamx: */<br>
	    /* Set CHSEL bits according to DMA_CHSEL value */<br>
	    tmpreg |= 0;    //000: channel 0 selected<br>
	    /* Set DIR bits according to DMA_DIR value */<br>
	    tmpreg |= 0;    //00: peripheral-to-memory<br>
	    /* Set PINC bit according to DMA_PeripheralInc value */<br>
	    tmpreg |= 0;    //0: peripheral address pointer is fixed<br>
	    /* Set MINC bit according to DMA_MemoryInc value */<br>
	    tmpreg |= DMA_SxCR_MINC;    //1: memory address pointer is incremented after each data transfer (increment is done according to MSIZE)<br>
	    /* Set PSIZE bits according to DMA_PeripheralDataSize value */<br>
	    tmpreg |= DMA_SxCR_PSIZE_0;    //01: half-word (16-bit)    (8 bit)<br>
	    /* Set MSIZE bits according to DMA_MemoryDataSize value */<br>
	    tmpreg |= DMA_SxCR_MSIZE_0;    //01: half-word (16-bit)<br>
	    /* Set CIRC bit according to DMA_Mode value */<br>
	    tmpreg |= 0;    //0: circular mode disabled<br>
	    /* Set PL bits according to DMA_Priority value */<br>
	    tmpreg |= DMA_SxCR_PL_1 | DMA_SxCR_PL_0;    //11: very high<br>
	    /* Set MBURST bits according to DMA_MemoryBurst value */<br>
	    tmpreg |= 0;    //00: single transfer<br>
	    /* Set PBURST bits according to DMA_PeripheralBurst value */<br>
	    tmpreg |= 0;    //00: single transfer
</p>

<p>
	     /* Write to DMAy Streamx CR register */<br>
	    DMA1_Stream3-&gt;CR = tmpreg;
</p>

<p>
	    /*------------------------- DMAy Streamx FCR Configuration -----------------*/<br>
	    /* Get the DMAy_Streamx FCR value */<br>
	    tmpreg = DMA1_Stream3-&gt;FCR;
</p>

<p>
	    /* Clear DMDIS and FTH bits */<br>
	    tmpreg &amp;= (uint32_t)~(DMA_SxFCR_DMDIS | DMA_SxFCR_FTH);
</p>

<p>
	    /* Configure DMAy Streamx FIFO:<br>
	    Set DMDIS bits according to DMA_FIFOMode value<br>
	    Set FTH bits according to DMA_FIFOThreshold value */<br>
	    <br>
	    //WE NOT USE FIFO!!!!<br>
	    tmpreg |= DMA_SxFCR_FTH_0;    //01: 1/2 full FIFO
</p>

<p>
	    /* Write to DMAy Streamx CR */<br>
	    DMA1_Stream3-&gt;FCR = tmpreg;
</p>

<p>
	    /*------------------------- DMAy Streamx NDTR Configuration ----------------*/<br>
	    /* Write to DMAy Streamx NDTR register */<br>
	    DMA1_Stream3-&gt;NDTR = 2;    // 16 bit * 2
</p>

<p>
	    /*------------------------- DMAy Streamx PAR Configuration -----------------*/<br>
	    /* Write to DMAy Streamx PAR */
</p>

<p>
	    //dari OVM<br>
	    #define     SPI3_DR_ADDRESS ((uint32_t) 0x40003C0C)    /* lihat halaman 709 dan table 1 hal 50 */  
</p>

<p>
	    #define     SPI2_DR_ADDRESS ((uint32_t) 0x4000380C)  <br>
	    DMA1_Stream3-&gt;PAR = (uint32_t)SPI2_DR_ADDRESS;
</p>

<p>
	    /*------------------------- DMAy Streamx M0AR Configuration ----------------*/<br>
	    /* Write to DMAy Streamx M0AR */<br>
	    DMA1_Stream3-&gt;M0AR =  &amp;ADC_ConvertedValue[0];
</p>

<p>
	    // /* Enable the selected DMA transfer interrupts */<br>
	    DMA1_Stream3-&gt;CR |= DMA_SxCR_TCIE; //| DMA_SxCR_HTIE | DMA_SxCR_TEIE | DMA_SxCR_DMEIE;<br>
	    //STM32_GPT_TIM5_IRQ_PRIORITY<br>
	    //STM32_SPI_SPI2_DMA_PRIORITY<br>
	    nvicEnableVector(DMA1_Stream3_IRQn,2);//CORTEX_PRIO_MASK
</p>

<p>
	    tmpreg = DMA1_Stream3-&gt;CR;<br>
	    chprintf(chp,"---&gt; See DMA1_Stream3-&gt;CR = 0x%x\r\n",tmpreg);<br>
	    tmpreg = DMA1_Stream3-&gt;FCR;<br>
	    chprintf(chp,"---&gt; See DMA1_Stream3-&gt;FCR = 0x%x\r\n",tmpreg);<br>
	    tmpreg = DMA1_Stream3-&gt;NDTR;<br>
	    chprintf(chp,"---&gt; See DMA1_Stream3-&gt;NDTR = 0x%x\r\n",tmpreg);<br>
	    tmpreg = DMA1_Stream3-&gt;PAR;<br>
	    chprintf(chp,"---&gt; See DMA1_Stream3-&gt;PAR = 0x%x\r\n",tmpreg);<br>
	    tmpreg = DMA1_Stream3-&gt;M0AR;<br>
	    chprintf(chp,"---&gt; See DMA1_Stream3-&gt;MOAR = 0x%x\r\n",tmpreg);
</p>

<p>
	}
</p>

<p>
	 
</p>

<p>
	thank u...
</p>
]]></description><guid isPermaLink="false">1175</guid><pubDate>Thu, 15 Aug 2019 03:50:14 +0000</pubDate></item><item><title>Need hep on project migrating.</title><link>https://community.ugfx.io/topic/1167-need-hep-on-project-migrating/</link><description><![CDATA[<p>
	Hi all,<br>
	I have a project developed with an ESP8266 and a 1,8" TFT ST7735. I have also some devices connected to I2C bus and the ISP bus has the TFT and another device. The graphics used are BMP for differents menu options (The user can choose differents options, and every option has their own screen. Some bars moving up and down, some text and no need for 3d graphics nor video. The beter way I found for this is to work on Photohop, export as BMP and convert to RGB565 with a program. All data (program and graphics) are in oly one .bin file, and the final user can update the firmware more or less in an easy way :)<br>
	The project is finished, and works very well. But I'm discovering the STM32 MCUs family and I'm very impressed with them, so I'm thinking about migrating to these MCU. Some reasons are:<br>
	-Endless GPIOs to work<br>
	-Very well documented.<br>
	-Very powerfull MCU<br>
	-An integrated IDE supported by ST.
</p>

<p>
	For the migrating, I'm thinking on the STM32F103 family, because they are very cheap an power enough.<br>
	My questions are:<br>
	1.-Can work together the STM32F103 with and 1,8"/2,3"/3,2" TFT screens?<br>
	2.-If yes, Is there a way to add external memory for the graphics (I'm using all the memory on the ESP8266, basically with the graphics data)?<br>
	3.-If yes, Will I can to upload all the .bin (program and graphics) with just one file)?<br>
	4.-Can I develope the graphics with the ugFX?<br>
	5.-Do you think will be better another family of STM32?
</p>

<p>
	I'm very newbye with this, so any information will be welcome. If you can point me to the proper readings could be fantastic!
</p>
]]></description><guid isPermaLink="false">1167</guid><pubDate>Sun, 04 Aug 2019 07:42:09 +0000</pubDate></item><item><title>Removing the display from STM32F7 Discovery</title><link>https://community.ugfx.io/topic/513-removing-the-display-from-stm32f7-discovery/</link><description><![CDATA[<p>
	I took the display off from the STM32F7 Discovery that I won in the competition <img alt=":)" data-emoticon="" height="20" src="https://community.ugfx.io/uploads/emoticons/smile.png" srcset="https://community.ugfx.io/uploads/emoticons/smile@2x.png 2x" title=":)" width="20"> as I expect to use a much larger display.  The process is easy enough but not trivial.  
</p>

<p>
	The display is attached to the board by thick two sided tape.  I used a small plastic screwdriver to split the tape by sliding the screw driver into the side of the tape.  I used a round plastic pen to force the display away from the processor board.  I do not have pictures of that process, If I do it again I will add some.  Once I got the display off I used super goof off  glue remover to reduce the stickiness of the tape.  I used a tooth brush and my finger nails to remove the glue, and it takes some time as the glue is very sticky.  I haven't removed the glue from the display at this point, I'm not sure what I will use it for.
</p>

<p>
	An image after the display was removed and before I removed the tape.
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" href="https://community.ugfx.io/uploads/monthly_2016_09/stm32f7.before.jpg.29ca6bcb554b1545012d92a176f64bb9.jpg" data-fileid="360" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="360" src="https://community.ugfx.io/uploads/monthly_2016_09/stm32f7.before.thumb.jpg.740713e4661cfc44f84d239d306734b0.jpg" alt="stm32f7.before.jpg"></a>
</p>

<p>
	What it looks like after I removed the tape.
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" href="https://community.ugfx.io/uploads/monthly_2016_09/stm32f7.after.jpg.4da12387c4db8fd3ec063cd13b1b9a6a.jpg" data-fileid="361" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="361" src="https://community.ugfx.io/uploads/monthly_2016_09/stm32f7.after.thumb.jpg.1e7888adc11dbb7fe78f82309f54e0a6.jpg" alt="stm32f7.after.jpg"></a>
</p>
]]></description><guid isPermaLink="false">513</guid><pubDate>Sun, 04 Sep 2016 19:38:07 +0000</pubDate></item><item><title>CAN Dashboard Project</title><link>https://community.ugfx.io/topic/1116-can-dashboard-project/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	I currently use a 4DSytems 5" display with a Teensy 3.2 board and Waveshare can transceiver. It seems to work quite well, but I feel restricted with what I can do due to the amount of time it takes to send data to the screen via a serial connection.
</p>

<p>
	I'm not precious about what microcontroller I use, the only reason I opted for the Teensy was it's form factor and the fact it had CAN.
</p>

<p>
	What would you guys suggest I do to move away from a serial HMI type display, and the expense of a 4DSystems display? Happy to consider anything.
</p>

<p>
	Many Thanks
</p>

<p>
	Tim
</p>

<p>
	 
</p>

<p>
	<img class="ipsImage ipsImage_thumbnailed" data-fileid="1160" src="https://community.ugfx.io/uploads/monthly_2019_02/U9hyCqn.png.8225f94abc8b9515eb97a1b0c1319864.png" alt="U9hyCqn.png.8225f94abc8b9515eb97a1b0c1319864.png">
</p>
]]></description><guid isPermaLink="false">1116</guid><pubDate>Wed, 13 Feb 2019 11:30:44 +0000</pubDate></item><item><title>uGFX BLIT API for RA8875</title><link>https://community.ugfx.io/topic/1107-ugfx-blit-api-for-ra8875/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	I am using uGFX on Raspberry Pi for displaying graphics on RA8875 based display. Raspberry Pi communicates with display using 4-wire SPI. I am porting the gdisp_lld_blit_area() driver API using  BTE (block transfer engine) available in RA8875. I am using write-BTE operation mode with ROP (raster operation) as destination = source.
</p>

<p>
	Here is my sample code with this post. screenshots of expected and actual output is also attached. any suggestions/recommendations would be helpful.
</p>

<p>
	#if 1//GDISP_HARDWARE_BITFILLS || defined(__DOXYGEN__)
</p>

<p>
	// macros<br>
	#define RA8875_MRWC             0x02<br>
	#define RA8875_BECR0            0x50<br>
	#define RA8875_BECR1            0x51<br>
	#define RA8875_HDBE0            0x58<br>
	#define RA8875_HDBE1            0x59<br>
	#define RA8875_VDBE0            0x5A<br>
	#define RA8875_VDBE1            0x5B<br>
	#define RA8875_BEWR0            0x5C<br>
	#define RA8875_BEWR1            0x5D<br>
	#define RA8875_BEHR0            0x5E<br>
	#define RA8875_BEHR1            0x5F<br>
	#define RA8875_BGCR0            0x60  // = red, next 2 are green and blue<br>
	#define RA8875_FGCR0            0x63  // = red, next 2 are green and blue<br>
	#define RA8875_MWCR0            0x40<br>
	#define RA8875_MWCR0_GFXMODE    0x00<br>
	#define RA8875_MWCR0_TXTMODE    0x80<br>
	#define RA8875_MWCR1            0x41<br>
	#define RA8875_CURH0            0x46<br>
	#define RA8875_CURH1            0x47<br>
	#define RA8875_CURV0            0x48<br>
	#define RA8875_CURV1            0x49
</p>

<p>
	/**<br>
	 * @brief   Function to draw bitmap<br>
	 * @pre        GDISP_HARDWARE_BITFILLS is GFXON<br>
	 *<br>
	 * @param[in]    g                The driver structure<br>
	 * @param[in]    destX,destY        The area position<br>
	 * @param[in]    width,height    The area size i.e. width and height<br>
	 * @param[in]    fgColor            The foreground color<br>
	 * @param[in]    bgColor            The background color<br>
	 * @param[in]    bits            The pointer to the bitmap<br>
	 *<br>
	 * @note        The parameter variables must not be altered by the driver.<br>
	*/<br>
	static GFXINLINE void drawBitmap(GDisplay *g,<br>
	        gI16 destX, gI16 destY,<br>
	        gI16 width, gI16 height,<br>
	        gU16 fgColor, gU16 bgColor,<br>
	        gU8* bits)<br>
	{<br>
	    // locals<br>
	    gI32 h = 0, w = 0;<br>
	    gU8 temp = 0, tempbkp = 0;<br>
	    static gU32 cnt = 0;
</p>

<p>
	    /*printf("\ndraw bitmap: x=%d y=%d w=%d h=%d "<br>
	            "x1=%d y1=%d x2=%d y2=%d "<br>
	            "fg=%x bg=%x cnt=%d",<br>
	            destX, destY, width, height,<br>
	            g-&gt;p.x1, g-&gt;p.y1, g-&gt;p.x2, g-&gt;p.y2,<br>
	            fgColor, bgColor, ++cnt);<br>
	            */
</p>

<p>
	    // always enter graphics mode for BTE operations<br>
	    write_index(g, RA8875_MWCR0);<br>
	    temp = (gU8)read_data(g);<br>
	    tempbkp = temp;<br>
	    temp &amp;= ~RA8875_MWCR0_TXTMODE;<br>
	    write_data(g, temp);
</p>

<p>
	    // set destination, width and height<br>
	    write_reg16(g, RA8875_HDBE0, destX);<br>
	    write_reg16(g, RA8875_VDBE0, destY);<br>
	    write_reg16(g, RA8875_BEWR0, width);  // image width<br>
	    write_reg16(g, RA8875_BEHR0, height); // image height
</p>

<p>
	    // set colors<br>
	    writeColorReg(g, RA8875_BGCR0, bgColor);<br>
	    writeColorReg(g, RA8875_FGCR0, fgColor);
</p>

<p>
	    // set cursor position<br>
	    write_reg16(g, RA8875_CURH0, destX);<br>
	    write_reg16(g, RA8875_CURV0, destY);
</p>

<p>
	    // BTE operation mode<br>
	    // Bits [3:0] 1000b is color expansion 0000b is write-BTE<br>
	    // Bits [7:4] 0111b is start bit position for color expansion<br>
	    // Bits [7:4] 1100b is S=D for write-BTE<br>
	    //write_reg8(g, RA8875_BECR1, (0x07 &lt;&lt; 4) | 0x08);  // start bit = 7, operation = Color Expansion<br>
	    write_reg8(g, RA8875_BECR1, 0xC0); // write-BTE with ROP as S=D
</p>

<p>
	    // draw in block mode 0x80, in linear mode 0xE0<br>
	    write_reg8(g, RA8875_BECR0, 0x80);  // begin operation
</p>

<p>
	    // write command<br>
	    write_index(g, RA8875_MRWC);
</p>

<p>
	    // write data<br>
	    for (h = 0; h &lt; height; h++)<br>
	    {<br>
	        //printf("\nh=%d -- ", h);<br>
	        for (w = 0; w &lt; width; w += 1)<br>
	        {<br>
	            //printf("%u ", *bits);<br>
	            //usleep(1000);<br>
	            write_data(g, *bits++);<br>
	        }<br>
	    }
</p>

<p>
	    // set text mode NOTE: this may not be needed to<br>
	    write_index(g, RA8875_MWCR0);<br>
	    //tempbkp = (gU8)read_data(g);<br>
	    //tempbkp |= RA8875_MWCR0_TXTMODE; // Set bit 7<br>
	    write_data(g, tempbkp);
</p>

<p>
	    //return from function<br>
	    return;<br>
	}
</p>

<p>
	/**<br>
	 * @brief   Fill an area using a bitmap<br>
	 * @pre        GDISP_HARDWARE_BITFILLS is GFXON<br>
	 *<br>
	 * @param[in]    g                The driver structure<br>
	 * @param[in]    g-&gt;p.x,g-&gt;p.y    The area position<br>
	 * @param[in]    g-&gt;p.cx,g-&gt;p.cy    The area size<br>
	 * @param[in]    g-&gt;p.x1,g-&gt;p.y1    The starting position in the bitmap<br>
	 * @param[in]    g-&gt;p.x2            The width of a bitmap line<br>
	 * @param[in]    g-&gt;p.ptr        The pointer to the bitmap<br>
	 *<br>
	 * @note        The parameter variables must not be altered by the driver.<br>
	 */<br>
	LLDSPEC    void gdisp_lld_blit_area(GDisplay *g)<br>
	{<br>
	    if((void *)0 == g)<br>
	    {<br>
	        //invalid pointer, return from function<br>
	        return;<br>
	    }
</p>

<p>
	    // draw the bitmap<br>
	    // 0xFFFF is white<br>
	    // 0x0000 is black<br>
	    drawBitmap(g, g-&gt;p.x, g-&gt;p.y, g-&gt;p.cx*2, g-&gt;p.cy,<br>
	            g-&gt;p.color, 0x0000, g-&gt;p.ptr);
</p>

<p>
	    //return from function<br>
	    return;<br>
	}<br>
	#endif /* use BLIT */
</p>

<p><a href="https://community.ugfx.io/uploads/monthly_2019_01/actual-output.jpg.ba094c9f962b72867dfe702aca9ce73d.jpg" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="1145" src="https://community.ugfx.io/uploads/monthly_2019_01/actual-output.thumb.jpg.d77f77335a1233ac914a7414a82e76c0.jpg" class="ipsImage ipsImage_thumbnailed" alt="actual-output.jpg"></a></p>
<p><a class="ipsAttachLink" href="//community.ugfx.io/applications/core/interface/file/attachment.php?id=1146">expected-output.bmp</a></p>
<p><a href="https://community.ugfx.io/uploads/monthly_2019_01/expected-output.jpg.45f2e993e33b56603172737b43824bdf.jpg" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="1147" src="https://community.ugfx.io/uploads/monthly_2019_01/expected-output.jpg.45f2e993e33b56603172737b43824bdf.jpg" class="ipsImage ipsImage_thumbnailed" alt="expected-output.jpg"></a></p>
<p><a class="ipsAttachLink" href="//community.ugfx.io/applications/core/interface/file/attachment.php?id=1148">blit.c</a></p>]]></description><guid isPermaLink="false">1107</guid><pubDate>Mon, 14 Jan 2019 12:24:22 +0000</pubDate></item><item><title>ugfx example projects for ADS7843 for keil for STM32L433RC</title><link>https://community.ugfx.io/topic/1086-ugfx-example-projects-for-ads7843-for-keil-for-stm32l433rc/</link><description><![CDATA[<p>
	Can someone please provide ugfx example project for STM32L433RC  for Keil uvision 5?
</p>
]]></description><guid isPermaLink="false">1086</guid><pubDate>Tue, 16 Oct 2018 11:07:10 +0000</pubDate></item><item><title>Can't use uGFX with ST7735 on nrf51</title><link>https://community.ugfx.io/topic/1067-cant-use-ugfx-with-st7735-on-nrf51/</link><description><![CDATA[<p>
	Hey, I gonna use uGFX with ST7735, unfortunately there is no board_ST7735_template.h for this driver and I wrote my own:
</p>

<pre class="ipsCode prettyprint lang-c prettyprinted">
<span class="com">#ifndef</span><span class="pln"> GDISP_LLD_BOARD_H
</span><span class="com">#define</span><span class="pln"> GDISP_LLD_BOARD_H

</span><span class="com">#include</span><span class="pln"> </span><span class="str">"nrf_gpio.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"nrf_drv_spi.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"nrf_delay.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"nrf_log.h"</span><span class="pln">
</span><span class="com">#include</span><span class="pln"> </span><span class="str">"app_error.h"</span><span class="pln">

</span><span class="com">#define</span><span class="pln"> GDISP_LLD_PIXELFORMAT			GDISP_PIXELFORMAT_RGB565

</span><span class="com">#define</span><span class="pln"> LCD_SCK     </span><span class="lit">29</span><span class="pln">
</span><span class="com">#define</span><span class="pln"> LCD_MISO    </span><span class="lit">22</span><span class="pln">
</span><span class="com">#define</span><span class="pln"> LCD_MOSI    </span><span class="lit">28</span><span class="pln">
</span><span class="com">#define</span><span class="pln"> LCD_CS      </span><span class="lit">24</span><span class="pln">
</span><span class="com">#define</span><span class="pln"> LCD_DC      </span><span class="lit">20</span><span class="pln">
</span><span class="com">#define</span><span class="pln"> LCD_RST     </span><span class="lit">23</span><span class="pln">
</span><span class="com">//#define LCD_RW      6</span><span class="pln">

</span><span class="com">#define</span><span class="pln"> SPI_INSTANCE  </span><span class="lit">1</span><span class="pln"> </span><span class="com">/**&lt; SPI instance index. */</span><span class="pln">
</span><span class="kwd">static</span><span class="pln"> </span><span class="kwd">const</span><span class="pln"> </span><span>nrf_drv_spi_t</span><span class="pln"> spi </span><span class="pun">=</span><span class="pln"> NRF_DRV_SPI_INSTANCE</span><span class="pun">(</span><span class="pln">SPI_INSTANCE</span><span class="pun">);</span><span class="pln">  </span><span class="com">/**&lt; SPI instance. */</span><span class="pln">
</span><span>nrf_drv_spi_config_t</span><span class="pln"> lcd_spi_config </span><span class="pun">=</span><span class="pln"> NRF_DRV_SPI_DEFAULT_CONFIG</span><span class="pun">;</span><span class="pln">
</span><span class="kwd">static</span><span class="pln"> </span><span class="kwd">volatile</span><span class="pln"> </span><span class="kwd">bool</span><span class="pln"> lcd_spi_xfer_done</span><span class="pun">;</span><span class="pln">  </span><span class="com">/**&lt; Flag used to indicate that SPI instance completed the transfer. */</span><span class="pln">

</span><span class="kwd">void</span><span class="pln"> lcd_spi_event_handler</span><span class="pun">(</span><span>nrf_drv_spi_evt_t</span><span class="pln"> </span><span class="kwd">const</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> p_event</span><span class="pun">)</span><span class="pln">
</span><span class="pun">{</span><span class="pln">
    lcd_spi_xfer_done </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
    </span><span class="com">//NRF_LOG_DEBUG("spi transfer completed.\n");</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> init_board</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  NRF_LOG_RAW_INFO</span><span class="pun">(</span><span class="str">"ST7735 init_board\n"</span><span class="pun">);</span><span class="pln">
  </span><span class="com">// setup pins</span><span class="pln">
  nrf_gpio_cfg_output</span><span class="pun">(</span><span class="pln">LCD_CS</span><span class="pun">);</span><span class="pln">
  nrf_gpio_cfg_output</span><span class="pun">(</span><span class="pln">LCD_DC</span><span class="pun">);</span><span class="pln">
  nrf_gpio_cfg_output</span><span class="pun">(</span><span class="pln">LCD_RST</span><span class="pun">);</span><span class="pln">
  </span><span class="com">//nrf_gpio_cfg_output(LCD_RW);</span><span class="pln">

  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_CS</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">
  </span><span class="com">//nrf_gpio_pin_write(LCD_RW, 1);</span><span class="pln">

  </span><span class="com">// reset board</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_RST</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">);</span><span class="pln">
  nrf_delay_ms</span><span class="pun">(</span><span class="lit">100</span><span class="pun">);</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_RST</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">

  </span><span class="com">// setup spi</span><span class="pln">
  lcd_spi_config</span><span class="pun">.</span><span class="pln">miso_pin </span><span class="pun">=</span><span class="pln"> LCD_MISO</span><span class="pun">;</span><span class="pln">
  lcd_spi_config</span><span class="pun">.</span><span class="pln">mosi_pin </span><span class="pun">=</span><span class="pln"> LCD_MOSI</span><span class="pun">;</span><span class="pln">
  lcd_spi_config</span><span class="pun">.</span><span class="pln">sck_pin  </span><span class="pun">=</span><span class="pln"> LCD_SCK</span><span class="pun">;</span><span class="pln">
  lcd_spi_config</span><span class="pun">.</span><span class="pln">frequency </span><span class="pun">=</span><span class="pln"> NRF_DRV_SPI_FREQ_8M</span><span class="pun">;</span><span class="pln">
  APP_ERROR_CHECK</span><span class="pun">(</span><span class="pln">nrf_drv_spi_init</span><span class="pun">(&amp;</span><span class="pln">spi</span><span class="pun">,</span><span class="pln"> </span><span class="pun">&amp;</span><span class="pln">lcd_spi_config</span><span class="pun">,</span><span class="pln"> lcd_spi_event_handler</span><span class="pun">));</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> post_init_board</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> setpin_reset</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">,</span><span class="pln"> gBool state</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  NRF_LOG_RAW_INFO</span><span class="pun">(</span><span class="str">"setpin_reset: %d\r\n"</span><span class="pun">,</span><span class="pln"> state</span><span class="pun">);</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_RST</span><span class="pun">,</span><span class="pln"> state</span><span class="pun">);</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> state</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> set_backlight</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">,</span><span class="pln"> </span><span>uint8_t</span><span class="pln"> percent</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> percent</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> acquire_bus</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_CS</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">);</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> release_bus</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_CS</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> write_cmd</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">,</span><span class="pln"> </span><span>uint8_t</span><span class="pln"> cmd</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  </span><span class="com">// dc low</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_DC</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">);</span><span class="pln">
  lcd_spi_xfer_done </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  APP_ERROR_CHECK</span><span class="pun">(</span><span class="pln">nrf_drv_spi_transfer</span><span class="pun">(&amp;</span><span class="pln">spi</span><span class="pun">,</span><span class="pln"> </span><span class="pun">&amp;</span><span class="pln">cmd</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">,</span><span class="pln"> NULL</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">));</span><span class="pln">
  </span><span class="com">//while (!lcd_spi_xfer_done){};</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> cmd</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> write_data</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">,</span><span class="pln"> </span><span>uint8_t</span><span class="pln"> data</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> data</span><span class="pun">;</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_DC</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">
  lcd_spi_xfer_done </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  APP_ERROR_CHECK</span><span class="pun">(</span><span class="pln">nrf_drv_spi_transfer</span><span class="pun">(&amp;</span><span class="pln">spi</span><span class="pun">,</span><span class="pln"> </span><span class="pun">&amp;</span><span class="pln">data</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">sizeof</span><span class="pun">(</span><span class="pln">data</span><span class="pun">),</span><span class="pln"> NULL</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">));</span><span class="pln">
  </span><span class="com">//while (!lcd_spi_xfer_done){};</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> write_data_byte</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">,</span><span class="pln"> </span><span>uint8_t</span><span class="pln"> arg</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  </span><span class="com">// dc high</span><span class="pln">
  nrf_gpio_pin_write</span><span class="pun">(</span><span class="pln">LCD_DC</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">
  lcd_spi_xfer_done </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  APP_ERROR_CHECK</span><span class="pun">(</span><span class="pln">nrf_drv_spi_transfer</span><span class="pun">(&amp;</span><span class="pln">spi</span><span class="pun">,</span><span class="pln"> </span><span class="pun">&amp;</span><span class="pln">arg</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">,</span><span class="pln"> NULL</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">));</span><span class="pln">
  </span><span class="com">//while (!lcd_spi_xfer_done){};</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> arg</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="kwd">static</span><span class="pln"> GFXINLINE </span><span>uint16_t</span><span class="pln"> read_data</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
	</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> g</span><span class="pun">;</span><span class="pln">
	</span><span class="kwd">return</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

</span><span class="com">#endif</span><span class="pln"> </span><span class="com">/* GDISP_LLD_BOARD_H */</span></pre>

<p>
	nrf51 doesn't have systick and instead of this one I use RTC timer with frequency 32kHz, but when I compile it (without errors) I see nothing on my display and in the console output. if I comment out everything with uGFX I see console output, more over I have my own lib for ST7735 and it works fine. May I use uGFX without systick, I think it needs for display's backligh?
</p>

<p>
	Maybe someone had have an experience with this display and nrf51822?
</p>
]]></description><guid isPermaLink="false">1067</guid><pubDate>Mon, 10 Sep 2018 09:14:41 +0000</pubDate></item><item><title>Atollic TrueSTUDIO "fatal error: gdisp_lld_config.h: No such file or directory" in gdisp.h</title><link>https://community.ugfx.io/topic/1033-atollic-truestudio-fatal-error-gdisp_lld_configh-no-such-file-or-directory-in-gdisph/</link><description><![CDATA[<p>
	Hey,<br>
	<br>
	I have added the library according to <a href="https://wiki.ugfx.io/index.php/Using_Eclipse" rel="external nofollow">https://wiki.ugfx.io/index.php/Using_Eclipse</a>.<br>
	Now i get the following error:
</p>

<p>
	"Description    Resource    Path    Location    Type<br>
	fatal error: gdisp_lld_config.h: No such file or directory    gdisp.h    /Display/ugfx/src/gdisp    line 166    C/C++ Problem"
</p>

<p>
	Does anyone have an idea to resolve this.<br>
	<br>
	Gr,<br>
	Angus Schmaloer
</p>
]]></description><guid isPermaLink="false">1033</guid><pubDate>Fri, 06 Jul 2018 08:26:45 +0000</pubDate></item><item><title>Getting started with E-paper displays</title><link>https://community.ugfx.io/topic/1030-getting-started-with-e-paper-displays/</link><description><![CDATA[<p>
	Hello,
</p>

<p>
	First, I'm not sure if this is the right forum for this post, so my apologies if I've come to the wrong place.
</p>

<p>
	I am completely new to uGFX, and have not even downloaded it yet.  I'd like to ask first if it will meet my purposes, as follows.
</p>

<p>
	I am a hobby electronics enthusiast, retired from a working life in electronics.
</p>

<p>
	My preferred uP is from the Microchip PIC18 range (specifically PIC18F25K50).  I use the MPLABX IDE platform with XC8 compiler.  I am far from expert in C code, but have learnt enough to be comfortable with the Microchip methods and libraries.
</p>

<p>
	My projects usually involve displays of one form or another.  Up 'til now I have used small LCD and OLED panels, and am well familiar with driving them.  I now want to experiment with E-paper displays, and have decided to start with the Waveshare 2.13inch E-paper HAT board.  It uses an SPI interface.
</p>

<p>
	I have downloaded example code for this Waveshare part, from Waveshare itself and a few other sources.  I had hoped to hack example code to suit my PIC18, but there is a major hurdle which I cannot get past, namely all example code seems to be written in CPP, which is no use with the XC8 compiler.  Microchip do not offer a CPP compiler for their 8 bit parts, and it is beyond my abilities to translate the CPP code to C.
</p>

<p>
	SO -- I wonder if uGFX can help me here ?<br>
	Can it generate code to drive this Waveshare display ?<br>
	How will it link in with MPLABX IDE ?<br>
	Does it generate C code ?<br>
	I am not even sure if these are sensible questions, and I suspect there are others I should be asking.
</p>

<p>
	Can you offer any advice?
</p>

<p>
	Many thanks.
</p>
]]></description><guid isPermaLink="false">1030</guid><pubDate>Sat, 30 Jun 2018 19:14:09 +0000</pubDate></item><item><title>Waveshare 2.9" EPD</title><link>https://community.ugfx.io/topic/760-waveshare-29-epd/</link><description><![CDATA[<p>
	Recently I've gotten <a href="http://www.waveshare.com/wiki/2.9inch_e-Paper_Module" rel="external nofollow">this</a> little display. It's my first time working with an e-paper display and I have to say it's really neat how it works!<span> </span>
</p>

<p>
	The pas few days I have been busy writing a driver for it. Rotation works, but partial refresh is not implemented yet. The reason for this, is that I have no idea how to do this. Currently the driver uses the draw_pixel method to write every pixel into a frame buffer and then flush everything at once to the display.<br>
	I have no idea if it would be beneficial to implemented partial refresh and if so how to do it. If anyone could give some more info that would be really helpful!
</p>

<p><a class="ipsAttachLink" href="//community.ugfx.io/applications/core/interface/file/attachment.php?id=774">WS29EPD.zip</a></p>]]></description><guid isPermaLink="false">760</guid><pubDate>Wed, 05 Jul 2017 08:42:04 +0000</pubDate></item><item><title>Trap for young players - STM32's SPIv2 has data packing</title><link>https://community.ugfx.io/topic/1011-trap-for-young-players-stm32s-spiv2-has-data-packing/</link><description><![CDATA[<p>
	I copied board_ILI9341_spi.h from boards/addons/gdisp for my nucleo32 STM32L432 project
</p>

<p>
	Couldn't get the LCD working, so I attached a logic analyser and ever byte that was being written was followed by a 0x00, which was obviously screwing up the init procedure.
</p>

<p>
	Turns out on the newer STM32's "SPI2-&gt;DR = data;" is a 16bit write to the DR register, which puts the low byte on the FIFO, followed by the high byte - always zero in this case as it's supposed to be an 8 bit transfer.
</p>

<p>
	This makes the SPI device perform two 8 bit transfers.
</p>

<p>
	I finally found my google-foo this morning after a few wasted hours last night and you need to cast the DR register to a uint8_t when you do the write:
</p>

<pre class="ipsCode prettyprint lang-c prettyprinted">
<span class="pun">*((</span><span>uint8_t</span><span class="pun">*)&amp;</span><span class="pln">SPI3</span><span class="pun">-&gt;</span><span class="pln">DR</span><span class="pun">)</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="pun">(</span><span>uint8_t</span><span class="pun">)</span><span class="pln"> data</span><span class="pun">;</span></pre>

<p>
	The STM32F4's don't do data packing on the DR register, but the newer L4's do. I assume other recent STM32's do as well.
</p>
]]></description><guid isPermaLink="false">1011</guid><pubDate>Tue, 05 Jun 2018 09:12:07 +0000</pubDate></item><item><title>Generic board file for ILI9341 and the Arduino IDE based on Adadruit's generic library supporting different boards</title><link>https://community.ugfx.io/topic/1000-generic-board-file-for-ili9341-and-the-arduino-ide-based-on-adadruits-generic-library-supporting-different-boards/</link><description><![CDATA[<p>
	Hi, I'm trying to get started with the µGFX lib, and my first project is to write a new board file for the Arduino IDE and ILI9341 displays based on the example given in µgfx/boards/base/ArduinoTinyScreen.
</p>

<p>
	The basic idea of my project is to use parts of Adafruit's library "Adafruit_ILI9341", since it supports a wide range of boards (Arduino Mega, TEENSYDUINO, ESP8266, ESP32, Feather STM32, ...): <a href="https://github.com/adafruit/Adafruit_ILI9341" rel="external nofollow">https://github.com/adafruit/Adafruit_ILI9341.</a>
</p>

<p>
	See board file attached: I have already stripped down the library and isolated the necessary parts to keep it small. I have already integrated the parts in the interface necessary for the ILI9341 driver. When init_board is called, I simply create a new instance of the Adafruit class and store it to g-&gt;board = new Adafruit_ILI9341(GDISP_PIN_CS, GDISP_PIN_DC, GDISP_PIN_MOSI, GDISP_PIN_CLK, rst, miso) so that I can work with it. By doing this, it should also work with multiple displays, I guess. The other functions such as "acquire_bus" are just wrapper functions
</p>

<pre class="ipsCode prettyprint lang-c prettyprinted">
<span class="kwd">static</span><span class="pln"> GFXINLINE </span><span class="kwd">void</span><span class="pln"> acquire_bus</span><span class="pun">(</span><span>GDisplay</span><span class="pln"> </span><span class="pun">*</span><span class="pln">g</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    g</span><span class="pun">-&gt;</span><span class="pln">board</span><span class="pun">.</span><span class="pln">startWrite</span><span class="pun">();</span><span class="pln">
</span><span class="pun">}</span></pre>

<p>
	Alas, there is an unsolved problem which keeps me from debugging the application and testing it with different boards. It is a problem related to C and C++ intermingeling: The compiler throws the error "unknown type name 'class'  class Adafruit_ILI9341". I have already tried different things (extern "C"...) but is doesn't work out for me.
</p>

<p>
	Is there any experienced programmer who can give me hint, so that I can finish my work and donate the board file to the project?
</p>

<p>
	By the way: <a href="https://wiki.ugfx.io/index.php/Teensy" rel="external nofollow">https://wiki.ugfx.io/index.php/Teensy</a> seems to be outdated?  I think the way to go is like shown in µgfx/boards/base/ArduinoTinyScreen?
</p>

<p>
	Maybe we can rename the wiki page in future to "Arduino IDE supported boards" and use the new generic board file based on the Adafruit library as an example project (with wiring examples for Arduino Mega and ESP32)?
</p>

<p>
	My next project would then be to test µGFX Studio and show an integration in Arduino projects as well (as a replacement for the Nextion displays). Espcially the ESP32 seems suitable for that since it has two cores: one core could do the display output stuff, the other core the sensor stuff.
</p>

<p>
	Thanks and cheers!
</p>

<p><a class="ipsAttachLink" href="//community.ugfx.io/applications/core/interface/file/attachment.php?id=1049">board_ILI9341.cpp</a></p>
<p><a class="ipsAttachLink" href="//community.ugfx.io/applications/core/interface/file/attachment.php?id=1050">board_ILI9341.h</a></p>
<p><a class="ipsAttachLink" href="//community.ugfx.io/applications/core/interface/file/attachment.php?id=1051">ugfx_test.ino</a></p>]]></description><guid isPermaLink="false">1000</guid><pubDate>Sat, 12 May 2018 19:41:09 +0000</pubDate></item><item><title>The compiled newspaper is wrong on eclipse</title><link>https://community.ugfx.io/topic/930-the-compiled-newspaper-is-wrong-on-eclipse/</link><description><![CDATA[<p>
	Thank you very much. The UGFX I use is very good. When I use eclipse to compile, I always make a mistake. Can you help me to solve it?
</p>
<p><a href="https://community.ugfx.io/uploads/monthly_2018_02/5a878da1963fa_QQ20180217100259.png.78d8e57f81dbf9b318f2f6c28a1faff2.png" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="974" src="https://community.ugfx.io/uploads/monthly_2018_02/5a878da43c2fd_QQ20180217100259.thumb.png.57787d9c40fcc0afec221bc59eaf1490.png" class="ipsImage ipsImage_thumbnailed" alt="QQ图片20180217100259.png"></a></p>]]></description><guid isPermaLink="false">930</guid><pubDate>Sat, 17 Feb 2018 01:41:59 +0000</pubDate></item><item><title>deprecated(msg) error</title><link>https://community.ugfx.io/topic/934-deprecatedmsg-error/</link><description><![CDATA[<p>
	When setting both GINPUT_NEED_MOUSE and GWIN_NEED_WIDGET  TRUE, I got this error message:
</p>

<p>
	..\..\ugfx_2.8\src\../src/gwin/gwin_widget.h(340): error:  #1204: attribute "deprecated" does not take arguments<br>
	        bool_t DEPRECATED("This call can now be removed. Attaching the mouse to GWIN is now automatic.") gwinAttachMouse(uint16_t instance);
</p>

<p>
	How could this happen?
</p>

<p>
	 
</p>

<p>
	Thanks,
</p>

<p>
	Josh
</p>
]]></description><guid isPermaLink="false">934</guid><pubDate>Thu, 22 Feb 2018 08:06:34 +0000</pubDate></item><item><title>Transplantation of ugfx</title><link>https://community.ugfx.io/topic/910-transplantation-of-ugfx/</link><description><![CDATA[<p>
	First of all, thank you very much. I like ugfx. very much. I've solved a lot of problems with your help. Now I want to migrate ugfx to any development board. For example, I'm now going to be transplanted to im6ul, and my LCD doesn't know what type it is, of course that's not the point of the problem. I've seen a lot of Wiki's official website.Because I just started, can you tell me the specific steps?
</p>]]></description><guid isPermaLink="false">910</guid><pubDate>Wed, 17 Jan 2018 04:59:28 +0000</pubDate></item><item><title>Gwin label</title><link>https://community.ugfx.io/topic/905-gwin-label/</link><description><![CDATA[<p>
	I'm executing /uGFX/demos/modules/gwin/label. There is always a false error:
</p>

<p>
	unknown type name 'GListene R'GListener GL;
</p>

<p>
	error: unknown type name 'GHandle'GHandle ghLabel1, ghLabel2;
</p>

<p>
	How should a mistake like this be solved？
</p>
]]></description><guid isPermaLink="false">905</guid><pubDate>Sun, 14 Jan 2018 01:31:02 +0000</pubDate></item></channel></rss>
