Skip to content

Commit 9a6df71

Browse files
josuahkartben
authored andcommitted
drivers: video: controls: Sort controls according to their class
Now that Control IDs have different classes, sort them to their apropriate classes sections. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent d96b372 commit 9a6df71

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

include/zephyr/drivers/video-controls.h

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,45 +52,59 @@ extern "C" {
5252
*/
5353

5454
/**
55-
* @name Generic class control IDs
55+
* @name Base class control IDs
5656
* @{
5757
*/
58-
/** Mirror the picture horizontally */
58+
#define VIDEO_CID_CAMERA_BRIGHTNESS (VIDEO_CID_BASE + 0)
59+
#define VIDEO_CID_CAMERA_CONTRAST (VIDEO_CID_BASE + 1)
60+
#define VIDEO_CID_CAMERA_SATURATION (VIDEO_CID_BASE + 2)
61+
#define VIDEO_CID_CAMERA_HUE (VIDEO_CID_BASE + 3)
62+
#define VIDEO_CID_CAMERA_EXPOSURE (VIDEO_CID_BASE + 17)
63+
#define VIDEO_CID_CAMERA_GAIN (VIDEO_CID_BASE + 19)
5964
#define VIDEO_CID_HFLIP (VIDEO_CID_BASE + 20)
60-
/** Mirror the picture vertically */
6165
#define VIDEO_CID_VFLIP (VIDEO_CID_BASE + 21)
6266
/** Power line frequency (enum) filter to avoid flicker */
6367
#define VIDEO_CID_POWER_LINE_FREQUENCY (VIDEO_CID_BASE + 24)
64-
/** Pixel rate (pixels/second) in the device's pixel array. This control is read-only. */
65-
#define VIDEO_CID_PIXEL_RATE (VIDEO_CID_IMAGE_PROC_CLASS_BASE + 2)
6668
enum video_power_line_frequency {
6769
VIDEO_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
6870
VIDEO_CID_POWER_LINE_FREQUENCY_50HZ = 1,
6971
VIDEO_CID_POWER_LINE_FREQUENCY_60HZ = 2,
7072
VIDEO_CID_POWER_LINE_FREQUENCY_AUTO = 3,
7173
};
74+
#define VIDEO_CID_CAMERA_WHITE_BAL (VIDEO_CID_BASE + 26)
7275
/**
7376
* @}
7477
*/
7578

7679
/**
77-
* @name Camera class control IDs
80+
* @name Camera class controls IDs
7881
* @{
7982
*/
80-
#define VIDEO_CID_CAMERA_EXPOSURE (VIDEO_CID_BASE + 17)
81-
#define VIDEO_CID_CAMERA_GAIN (VIDEO_CID_BASE + 19)
8283
#define VIDEO_CID_CAMERA_ZOOM (VIDEO_CID_CAMERA_CLASS_BASE + 13)
83-
#define VIDEO_CID_CAMERA_BRIGHTNESS (VIDEO_CID_BASE + 0)
84-
#define VIDEO_CID_CAMERA_SATURATION (VIDEO_CID_BASE + 2)
85-
#define VIDEO_CID_CAMERA_WHITE_BAL (VIDEO_CID_BASE + 26)
86-
#define VIDEO_CID_CAMERA_CONTRAST (VIDEO_CID_BASE + 1)
87-
#define VIDEO_CID_CAMERA_COLORBAR (VIDEO_CID_IMAGE_PROC_CLASS_BASE + 3)
88-
#define VIDEO_CID_CAMERA_HUE (VIDEO_CID_BASE + 3)
84+
/**
85+
* @}
86+
*/
87+
88+
/**
89+
* @name JPEG class control IDs
90+
* @{
91+
*/
8992
#define VIDEO_CID_CAMERA_QUALITY (VIDEO_CID_JPEG_CLASS_BASE + 3)
9093
/**
9194
* @}
9295
*/
9396

97+
/**
98+
* @name Image Processing class control IDs
99+
* @{
100+
*/
101+
/** Pixel rate (pixels/second) in the device's pixel array. This control is read-only. */
102+
#define VIDEO_CID_PIXEL_RATE (VIDEO_CID_IMAGE_PROC_CLASS_BASE + 2)
103+
#define VIDEO_CID_CAMERA_COLORBAR (VIDEO_CID_IMAGE_PROC_CLASS_BASE + 3)
104+
/**
105+
* @}
106+
*/
107+
94108
#ifdef __cplusplus
95109
}
96110
#endif

0 commit comments

Comments
 (0)