RTEMS  5.1
milkymist_tmu.h
Go to the documentation of this file.
1 
7 /* milkymist_tmu.h
8  *
9  * Milkymist TMU driver for RTEMS
10  *
11  * The license and distribution terms for this file may be
12  * found in the file LICENSE in this distribution or at
13  * http://www.rtems.org/license/LICENSE.
14  *
15  * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
16  */
17 
25 #ifndef __MILKYMIST_TMU_H_
26 #define __MILKYMIST_TMU_H_
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /* Ioctls */
33 #define TMU_EXECUTE 0x5400
34 #define TMU_EXECUTE_NONBLOCK 0x5401
35 #define TMU_EXECUTE_WAIT 0x5402
36 
37 struct tmu_vertex {
38  int x;
39  int y;
40 } __attribute__((packed));
41 
42 struct tmu_td {
43  unsigned int flags;
44  unsigned int hmeshlast;
45  unsigned int vmeshlast;
46  unsigned int brightness;
47  unsigned short chromakey;
48  struct tmu_vertex *vertices;
49  unsigned short *texfbuf;
50  unsigned int texhres;
51  unsigned int texvres;
52  unsigned int texhmask;
53  unsigned int texvmask;
54  unsigned short *dstfbuf;
55  unsigned int dsthres;
56  unsigned int dstvres;
57  int dsthoffset;
58  int dstvoffset;
59  unsigned int dstsquarew;
60  unsigned int dstsquareh;
61  unsigned int alpha;
62 
63  bool invalidate_before;
64  bool invalidate_after;
65 };
66 
67 #define TMU_BRIGHTNESS_MAX (63)
68 #define TMU_MASK_NOFILTER (0x3ffc0)
69 #define TMU_MASK_FULL (0x3ffff)
70 #define TMU_FIXEDPOINT_SHIFT (6)
71 #define TMU_ALPHA_MAX (63)
72 #define TMU_MESH_MAXSIZE (128)
73 
74 #define TMU_FLAG_CHROMAKEY (2)
75 #define TMU_FLAG_ADDITIVE (4)
76 
77 rtems_device_driver tmu_initialize(
78  rtems_device_major_number major,
79  rtems_device_minor_number minor,
80  void *arg
81 );
82 
83 rtems_device_driver tmu_control(
84  rtems_device_major_number major,
85  rtems_device_minor_number minor,
86  void *arg
87 );
88 
89 #define TMU_DRIVER_TABLE_ENTRY {tmu_initialize, \
90 NULL, NULL, NULL, NULL, tmu_control}
91 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* __MILKYMIST_TMU_H_ */
Definition: milkymist_tmu.h:37
Definition: milkymist_tmu.h:42
Definition: jffs2.h:95
rtems_status_code
Classic API Status.
Definition: status.h:43