mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Removed trailing semi-colon from macros (#1928)
* Removed commented out test definition Removed commented out test definition LV_BUILD_TEST * Remove blank line * Fix comment spelling * Added blank line * Removed trailing semi-colon in macros
This commit is contained in:
parent
3d81bb40da
commit
bc369de6fa
2
lvgl.h
2
lvgl.h
@ -82,8 +82,6 @@ extern "C" {
|
|||||||
|
|
||||||
#include "src/lv_api_map.h"
|
#include "src/lv_api_map.h"
|
||||||
|
|
||||||
//#define LV_BUILD_TEST 1
|
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
@ -1318,7 +1318,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
|
|||||||
|
|
||||||
/* Support bidirectional texts.
|
/* Support bidirectional texts.
|
||||||
* Allows mixing Left-to-Right and Right-to-Left texts.
|
* Allows mixing Left-to-Right and Right-to-Left texts.
|
||||||
* The direction will be processed according to the Unicode Bidirectioanl Algorithm:
|
* The direction will be processed according to the Unicode Bidirectional Algorithm:
|
||||||
* https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
|
* https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
|
||||||
#ifndef LV_USE_BIDI
|
#ifndef LV_USE_BIDI
|
||||||
# ifdef CONFIG_LV_USE_BIDI
|
# ifdef CONFIG_LV_USE_BIDI
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
*********************/
|
*********************/
|
||||||
#define GPU_SIZE_LIMIT 240
|
#define GPU_SIZE_LIMIT 240
|
||||||
|
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* TYPEDEFS
|
* TYPEDEFS
|
||||||
**********************/
|
**********************/
|
||||||
|
@ -108,9 +108,9 @@ enum {
|
|||||||
* Macros for all existing color depths
|
* Macros for all existing color depths
|
||||||
* to set/get values of the color channels
|
* to set/get values of the color channels
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
# define LV_COLOR_SET_R1(c, v) (c).ch.red = (uint8_t)((v) & 0x1);
|
# define LV_COLOR_SET_R1(c, v) (c).ch.red = (uint8_t)((v) & 0x1)
|
||||||
# define LV_COLOR_SET_G1(c, v) (c).ch.green = (uint8_t)((v) & 0x1);
|
# define LV_COLOR_SET_G1(c, v) (c).ch.green = (uint8_t)((v) & 0x1)
|
||||||
# define LV_COLOR_SET_B1(c, v) (c).ch.blue = (uint8_t)((v) & 0x1);
|
# define LV_COLOR_SET_B1(c, v) (c).ch.blue = (uint8_t)((v) & 0x1)
|
||||||
# define LV_COLOR_SET_A1(c, v)
|
# define LV_COLOR_SET_A1(c, v)
|
||||||
|
|
||||||
# define LV_COLOR_GET_R1(c) (c).ch.red
|
# define LV_COLOR_GET_R1(c) (c).ch.red
|
||||||
@ -118,9 +118,9 @@ enum {
|
|||||||
# define LV_COLOR_GET_B1(c) (c).ch.blue
|
# define LV_COLOR_GET_B1(c) (c).ch.blue
|
||||||
# define LV_COLOR_GET_A1(c) 1
|
# define LV_COLOR_GET_A1(c) 1
|
||||||
|
|
||||||
# define LV_COLOR_SET_R8(c, v) (c).ch.red = (uint8_t)(v) & 0x7U;
|
# define LV_COLOR_SET_R8(c, v) (c).ch.red = (uint8_t)(v) & 0x7U
|
||||||
# define LV_COLOR_SET_G8(c, v) (c).ch.green = (uint8_t)(v) & 0x7U;
|
# define LV_COLOR_SET_G8(c, v) (c).ch.green = (uint8_t)(v) & 0x7U
|
||||||
# define LV_COLOR_SET_B8(c, v) (c).ch.blue = (uint8_t)(v) & 0x3U;
|
# define LV_COLOR_SET_B8(c, v) (c).ch.blue = (uint8_t)(v) & 0x3U
|
||||||
# define LV_COLOR_SET_A8(c, v) do {} while(0)
|
# define LV_COLOR_SET_A8(c, v) do {} while(0)
|
||||||
|
|
||||||
# define LV_COLOR_GET_R8(c) (c).ch.red
|
# define LV_COLOR_GET_R8(c) (c).ch.red
|
||||||
@ -128,10 +128,10 @@ enum {
|
|||||||
# define LV_COLOR_GET_B8(c) (c).ch.blue
|
# define LV_COLOR_GET_B8(c) (c).ch.blue
|
||||||
# define LV_COLOR_GET_A8(c) 0xFF
|
# define LV_COLOR_GET_A8(c) 0xFF
|
||||||
|
|
||||||
# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)(v) & 0x1FU;
|
# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)(v) & 0x1FU
|
||||||
# define LV_COLOR_SET_G16(c, v) (c).ch.green = (uint8_t)(v) & 0x3FU;
|
# define LV_COLOR_SET_G16(c, v) (c).ch.green = (uint8_t)(v) & 0x3FU
|
||||||
# define LV_COLOR_SET_G16_SWAP(c, v) {(c).ch.green_h = (uint8_t)(((v) >> 3) & 0x7); (c).ch.green_l = (uint8_t)((v) & 0x7);}
|
# define LV_COLOR_SET_G16_SWAP(c, v) {(c).ch.green_h = (uint8_t)(((v) >> 3) & 0x7); (c).ch.green_l = (uint8_t)((v) & 0x7);}
|
||||||
# define LV_COLOR_SET_B16(c, v) (c).ch.blue = (uint8_t)(v) & 0x1FU;
|
# define LV_COLOR_SET_B16(c, v) (c).ch.blue = (uint8_t)(v) & 0x1FU
|
||||||
# define LV_COLOR_SET_A16(c, v) do {} while(0)
|
# define LV_COLOR_SET_A16(c, v) do {} while(0)
|
||||||
|
|
||||||
# define LV_COLOR_GET_R16(c) (c).ch.red
|
# define LV_COLOR_GET_R16(c) (c).ch.red
|
||||||
@ -140,10 +140,10 @@ enum {
|
|||||||
# define LV_COLOR_GET_B16(c) (c).ch.blue
|
# define LV_COLOR_GET_B16(c) (c).ch.blue
|
||||||
# define LV_COLOR_GET_A16(c) 0xFF
|
# define LV_COLOR_GET_A16(c) 0xFF
|
||||||
|
|
||||||
# define LV_COLOR_SET_R32(c, v) (c).ch.red = (uint32_t)((v) & 0xFF);
|
# define LV_COLOR_SET_R32(c, v) (c).ch.red = (uint32_t)((v) & 0xFF)
|
||||||
# define LV_COLOR_SET_G32(c, v) (c).ch.green = (uint32_t)((v) & 0xFF);
|
# define LV_COLOR_SET_G32(c, v) (c).ch.green = (uint32_t)((v) & 0xFF)
|
||||||
# define LV_COLOR_SET_B32(c, v) (c).ch.blue = (uint32_t)((v) & 0xFF);
|
# define LV_COLOR_SET_B32(c, v) (c).ch.blue = (uint32_t)((v) & 0xFF)
|
||||||
# define LV_COLOR_SET_A32(c, v) (c).ch.alpha = (uint32_t)((v) & 0xFF);
|
# define LV_COLOR_SET_A32(c, v) (c).ch.alpha = (uint32_t)((v) & 0xFF)
|
||||||
|
|
||||||
# define LV_COLOR_GET_R32(c) (c).ch.red
|
# define LV_COLOR_GET_R32(c) (c).ch.red
|
||||||
# define LV_COLOR_GET_G32(c) (c).ch.green
|
# define LV_COLOR_GET_G32(c) (c).ch.green
|
||||||
|
@ -20,6 +20,7 @@ extern "C" {
|
|||||||
#include "lv_area.h"
|
#include "lv_area.h"
|
||||||
#include "../lv_font/lv_font.h"
|
#include "../lv_font/lv_font.h"
|
||||||
#include "lv_printf.h"
|
#include "lv_printf.h"
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user