mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Indent the define statement by two spaces
follow the code style convention Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
ae1fd83a46
commit
7990f90915
@@ -81,21 +81,21 @@ void NXGL_FUNCNAME(nxgl_copyrectangle, NXGLIB_SUFFIX)
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
/* REVISIT: Doesn't the following assume 8 pixels in a byte */
|
||||
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(dest->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(dest->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(dest->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(dest->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Then copy the image */
|
||||
|
||||
@@ -85,7 +85,7 @@ void NXGL_FUNCNAME(nxgl_fillrectangle, NXGLIB_SUFFIX)
|
||||
line = pinfo->fbmem + rect->pt1.y * stride + NXGL_SCALEX(rect->pt1.x);
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
@@ -93,14 +93,14 @@ void NXGL_FUNCNAME(nxgl_fillrectangle, NXGLIB_SUFFIX)
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Then fill the rectangle line-by-line */
|
||||
|
||||
@@ -127,7 +127,7 @@ void NXGL_FUNCNAME(nxgl_getrectangle, NXGLIB_SUFFIX)
|
||||
rows = rect->pt2.y - rect->pt1.y + 1;
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
@@ -135,14 +135,14 @@ void NXGL_FUNCNAME(nxgl_getrectangle, NXGLIB_SUFFIX)
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* sline = address of the first pixel in the top row of the source in
|
||||
|
||||
@@ -129,7 +129,7 @@ void NXGL_FUNCNAME(nxgl_moverectangle, NXGLIB_SUFFIX)
|
||||
rows = rect->pt2.y - rect->pt1.y + 1;
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
@@ -137,14 +137,14 @@ void NXGL_FUNCNAME(nxgl_moverectangle, NXGLIB_SUFFIX)
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* sline = address of the first pixel in the top row of the source in
|
||||
|
||||
@@ -76,42 +76,42 @@ void NXGL_FUNCNAME(nxgl_setpixel, NXGLIB_SUFFIX)
|
||||
|
||||
/* Shift the color into the proper position */
|
||||
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL == 1
|
||||
# if NXGLIB_BITSPERPIXEL == 1
|
||||
shift = (7 - (pos->x & 7)); /* Shift is 0, 1, ... 7 */
|
||||
mask = (1 << shift); /* Mask is 0x01, 0x02, .. 0x80 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 2
|
||||
# elif NXGLIB_BITSPERPIXEL == 2
|
||||
shift = (6 - ((pos->x & 3) << 1)); /* Shift is 0, 2, 4, or 6 */
|
||||
mask = (3 << shift); /* Mask is 0x03, 0x0c, 0x30, or 0xc0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 4
|
||||
# elif NXGLIB_BITSPERPIXEL == 4
|
||||
shift = (4 - ((pos->x & 1) << 2)); /* Shift is 0 or 4 */
|
||||
mask = (15 << shift); /* Mask is 0x0f or 0xf0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#else
|
||||
# error "Unsupported pixel depth"
|
||||
#endif
|
||||
# else
|
||||
# error "Unsupported pixel depth"
|
||||
# endif
|
||||
|
||||
# else /* CONFIG_NX_PACKEDMSFIRST */
|
||||
# else /* CONFIG_NX_PACKEDMSFIRST */
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL == 1
|
||||
# if NXGLIB_BITSPERPIXEL == 1
|
||||
shift = (pos->x & 7); /* Shift is 0, 1, ... 7 */
|
||||
mask = (1 << shift); /* Mask is 0x01, 0x02, .. 0x80 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 2
|
||||
# elif NXGLIB_BITSPERPIXEL == 2
|
||||
shift = (pos->x & 3) << 1; /* Shift is 0, 2, 4, or 6 */
|
||||
mask = (3 << shift); /* Mask is 0x03, 0x0c, 0x30, or 0xc0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 4
|
||||
# elif NXGLIB_BITSPERPIXEL == 4
|
||||
shift = (pos->x & 1) << 2; /* Shift is 0 or 4 */
|
||||
mask = (15 << shift); /* Mask is 0x0f or 0xf0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#else
|
||||
# error "Unsupported pixel depth"
|
||||
#endif
|
||||
#endif /* CONFIG_NX_PACKEDMSFIRST */
|
||||
# else
|
||||
# error "Unsupported pixel depth"
|
||||
# endif
|
||||
# endif /* CONFIG_NX_PACKEDMSFIRST */
|
||||
|
||||
/* Handle masking of the fractional byte */
|
||||
|
||||
|
||||
@@ -73,39 +73,39 @@ void NXGL_FUNCNAME(nxgl_setpixel, NXGLIB_SUFFIX)
|
||||
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL == 1
|
||||
# if NXGLIB_BITSPERPIXEL == 1
|
||||
shift = (7 - (pos->x & 7)); /* Shift is 0, 1, ... 7 */
|
||||
mask = (1 << shift); /* Mask is 0x01, 0x02, .. 0x80 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 2
|
||||
# elif NXGLIB_BITSPERPIXEL == 2
|
||||
shift = (6 - ((pos->x & 3) << 1)); /* Shift is 0, 2, 4, or 6 */
|
||||
mask = (3 << shift); /* Mask is 0x03, 0x0c, 0x30, or 0xc0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 4
|
||||
# elif NXGLIB_BITSPERPIXEL == 4
|
||||
shift = (4 - ((pos->x & 1) << 2)); /* Shift is 0 or 4 */
|
||||
mask = (15 << shift); /* Mask is 0x0f or 0xf0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#else
|
||||
# error "Unsupported pixel depth"
|
||||
#endif
|
||||
# else
|
||||
# error "Unsupported pixel depth"
|
||||
# endif
|
||||
|
||||
# else /* CONFIG_NX_PACKEDMSFIRST */
|
||||
#else /* CONFIG_NX_PACKEDMSFIRST */
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL == 1
|
||||
# if NXGLIB_BITSPERPIXEL == 1
|
||||
shift = (pos->x & 7); /* Shift is 0, 1, ... 7 */
|
||||
mask = (1 << shift); /* Mask is 0x01, 0x02, .. 0x80 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 2
|
||||
# elif NXGLIB_BITSPERPIXEL == 2
|
||||
shift = (pos->x & 3) << 1; /* Shift is 0, 2, 4, or 6 */
|
||||
mask = (3 << shift); /* Mask is 0x03, 0x0c, 0x30, or 0xc0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 4
|
||||
# elif NXGLIB_BITSPERPIXEL == 4
|
||||
shift = (pos->x & 1) << 2; /* Shift is 0 or 4 */
|
||||
mask = (15 << shift); /* Mask is 0x0f or 0xf0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#else
|
||||
# error "Unsupported pixel depth"
|
||||
#endif
|
||||
# else
|
||||
# error "Unsupported pixel depth"
|
||||
# endif
|
||||
#endif /* CONFIG_NX_PACKEDMSFIRST */
|
||||
|
||||
/* Handle masking of the fractional byte */
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
# define EXTERN extern "C"
|
||||
# define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
# define EXTERN extern
|
||||
# define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -81,21 +81,21 @@ void NXGL_FUNCNAME(pwfb_copyrectangle, NXGLIB_SUFFIX)
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
/* REVISIT: Doesn't the following assume 8 pixels in a byte */
|
||||
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(dest->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(dest->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(dest->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(dest->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Then copy the image */
|
||||
|
||||
@@ -86,7 +86,7 @@ void NXGL_FUNCNAME(pwfb_fillrectangle, NXGLIB_SUFFIX)
|
||||
NXGL_SCALEX(rect->pt1.x);
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
@@ -94,14 +94,14 @@ void NXGL_FUNCNAME(pwfb_fillrectangle, NXGLIB_SUFFIX)
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Then fill the rectangle line-by-line */
|
||||
|
||||
@@ -128,7 +128,7 @@ void NXGL_FUNCNAME(pwfb_getrectangle, NXGLIB_SUFFIX)
|
||||
rows = rect->pt2.y - rect->pt1.y + 1;
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
@@ -136,14 +136,14 @@ void NXGL_FUNCNAME(pwfb_getrectangle, NXGLIB_SUFFIX)
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* sline = address of the first pixel in the top row of the source in
|
||||
|
||||
@@ -129,7 +129,7 @@ void NXGL_FUNCNAME(pwfb_moverectangle, NXGLIB_SUFFIX)
|
||||
rows = rect->pt2.y - rect->pt1.y + 1;
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL < 8
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* MS byte down.
|
||||
@@ -137,14 +137,14 @@ void NXGL_FUNCNAME(pwfb_moverectangle, NXGLIB_SUFFIX)
|
||||
|
||||
leadmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt2.x - 1)));
|
||||
# else
|
||||
# else
|
||||
/* Get the mask for pixels that are ordered so that they pack from the
|
||||
* LS byte up.
|
||||
*/
|
||||
|
||||
leadmask = (uint8_t)(0xff << (8 - NXGL_REMAINDERX(rect->pt1.x)));
|
||||
tailmask = (uint8_t)(0xff >> (8 - NXGL_REMAINDERX(rect->pt1.x - 1)));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* sline = address of the first pixel in the top row of the source in
|
||||
|
||||
@@ -77,42 +77,42 @@ void NXGL_FUNCNAME(pwfb_setpixel, NXGLIB_SUFFIX)
|
||||
|
||||
/* Shift the color into the proper position */
|
||||
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL == 1
|
||||
# if NXGLIB_BITSPERPIXEL == 1
|
||||
shift = (7 - (pos->x & 7)); /* Shift is 0, 1, ... 7 */
|
||||
mask = (1 << shift); /* Mask is 0x01, 0x02, .. 0x80 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 2
|
||||
# elif NXGLIB_BITSPERPIXEL == 2
|
||||
shift = (6 - ((pos->x & 3) << 1)); /* Shift is 0, 2, 4, or 6 */
|
||||
mask = (3 << shift); /* Mask is 0x03, 0x0c, 0x30, or 0xc0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 4
|
||||
# elif NXGLIB_BITSPERPIXEL == 4
|
||||
shift = (4 - ((pos->x & 1) << 2)); /* Shift is 0 or 4 */
|
||||
mask = (15 << shift); /* Mask is 0x0f or 0xf0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#else
|
||||
# error "Unsupported pixel depth"
|
||||
#endif
|
||||
# else
|
||||
# error "Unsupported pixel depth"
|
||||
# endif
|
||||
|
||||
# else /* CONFIG_NX_PACKEDMSFIRST */
|
||||
# else /* CONFIG_NX_PACKEDMSFIRST */
|
||||
|
||||
#if NXGLIB_BITSPERPIXEL == 1
|
||||
# if NXGLIB_BITSPERPIXEL == 1
|
||||
shift = (pos->x & 7); /* Shift is 0, 1, ... 7 */
|
||||
mask = (1 << shift); /* Mask is 0x01, 0x02, .. 0x80 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 2
|
||||
# elif NXGLIB_BITSPERPIXEL == 2
|
||||
shift = (pos->x & 3) << 1; /* Shift is 0, 2, 4, or 6 */
|
||||
mask = (3 << shift); /* Mask is 0x03, 0x0c, 0x30, or 0xc0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#elif NXGLIB_BITSPERPIXEL == 4
|
||||
# elif NXGLIB_BITSPERPIXEL == 4
|
||||
shift = (pos->x & 1) << 2; /* Shift is 0 or 4 */
|
||||
mask = (15 << shift); /* Mask is 0x0f or 0xf0 */
|
||||
color <<= shift; /* Color is positioned under the mask */
|
||||
#else
|
||||
# error "Unsupported pixel depth"
|
||||
#endif
|
||||
#endif /* CONFIG_NX_PACKEDMSFIRST */
|
||||
# else
|
||||
# error "Unsupported pixel depth"
|
||||
# endif
|
||||
# endif /* CONFIG_NX_PACKEDMSFIRST */
|
||||
|
||||
/* Handle masking of the fractional byte */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user