summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h
blob: 444a45fa63f8915e88cb6af9f75834cce3c54d88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*  milkymist_video.h
 *
 *  Milkymist video input driver for RTEMS
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 *
 *  COPYRIGHT (c) 2010, 2011 Sebastien Bourdeauducq
 */

#ifndef __MILKYMIST_VIDEO_H_
#define __MILKYMIST_VIDEO_H_

#ifdef __cplusplus
extern "C" {
#endif

/* Ioctls */
#define VIDEO_BUFFER_LOCK      0x5600
#define VIDEO_BUFFER_UNLOCK    0x5601

#define VIDEO_SET_BRIGHTNESS   0x5602
#define VIDEO_GET_BRIGHTNESS   0x5603
#define VIDEO_SET_CONTRAST     0x5604
#define VIDEO_GET_CONTRAST     0x5605
#define VIDEO_SET_HUE          0x5606
#define VIDEO_GET_HUE          0x5607
#define VIDEO_GET_SIGNAL       0x5608

#define VIDEO_SET_REGISTER     0x5609
#define VIDEO_GET_REGISTER     0x560a

#define VIDEO_SET_FORMAT       0x560b

enum {
  VIDEO_FORMAT_CVBS6 = 0,
  VIDEO_FORMAT_CVBS5,
  VIDEO_FORMAT_CVBS4,
  VIDEO_FORMAT_SVIDEO,
  VIDEO_FORMAT_COMPONENT,
};

rtems_device_driver video_initialize(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void *arg
);

rtems_device_driver video_open(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void *arg
);

rtems_device_driver video_close(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void *arg
);

rtems_device_driver video_control(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void *arg
);

#define VIDEO_DRIVER_TABLE_ENTRY {video_initialize, \
video_open, video_close, NULL, NULL, video_control}

#ifdef __cplusplus
}
#endif

#endif /* __MILKYMIST_VIDEO_H_ */