display: remove ROTATION_ANGLE_DEGREE_360 77/286477/2
authorTaeminYeom <taemin.yeom@samsung.com>
Mon, 9 Jan 2023 01:51:17 +0000 (10:51 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Mon, 9 Jan 2023 02:40:31 +0000 (11:40 +0900)
display rotation degree 360 is same angle with degree 0.
So, it is not needed.

Change-Id: I5eb0873282734deb0ab957d798fceed4edf82986
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
include/display-internal.h
src/display.c

index 908edc3..e6ef10c 100644 (file)
@@ -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
index 2f434f6..7dc7161 100644 (file)
@@ -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) {