You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 06:31:50 UTC

[incubator-nuttx] 07/28: arch/arm/src/stm32/stm32_dma2d.c: Appease nxstyle

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d289fd92afcb4531e4ee3d5286d69593fd2e8e67
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:46:05 2020 +0900

    arch/arm/src/stm32/stm32_dma2d.c: Appease nxstyle
    
    The following errors are intentionally left.
    (Hardware constants like DMA2D_xGPFCCR_CCM.)
    
    arch/arm/src/stm32/stm32_dma2d.c:484:12: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:692:13: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:701:18: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:706:18: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:711:18: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:725:14: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:732:18: error: Mixed case identifier found
---
 arch/arm/src/stm32/stm32_dma2d.c | 67 +++++++++++++++++++++++-----------------
 1 file changed, 38 insertions(+), 29 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c
index 17d15ec..38938da 100644
--- a/arch/arm/src/stm32/stm32_dma2d.c
+++ b/arch/arm/src/stm32/stm32_dma2d.c
@@ -206,11 +206,14 @@ static int stm32_dma2d_start(void);
 #ifdef CONFIG_STM32_FB_CMAP
 static int stm32_dma2d_loadclut(uintptr_t reg);
 #endif
-static uint32_t stm32_dma2d_memaddress(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       uint32_t xpos, uint32_t ypos);
-static uint32_t stm32_dma2d_lineoffset(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       FAR const struct fb_area_s *area);
-static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo, int lid,
+static uint32_t stm32_dma2d_memaddress(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   uint32_t xpos, uint32_t ypos);
+static uint32_t stm32_dma2d_lineoffset(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   FAR const struct fb_area_s *area);
+static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo,
+                              int lid,
                               uint32_t xpos, uint32_t ypos,
                               FAR const struct fb_area_s *area);
 static void stm32_dma2d_lcolor(int lid, uint32_t argb);
@@ -255,7 +258,7 @@ static uint32_t g_clut[STM32_DMA2D_NCLUT *
 #  else
                       3
 #  endif
-                      / 4 ];
+                      / 4];
 #endif /* CONFIG_STM32_FB_CMAP */
 
 /* The DMA2D semaphore that enforces mutually exclusive access */
@@ -535,8 +538,9 @@ static int stm32_dma2d_start(void)
  *
  ****************************************************************************/
 
