mikroSDK Reference Manual
ili9341_defines.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2023 MikroElektronika d.o.o.
4
** Contact: https://www.mikroe.com/contact
5
**
6
** This file is part of the mikroSDK package
7
**
8
** Commercial License Usage
9
**
10
** Licensees holding valid commercial NECTO compilers AI licenses may use this
11
** file in accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and The MikroElektronika Company.
14
** For licensing terms and conditions see
15
** https://www.mikroe.com/legal/software-license-agreement.
16
** For further information use the contact form at
17
** https://www.mikroe.com/contact.
18
**
19
**
20
** GNU Lesser General Public License Usage
21
**
22
** Alternatively, this file may be used for
23
** non-commercial projects under the terms of the GNU Lesser
24
** General Public License version 3 as published by the Free Software
25
** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26
**
27
** The above copyright notice and this permission notice shall be
28
** included in all copies or substantial portions of the Software.
29
**
30
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31
** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32
** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34
** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35
** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36
** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37
**
38
****************************************************************************/
43
#ifndef _ILI9341_DEFINES_H_
44
#define _ILI9341_DEFINES_H_
45
46
#define DATA_SELECT() digital_out_high( &pin_rs );
47
#define COMMAND_SELECT() digital_out_low( &pin_rs );
48
49
#define WRITE_STROBE() \
50
digital_out_low( &pin_wr ); \
51
digital_out_high( &pin_wr )
52
53
#define CS_ACTIVE() digital_out_low( &pin_cs )
54
#define CS_DEACTIVE() digital_out_high( &pin_cs )
55
56
#define R_BITS(c) ((( gl_color_t )c & 0xF800 ) >> 8 )
57
#define G_BITS(c) ((( gl_color_t )c & 0x07E0 ) >> 3 )
58
#define B_BITS(c) ((( gl_color_t )c & 0x001F ) << 3 )
59
#define RED_OF(c) ( R_BITS(c) & 0x00FF )
60
#define GREEN_OF(c) ( G_BITS(c) & 0x00FF )
61
#define BLUE_OF(c) ( B_BITS(c) & 0x00FF )
62
63
#define DATA_PORT_NIBBLE_HIGH 0xFF00
64
#define PORT_DEFAULT_VALUE 0x0000
65
66
#define BACKLIGHT_DEFAULT_INTENSITY 1
67
68
#endif // _ILI9341_DEFINES_H_
69
// ------------------------------------------------------------------------- END
mikroSDK
middleware
ili9341
lib
include
ili9341_defines.h
Generated by
1.8.16