Developer World
Spresense SDK Library v3.2.0-ebc0364
board_pinconfig.h
1/****************************************************************************
2 * boards/arm/cxd56xx/spresense/include/board_pinconfig.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_PINCONFIG_H
22#define __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_BOARD_PINCONFIG_H
23
24/****************************************************************************
25 * Included Files
26 ****************************************************************************/
27
28/****************************************************************************
29 * Pre-processor Definitions
30 ****************************************************************************/
31
32/* Customize from default to the board specific pin configuration
33 * The default pin configurations are defined in
34 * boards/arm/cxd56xx/spresense/include/board_pinconfig.h.
35 *
36 * Mode: shared pin function mode
37 * ENZI: 1=Input Enable, 0=Input Disable
38 * 4mA : Drive Current 1=4mA, 0=2mA
39 * Pull: 0=HiZ floating, PINCONF_PULLUP, PINCONF_PULLDOWN
40 *
41 * M E P
42 * P o N 4 u
43 * i d Z m l
44 * n e I A l
45 */
46
47#undef PINCONF_UART2_TXD
48#undef PINCONF_UART2_RXD
49#undef PINCONF_UART2_CTS
50#undef PINCONF_UART2_RTS
51#define PINCONF_UART2_TXD PINCONF(PIN_UART2_TXD, 1, 0, 1, 0)
52#define PINCONF_UART2_RXD PINCONF(PIN_UART2_RXD, 1, 1, 1, 0)
53#define PINCONF_UART2_CTS PINCONF(PIN_UART2_CTS, 1, 1, 1, PINCONF_PULLDOWN)
54#define PINCONF_UART2_RTS PINCONF(PIN_UART2_RTS, 1, 0, 1, 0)
55
56#undef PINCONF_SPI4_CS_X
57#undef PINCONF_SPI4_SCK
58#undef PINCONF_SPI4_MOSI
59#define PINCONF_SPI4_CS_X PINCONF(PIN_SPI4_CS_X, 1, 0, 1, 0)
60#define PINCONF_SPI4_SCK PINCONF(PIN_SPI4_SCK, 1, 0, 1, 0)
61#define PINCONF_SPI4_MOSI PINCONF(PIN_SPI4_MOSI, 1, 0, 1, 0)
62
63#undef PINCONF_SPI3_CS0_X
64#undef PINCONF_SPI3_CS1_X
65#undef PINCONF_SPI3_CS2_X
66#undef PINCONF_SPI3_SCK
67#undef PINCONF_SPI3_MOSI
68#undef PINCONF_SPI3_MISO
69#define PINCONF_SPI3_CS0_X PINCONF(PIN_SPI3_CS0_X, 1, 0, 1, 0)
70#define PINCONF_SPI3_CS1_X PINCONF(PIN_SPI3_CS1_X, 1, 0, 1, 0)
71#define PINCONF_SPI3_CS2_X PINCONF(PIN_SPI3_CS2_X, 1, 0, 1, 0)
72#define PINCONF_SPI3_SCK PINCONF(PIN_SPI3_SCK, 1, 0, 1, 0)
73#define PINCONF_SPI3_MOSI PINCONF(PIN_SPI3_MOSI, 1, 0, 1, 0)
74#define PINCONF_SPI3_MISO PINCONF(PIN_SPI3_MISO, 1, 1, 1, 0)
75
76#undef PINCONF_PWM0
77#undef PINCONF_PWM1
78#undef PINCONF_PWM2
79#undef PINCONF_PWM3
80#define PINCONF_PWM0 PINCONF(PIN_PWM0, 1, 0, 1, 0)
81#define PINCONF_PWM1 PINCONF(PIN_PWM1, 1, 0, 1, 0)
82#define PINCONF_PWM2 PINCONF(PIN_PWM2, 1, 0, 1, 0)
83#define PINCONF_PWM3 PINCONF(PIN_PWM3, 1, 0, 1, 0)
84
85#undef PINCONF_I2C0_BCK
86#undef PINCONF_I2C0_BDT
87#define PINCONF_I2C0_BCK PINCONF(PIN_I2C0_BCK, 1, 1, 1, 0)
88#define PINCONF_I2C0_BDT PINCONF(PIN_I2C0_BDT, 1, 1, 1, 0)
89
90#undef PINCONF_SDIO_CLK_GPIO
91#undef PINCONF_SDIO_CMD_GPIO
92#undef PINCONF_SDIO_DATA0_GPIO
93#undef PINCONF_SDIO_DATA1_GPIO
94#undef PINCONF_SDIO_DATA2_GPIO
95#undef PINCONF_SDIO_DATA3_GPIO
96#define PINCONF_SDIO_CLK_GPIO PINCONF(PIN_SDIO_CLK, 0, 0, 0, PINCONF_PULLDOWN)
97#define PINCONF_SDIO_CMD_GPIO PINCONF(PIN_SDIO_CMD, 0, 0, 0, PINCONF_PULLDOWN)
98#define PINCONF_SDIO_DATA0_GPIO PINCONF(PIN_SDIO_DATA0, 0, 0, 0, PINCONF_PULLDOWN)
99#define PINCONF_SDIO_DATA1_GPIO PINCONF(PIN_SDIO_DATA1, 0, 0, 0, PINCONF_PULLDOWN)
100#define PINCONF_SDIO_DATA2_GPIO PINCONF(PIN_SDIO_DATA2, 0, 0, 0, PINCONF_PULLDOWN)
101#define PINCONF_SDIO_DATA3_GPIO PINCONF(PIN_SDIO_DATA3, 0, 0, 0, PINCONF_PULLDOWN)
102
103#undef PINCONF_SDIO_CD_GPIO
104#define PINCONF_SDIO_CD_GPIO PINCONF(PIN_SDIO_CD, 0, 0, 0, PINCONF_PULLUP)
105
106#endif /* __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_BOARD_PINCONFIG_H */