-static uint32_t stm32_dma2d_memaddress(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       uint32_t xpos, uint32_t ypos)
+static uint32_t stm32_dma2d_memaddress(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   uint32_t xpos, uint32_t ypos)
 {
   uint32_t offset;
   FAR struct fb_overlayinfo_s *poverlay = oinfo->oinfo;
@@ -561,8 +565,9 @@ static uint32_t stm32_dma2d_memaddress(FAR struct stm32_dma2d_overlay_s *oinfo,
  *
  ****************************************************************************/
 
-static uint32_t stm32_dma2d_lineoffset(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       FAR const struct fb_area_s *area)
+static uint32_t stm32_dma2d_lineoffset(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   FAR const struct fb_area_s *area)
 {
   uint32_t loffset;
 
@@ -594,7 +599,8 @@ static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo,
   lcdinfo("oinfo=%p, lid=%d, xpos=%d, ypos=%d, area=%p\n",
            oinfo, lid, xpos, ypos, area);
 
-  putreg32(stm32_dma2d_memaddress(oinfo, xpos, ypos), stm32_mar_layer_t[lid]);
+  putreg32(stm32_dma2d_memaddress(oinfo, xpos, ypos),
+           stm32_mar_layer_t[lid]);
   putreg32(stm32_dma2d_lineoffset(oinfo, area), stm32_or_layer_t[lid]);
 }
 
@@ -678,8 +684,8 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
 {
   uint32_t   pfccrreg;
 
-  lcdinfo("lid=%d, blendmode=%08x, alpha=%02x, fmt=%d\n", lid, blendmode, alpha,
-          fmt);
+  lcdinfo("lid=%d, blendmode=%08x, alpha=%02x, fmt=%d\n",
+          lid, blendmode, alpha, fmt);
 
   /* Set color format */
 
@@ -724,7 +730,6 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
       /* Set alpha value */
 
       pfccrreg |= DMA2D_xGPFCCR_ALPHA(alpha);
-
     }
 
   putreg32(pfccrreg, stm32_pfccr_layer_t[lid]);
@@ -807,12 +812,13 @@ static int stm32_dma2d_setclut(FAR const struct fb_cmap_s *cmap)
  * Input Parameters:
  *   oinfo - Overlay to fill
  *   area  - Reference to the valid area structure select the area
- *   argb  - Color to fill the selected area. Color must be argb8888 formatted.
+ *   argb  - Color to fill the selected area. Color must be argb8888
+ *           formatted.
  *
  * Returned Value:
  *    OK        - On success
- *   -EINVAL    - If one of the parameter invalid or if the size of the selected
- *                area outside the visible area of the layer.
+ *   -EINVAL    - If one of the parameter invalid or if the size of the
+ *                selected area outside the visible area of the layer.
  *   -ECANCELED - Operation cancelled, something goes wrong.
  *
  ****************************************************************************/
@@ -890,8 +896,9 @@ static int stm32_dma2d_fillcolor(FAR struct stm32_dma2d_overlay_s *oinfo,
  *
  * Returned Value:
  *    OK        - On success
- *   -EINVAL    - If one of the parameter invalid or if the size of the selected
- *                source area outside the visible area of the destination layer.
+ *   -EINVAL    - If one of the parameter invalid or if the size of the
+ *                selected source area outside the visible area of the
+ *                destination layer.
  *                (The visible area usually represents the display size)
  *   -ECANCELED - Operation cancelled, something goes wrong.
  *
@@ -969,9 +976,9 @@ static int stm32_dma2d_blit(FAR struct stm32_dma2d_overlay_s *doverlay,
  * Description:
  *   Blends the selected area from a background layer with selected position
  *   of the foreground layer. Copies the result to the selected position of
- *   the destination layer. Note! The content of the foreground and background
- *   layer keeps unchanged as long destination layer is unequal to the
- *   foreground and background layer.
+ *   the destination layer. Note! The content of the foreground and
+ *   background layer keeps unchanged as long destination layer is unequal to
+ *   the foreground and background layer.
  *
  * Input Parameters:
  *   doverlay - Destination overlay
@@ -981,13 +988,14 @@ static int stm32_dma2d_blit(FAR struct stm32_dma2d_overlay_s *doverlay,
  *   forexpos - x-Offset foreground overlay
  *   foreypos - y-Offset foreground overlay
  *   boverlay - Background overlay
- *   barea    - x-Offset, y-Offset, x-resolution and y-resolution of background
- *              overlay
+ *   barea    - x-Offset, y-Offset, x-resolution and y-resolution of
+ *              background overlay
  *
  * Returned Value:
  *    OK        - On success
- *   -EINVAL    - If one of the parameter invalid or if the size of the selected
- *                source area outside the visible area of the destination layer.
+ *   -EINVAL    - If one of the parameter invalid or if the size of the
+ *                selected source area outside the visible area of the
+ *                destination layer.
  *                (The visible area usually represents the display size)
  *   -ECANCELED - Operation cancelled, something goes wrong.
  *
@@ -1098,8 +1106,8 @@ int stm32_dma2dinitialize(void)
        * arch/arm/src/stm32/stm32f40xxx_rcc.c
        */
 
-      /* Initialize the DMA2D semaphore that enforces mutually exclusive access
-       * to the driver
+      /* Initialize the DMA2D semaphore that enforces mutually exclusive
+       * access to the driver
        */
 
       nxsem_init(&g_lock, 0, 1);
@@ -1125,7 +1133,8 @@ int stm32_dma2dinitialize(void)
 #endif
 
       stm32_dma2d_control(DMA2D_CR_TCIE | DMA2D_CR_CTCIE | DMA2D_CR_TEIE |
-                          DMA2D_CR_CAEIE | DMA2D_CR_CTCIE | DMA2D_CR_CEIE, 0);
+                          DMA2D_CR_CAEIE | DMA2D_CR_CTCIE | DMA2D_CR_CEIE,
+                          0);
 
       /* Attach DMA2D interrupt vector */