eGUI alias D4D
Release 3.0
Reference Manual
Introduction
Pages
Reference
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
d4dlcdhw_flexbus_8b.h
Go to the documentation of this file.
1
/**************************************************************************
2
*
3
* Copyright 2014 by Petr Gargulak. eGUI Community.
4
* Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5
*
6
***************************************************************************
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License Version 3
9
* or later (the "LGPL").
10
*
11
* As a special exception, the copyright holders of the eGUI project give you
12
* permission to link the eGUI sources with independent modules to produce an
13
* executable, regardless of the license terms of these independent modules,
14
* and to copy and distribute the resulting executable under terms of your
15
* choice, provided that you also meet, for each linked independent module,
16
* the terms and conditions of the license of that module.
17
* An independent module is a module which is not derived from or based
18
* on this library.
19
* If you modify the eGUI sources, you may extend this exception
20
* to your version of the eGUI sources, but you are not obligated
21
* to do so. If you do not wish to do so, delete this
22
* exception statement from your version.
23
*
24
* This program is distributed in the hope that it will be useful,
25
* but WITHOUT ANY WARRANTY; without even the implied warranty of
26
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27
*
28
* You should have received a copy of the GNU General Public License
29
* and the GNU Lesser General Public License along with this program.
30
* If not, see <http://www.gnu.org/licenses/>.
31
*
32
***************************************************************************/
46
#ifndef __D4DLCDHW_FLEXBUS_8B_H
47
#define __D4DLCDHW_FLEXBUS_8B_H
48
49
#if (D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_flexbus_8b_ID)
50
51
/******************************************************************************
52
* Includes
53
******************************************************************************/
54
#include "d4dlcdhw_flexbus_8b_cfg.h"
55
56
57
/******************************************************************************
58
* Types
59
******************************************************************************/
60
61
/******************************************************************************
62
* Macros
63
******************************************************************************/
64
65
#define SET(x) (x##_PORT) |= (1 << (x))
66
#define RESET(x) (x##_PORT) &= ~(1 << (x))
67
68
#define OUTPUT(x) (x##_DDR) |= (1 << (x))
69
#define INPUT(x) (x##_DDR) &= ~(1 << (x))
70
71
72
/******************************************************************************
73
* Constants
74
******************************************************************************/
75
76
77
#ifndef D4DLCD_FLEX_BASE_ADDRESS
78
#define D4DLCD_FLEX_BASE_ADDRESS 0x00410000
79
#endif
80
81
#ifndef D4DLCD_FLEX_DC_ADDRESS
82
#define D4DLCD_FLEX_DC_ADDRESS 0x00400000
83
#endif
84
85
#ifndef D4DLCD_FLEX_ADRESS_MASK
86
#define D4DLCD_FLEX_ADRESS_MASK 0x00010000
87
#endif
88
89
90
#ifndef D4DLCD_FLEX_CS
91
#define D4DLCD_FLEX_CS 0
92
#else
93
#if (D4DLCD_FLEX_CS < 0) || (D4DLCD_FLEX_CS > 1)
94
#error The D4DLCD_FLEX_CS value must be set to 0 or 1
95
#endif
96
#endif
97
98
#ifdef D4DLCD_BACKLIGHT
99
100
#ifndef D4DLCD_INIT_BACKLIGHT
101
#define D4DLCD_INIT_BACKLIGHT OUTPUT(D4DLCD_BACKLIGHT);
102
#endif
103
104
#ifndef D4DLCD_ASSERT_BACKLIGHT
105
#define D4DLCD_ASSERT_BACKLIGHT RESET(D4DLCD_BACKLIGHT);
106
#endif
107
108
#ifndef D4DLCD_DEASSERT_BACKLIGHT
109
#define D4DLCD_DEASSERT_BACKLIGHT SET(D4DLCD_BACKLIGHT);
110
#endif
111
112
#endif
113
114
#ifndef D4DLCD_INIT_RESET
115
#ifndef D4DLCD_RESET
116
#error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
117
#else
118
#define D4DLCD_INIT_RESET OUTPUT(D4DLCD_RESET);
119
#endif
120
#endif
121
122
#ifndef D4DLCD_ASSERT_RESET
123
#ifndef D4DLCD_RESET
124
#error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
125
#else
126
#define D4DLCD_ASSERT_RESET RESET(D4DLCD_RESET);
127
#endif
128
#endif
129
130
#ifndef D4DLCD_DEASSERT_RESET
131
#ifndef D4DLCD_RESET
132
#error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
133
#else
134
#define D4DLCD_DEASSERT_RESET SET(D4DLCD_RESET);
135
#endif
136
#endif
137
138
/******************************************************************************
139
* Global variables
140
******************************************************************************/
141
142
/******************************************************************************
143
* Global functions
144
******************************************************************************/
145
146
#endif
147
#endif
/* __D4DLCDHW_FLEXBUS_8B_H */
148
149
150
151
152
153
154
155
156
157
GIT
PRIVATE
eGUI
D4D
low_level_drivers
LCD
lcd_hw_interface
flexbus_8b
d4dlcdhw_flexbus_8b.h
Generated on Thu Sep 21 2017 08:47:44 for eGUI alias D4D by
1.8.5