Subversion Repositories svn.mios

Rev

Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
44 tk 1
// $Id: map.h 44 2008-01-30 21:39:30Z tk $
2
/*
3
 * MAP program module definitions
4
 *
5
 * ==========================================================================
6
 *
7
 * Copyright (C) 2005  Thorsten Klose (tk@midibox.org)
8
 *
9
 * ==========================================================================
10
 *
11
 * This file is part of a MIOS application
12
 *
13
 * This application is free software; you can redistribute it and/or modify
14
 * it under the terms of the GNU General Public License as published by
15
 * the Free Software Foundation; either version 2 of the License, or
16
 * (at your option) any later version.
17
 *
18
 * This application is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with This application; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 *
27
 * ==========================================================================
28
 */
29
 
30
#ifndef _MAP_H
31
#define _MAP_H
32
 
33
/////////////////////////////////////////////////////////////////////////////
34
// Global definitions
35
/////////////////////////////////////////////////////////////////////////////
36
 
37
#define CONV_16BIT_TO_12BIT(val) ((val) >> 4)
38
#define CONV_16BIT_TO_8BIT(val)  ((val) >> 8)
39
 
40
#define CONV_10BIT_TO_12BIT(val) ((val) << 2)
41
#define CONV_10BIT_TO_11BIT(val) ((val) << 1)
42
#define CONV_10BIT_TO_9BIT(val)  ((val) >> 1)
43
#define CONV_10BIT_TO_8BIT(val)  ((val) >> 2)
44
#define CONV_10BIT_TO_7BIT(val)  ((val) >> 3)
45
 
46
#define CONV_9BIT_TO_12BIT(val)  ((val) << 3)
47
#define CONV_9BIT_TO_11BIT(val)  ((val) << 2)
48
#define CONV_9BIT_TO_10BIT(val)  ((val) << 1)
49
#define CONV_9BIT_TO_8BIT(val)   ((val) >> 1)
50
#define CONV_9BIT_TO_7BIT(val)   ((val) >> 2)
51
 
52
#define CONV_8BIT_TO_12BIT(val)  ((val) << 4)
53
#define CONV_8BIT_TO_11BIT(val)  ((val) << 3)
54
#define CONV_8BIT_TO_10BIT(val)  ((val) << 2)
55
#define CONV_8BIT_TO_9BIT(val)   ((val) << 1)
56
#define CONV_8BIT_TO_7BIT(val)   ((val) >> 1)
57
 
58
#define CONV_7BIT_TO_12BIT(val)  ((val) << 5)
59
#define CONV_7BIT_TO_11BIT(val)  ((val) << 4)
60
#define CONV_7BIT_TO_10BIT(val)  ((val) << 3)
61
#define CONV_7BIT_TO_9BIT(val)   ((val) << 2)
62
#define CONV_7BIT_TO_8BIT(val)   ((val) << 1)
63
 
64
/////////////////////////////////////////////////////////////////////////////
65
// Global Types
66
/////////////////////////////////////////////////////////////////////////////
67
 
68
 
69
 
70
/////////////////////////////////////////////////////////////////////////////
71
// Prototypes
72
/////////////////////////////////////////////////////////////////////////////
73
 
74
void MAP_Init(void);
75
void MAP_Tick(void);
76
 
77
/////////////////////////////////////////////////////////////////////////////
78
// Export global variables
79
/////////////////////////////////////////////////////////////////////////////
80
 
81
#endif /* _MAP_H */