From fd72148f286bf5a422501eebef85572314af8b41 Mon Sep 17 00:00:00 2001 From: TaeminYeom Date: Mon, 9 Jan 2023 10:51:17 +0900 Subject: [PATCH] display: remove ROTATION_ANGLE_DEGREE_360 display rotation degree 360 is same angle with degree 0. So, it is not needed. Change-Id: I5eb0873282734deb0ab957d798fceed4edf82986 Signed-off-by: TaeminYeom --- include/display-internal.h | 3 --- src/display.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/display-internal.h b/include/display-internal.h index 908edc3..e6ef10c 100644 --- a/include/display-internal.h +++ b/include/display-internal.h @@ -57,7 +57,6 @@ typedef enum DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90 = 90, /**< Display rotation state is 90 degree */ DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180 = 180, /**< Display rotation state is 180 degree */ DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270 = 270, /**< Display rotation state is 270 degree */ - DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360 = 360, /**< Display rotation state is 360 degree */ } device_display_rotation_angle_e; @@ -186,7 +185,6 @@ int is_feature_display_supported(void); * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90\n * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180\n * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270\n - * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360\n * @return @c 0 on success, * otherwise a negative error value * @retval #DEVICE_ERROR_NONE Successful @@ -211,7 +209,6 @@ int device_display_get_rotation_angle(int display_index, device_display_rotation * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90\n * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180\n * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270\n - * DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360\n * @param[in] direction The type is display rotation direction\n * DEVICE_DISPLAY_ROTATION_DIRECTION_CLOCKWISE\n * DEVICE_DISPLAY_ROTATION_DIRECTION_COUNTER_CLOCKWISE\n diff --git a/src/display.c b/src/display.c index 2f434f6..7dc7161 100644 --- a/src/display.c +++ b/src/display.c @@ -52,6 +52,7 @@ #define DISPLAY_WHITE_BALANCE_OFFSET_MIN 0 #define SENSOR_SHIFT_TYPE 16 +#define ROTATION_ANGLE_DEGREE_MAX 360 static int display_cnt = -1; struct display { @@ -637,7 +638,7 @@ int device_display_set_rotation_angle(int display_index, return DEVICE_ERROR_INVALID_PARAMETER; if (angle < DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_0 - || angle > DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360) + || angle > ROTATION_ANGLE_DEGREE_MAX) return DEVICE_ERROR_INVALID_PARAMETER; switch (direction) { -- 2.7.4