source: rtems/c/src/lib/libbsp/lm32/shared/milkymist_tmu/milkymist_tmu.h @ c541862e

4.115
Last change on this file since c541862e was c541862e, checked in by Chirayu Desai <cdesai@…>, on 12/23/13 at 16:44:42

lm32: Add doxygen

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @file
3 * @ingroup lm32_milkymist_tmu lm32_milkymist_shared
4 * @brief Milkymist TMU driver
5 */
6
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.com/license/LICENSE.
14 *
15 *  COPYRIGHT (c) 2010 Sebastien Bourdeauducq
16 */
17
18/**
19 * @defgroup lm32_milkymist_tmu Milkymist TMU
20 * @ingroup lm32_milkymist_shared
21 * @brief Milkymist TMU driver
22 * @{
23 */
24
25#ifndef __MILKYMIST_TMU_H_
26#define __MILKYMIST_TMU_H_
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/* Ioctls */
33#define TMU_EXECUTE             0x5400
34#define TMU_EXECUTE_NONBLOCK    0x5401
35#define TMU_EXECUTE_WAIT        0x5402
36
37struct tmu_vertex {
38  int x;
39  int y;
40} __attribute__((packed));
41
42struct 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
77rtems_device_driver tmu_initialize(
78  rtems_device_major_number major,
79  rtems_device_minor_number minor,
80  void *arg
81);
82
83rtems_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, \
90NULL, NULL, NULL, NULL, tmu_control}
91
92/** @} */
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* __MILKYMIST_TMU_H_ */
Note: See TracBrowser for help on using the repository browser.