diff --git a/ChangeLog b/ChangeLog index 6fad0d0ba9..bf7e051686 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3675,3 +3675,9 @@ file paths. * nuttx/arch/arm/src/arm/Toolchain.defs: Add support for more ARM toolchains (from Mike Smith). + * arch/arm/src/stm32/stm32f40xxx_rcc.c: Enabled FLASH prefetch (from Petteri + Aimonen). + * graphics/nxtk/nxtk_filltrapwindow.c: Correct an offset problem (from + Peterri Aimonen). + * graphics/nxglib/nxglib_splitline.c: Fix error in drawing of near horizontal + lines (from Peterri Aimonen). diff --git a/arch/arm/src/stm32/chip/stm32_flash.h b/arch/arm/src/stm32/chip/stm32_flash.h index c2e4409239..d6fcecc114 100644 --- a/arch/arm/src/stm32/chip/stm32_flash.h +++ b/arch/arm/src/stm32/chip/stm32_flash.h @@ -110,6 +110,7 @@ # define FLASH_ACR_HLFCYA (1 << 3) /* FLASH half cycle access */ # define FLASH_ACR_PRTFBE (1 << 4) /* FLASH prefetch enable */ #elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) +# define FLASH_ACR_PRFTEN (1 << 8) /* FLASH prefetch enable */ # define FLASH_ACR_ICEN (1 << 9) /* Bit 9: Instruction cache enable */ # define FLASH_ACR_DCEN (1 << 10) /* Bit 10: Data cache enable */ # define FLASH_ACR_ICRST (1 << 11) /* Bit 11: Instruction cache reset */ diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index 6c1861ef8c..c7f97b25ac 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -101,11 +101,11 @@ */ # if (defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_RS485)) || \ - (defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_RS485)) || \ - (defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_RS485)) || \ - (defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_RS485)) || \ - (defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_RS485)) || \ - (defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_RS485)) \ + (defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_RS485)) || \ + (defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_RS485)) || \ + (defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_RS485)) || \ + (defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_RS485)) || \ + (defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_RS485)) # error "RXDMA and RS-485 cannot be enabled at the same time for the same U[S]ART" # endif diff --git a/arch/arm/src/stm32/stm32f40xxx_rcc.c b/arch/arm/src/stm32/stm32f40xxx_rcc.c index 45980f2889..14ee1e7549 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rcc.c @@ -633,7 +633,7 @@ static void stm32_stdclockconfig(void) /* Enable FLASH prefetch, instruction cache, data cache, and 5 wait states */ - regval = (FLASH_ACR_LATENCY_5 | FLASH_ACR_ICEN | FLASH_ACR_DCEN); + regval = (FLASH_ACR_LATENCY_5 | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_PRFTEN); putreg32(regval, STM32_FLASH_ACR); /* Select the main PLL as system clock source */ diff --git a/graphics/nxglib/nxglib_splitline.c b/graphics/nxglib/nxglib_splitline.c index 84892b67e3..cbf2d5ff37 100644 --- a/graphics/nxglib/nxglib_splitline.c +++ b/graphics/nxglib/nxglib_splitline.c @@ -41,6 +41,7 @@ #include #include +#include #include @@ -192,9 +193,11 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, /* The final degenerate case */ - if (linewidth == 1) + if (linewidth == 1 && + abs(line.pt2.x - line.pt1.x) < (line.pt2.y - line.pt1.y)) { - /* A line of width 1 is basically a single parallelogram of width 1 */ + /* A close to vertical line of width 1 is basically + * a single parallelogram of width 1 */ traps[1].top.x1 = itob16(line.pt1.x); traps[1].top.x2 = traps[1].top.x1; diff --git a/graphics/nxtk/nxtk_filltrapwindow.c b/graphics/nxtk/nxtk_filltrapwindow.c index c1032f1e75..55c051ffd7 100644 --- a/graphics/nxtk/nxtk_filltrapwindow.c +++ b/graphics/nxtk/nxtk_filltrapwindow.c @@ -94,6 +94,7 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoid_s *tra { FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s relclip; + struct nxgl_trapezoid_s reltrap; #ifdef CONFIG_DEBUG if (!hfwnd || !trap || !color) @@ -103,8 +104,14 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoid_s *tra } #endif - /* Perform the fill, clipping to the client window */ + /* Move the trapezoid from window contents area to window area */ + nxgl_trapoffset(&reltrap, trap, + fwnd->fwrect.pt1.x - fwnd->wnd.bounds.pt1.x, + fwnd->fwrect.pt1.y - fwnd->wnd.bounds.pt1.y); + + /* Perform the fill, clipping to the client window */ nxgl_rectoffset(&relclip, &fwnd->fwrect, -fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y); - return nx_filltrapezoid((NXWINDOW)hfwnd, &relclip, trap, color); + + return nx_filltrapezoid((NXWINDOW)hfwnd, &relclip, &reltrap, color); }