Developer World
Spresense SDK Library v3.2.0-ebc0364
board_lcdpins.h
1/****************************************************************************
2 * boards/arm/cxd56xx/spresense/include/board_lcdpins.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 ****************************************************************************/
20
21#ifndef __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_BOARD_LCDPINS_H
22#define __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_BOARD_LCDPINS_H
23
24/****************************************************************************
25 * Included Files
26 ****************************************************************************/
27
28#include <nuttx/config.h>
29
30/****************************************************************************
31 * Pre-processor Definitions
32 ****************************************************************************/
33
34/* ILI934X RST pin definition */
35
36#if defined(CONFIG_LCD_RSTPIN_UART2_TX) \
37 || defined(CONFIG_LCD_RSTPIN_UART2_TX_E)
38# define ILI934X_RST_PIN PIN_UART2_TXD
39#elif defined(CONFIG_LCD_RSTPIN_UART2_RX) \
40 || defined(CONFIG_LCD_RSTPIN_UART2_RX_E)
41# define ILI934X_RST_PIN PIN_UART2_RXD
42#elif defined(CONFIG_LCD_RSTPIN_UART2_RTS)
43# define ILI934X_RST_PIN PIN_UART2_RTS
44#elif defined(CONFIG_LCD_RSTPIN_UART2_CTS)
45# define ILI934X_RST_PIN PIN_UART2_CTS
46#elif defined(CONFIG_LCD_RSTPIN_I2S0_BCK)
47# define ILI934X_RST_PIN PIN_I2S0_BCK
48#elif defined(CONFIG_LCD_RSTPIN_I2S0_LRCK)
49# define ILI934X_RST_PIN PIN_I2S0_LRCK
50#elif defined(CONFIG_LCD_RSTPIN_SEN_IRQ_IN)
51# define ILI934X_RST_PIN PIN_SEN_IRQ_IN
52#elif defined(CONFIG_LCD_RSTPIN_EMMC_DATA3)
53# define ILI934X_RST_PIN PIN_EMMC_DATA3
54#elif defined(CONFIG_LCD_RSTPIN_EMMC_DATA2)
55# define ILI934X_RST_PIN PIN_EMMC_DATA2
56#elif defined(CONFIG_LCD_RSTPIN_I2S0_DATA_IN)
57# define ILI934X_RST_PIN PIN_I2S0_DATA_IN
58#elif defined(CONFIG_LCD_RSTPIN_I2S0_DATA_OUT)
59# define ILI934X_RST_PIN PIN_I2S0_DATA_OUT
60#elif defined(CONFIG_LCD_RSTPIN_I2C0_SCL) \
61 || defined(CONFIG_LCD_RSTPIN_I2C0_SCL_E)
62# define ILI934X_RST_PIN PIN_I2C0_BCK
63#elif defined(CONFIG_LCD_RSTPIN_I2C0_SDA) \
64 || defined(CONFIG_LCD_RSTPIN_I2C0_SDA_E)
65# define ILI934X_RST_PIN PIN_I2C0_BDT
66#elif defined(CONFIG_LCD_RSTPIN_PWM2)
67# define ILI934X_RST_PIN PIN_PWM2
68#elif defined(CONFIG_LCD_RSTPIN_SPI2_MISO)
69# define ILI934X_RST_PIN PIN_SPI2_MISO
70#elif defined(CONFIG_LCD_RSTPIN_SPI3_CS1_X)
71# define ILI934X_RST_PIN PIN_SPI3_CS1_X
72#elif defined(CONFIG_LCD_RSTPIN_PWM0)
73# define ILI934X_RST_PIN PIN_PWM0
74#elif defined(CONFIG_LCD_RSTPIN_PWM1)
75# define ILI934X_RST_PIN PIN_PWM1
76#elif defined(CONFIG_LCD_RSTPIN_SPI2_MOSI)
77# define ILI934X_RST_PIN PIN_SPI2_MOSI
78#elif defined(CONFIG_LCD_RSTPIN_PWM3)
79# define ILI934X_RST_PIN PIN_PWM3
80#elif defined(CONFIG_LCD_RSTPIN_HIF_IRQ_OUT)
81# define ILI934X_RST_PIN PIN_HIF_IRQ_OUT
82#endif
83
84/* ILI934X DC pin definition */
85
86#if defined(CONFIG_LCD_DCPIN_UART2_TX) \
87 || defined(CONFIG_LCD_DCPIN_UART2_TX_E)
88# define ILI934X_DC_PIN PIN_UART2_TXD
89#elif defined(CONFIG_LCD_DCPIN_UART2_RX) \
90 || defined(CONFIG_LCD_DCPIN_UART2_RX_E)
91# define ILI934X_DC_PIN PIN_UART2_RXD
92#elif defined(CONFIG_LCD_DCPIN_UART2_RTS)
93# define ILI934X_DC_PIN PIN_UART2_RTS
94#elif defined(CONFIG_LCD_DCPIN_UART2_CTS)
95# define ILI934X_DC_PIN PIN_UART2_CTS
96#elif defined(CONFIG_LCD_DCPIN_I2S0_BCK)
97# define ILI934X_DC_PIN PIN_I2S0_BCK
98#elif defined(CONFIG_LCD_DCPIN_I2S0_LRCK)
99# define ILI934X_DC_PIN PIN_I2S0_LRCK
100#elif defined(CONFIG_LCD_DCPIN_SEN_IRQ_IN)
101# define ILI934X_DC_PIN PIN_SEN_IRQ_IN
102#elif defined(CONFIG_LCD_DCPIN_EMMC_DATA3)
103# define ILI934X_DC_PIN PIN_EMMC_DATA3
104#elif defined(CONFIG_LCD_DCPIN_EMMC_DATA2)
105# define ILI934X_DC_PIN PIN_EMMC_DATA2
106#elif defined(CONFIG_LCD_DCPIN_I2S0_DATA_IN)
107# define ILI934X_DC_PIN PIN_I2S0_DATA_IN
108#elif defined(CONFIG_LCD_DCPIN_I2S0_DATA_OUT)
109# define ILI934X_DC_PIN PIN_I2S0_DATA_OUT
110#elif defined(CONFIG_LCD_DCPIN_I2C0_SCL) \
111 || defined(CONFIG_LCD_DCPIN_I2C0_SCL_E)
112# define ILI934X_DC_PIN PIN_I2C0_BCK
113#elif defined(CONFIG_LCD_DCPIN_I2C0_SDA) \
114 || defined(CONFIG_LCD_DCPIN_I2C0_SDA_E)
115# define ILI934X_DC_PIN PIN_I2C0_BDT
116#elif defined(CONFIG_LCD_DCPIN_PWM2)
117# define ILI934X_DC_PIN PIN_PWM2
118#elif defined(CONFIG_LCD_DCPIN_SPI2_MISO)
119# define ILI934X_DC_PIN PIN_SPI2_MISO
120#elif defined(CONFIG_LCD_DCPIN_SPI3_CS1_X)
121# define ILI934X_DC_PIN PIN_SPI3_CS1_X
122#elif defined(CONFIG_LCD_DCPIN_PWM0)
123# define ILI934X_DC_PIN PIN_PWM0
124#elif defined(CONFIG_LCD_DCPIN_PWM1)
125# define ILI934X_DC_PIN PIN_PWM1
126#elif defined(CONFIG_LCD_DCPIN_SPI2_MOSI)
127# define ILI934X_DC_PIN PIN_SPI2_MOSI
128#elif defined(CONFIG_LCD_DCPIN_PWM3)
129# define ILI934X_DC_PIN PIN_PWM3
130#elif defined(CONFIG_LCD_DCPIN_HIF_IRQ_OUT)
131# define ILI934X_DC_PIN PIN_HIF_IRQ_OUT
132#endif
133
134#if !defined(CONFIG_LCD)
135
136# if !defined(ILI934X_RST_PIN)
137# define ILI934X_RST_PIN 0
138# endif
139
140# if !defined(ILI934X_DC_PIN)
141# define ILI934X_DC_PIN 0
142# endif
143
144#endif
145
146#endif /* __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_BOARD_LCDPINS_H */