• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef __SPI_PINS_H__
16 #define __SPI_PINS_H__
17 
18 #pragma once
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif /* __cplusplus */
23 
24 #define SPI_FUNC_NUM            1
25 #define SPI_IOMUX_PIN_NUM_MISO  7
26 #define SPI_IOMUX_PIN_NUM_MOSI  8
27 #define SPI_IOMUX_PIN_NUM_CLK   6
28 #define SPI_IOMUX_PIN_NUM_CS    11
29 #define SPI_IOMUX_PIN_NUM_WP    10
30 #define SPI_IOMUX_PIN_NUM_HD    9
31 
32 //For D2WD and PICO-D4 chip
33 #define SPI_D2WD_PIN_NUM_MISO  17
34 #define SPI_D2WD_PIN_NUM_MOSI  8
35 #define SPI_D2WD_PIN_NUM_CLK   6
36 #define SPI_D2WD_PIN_NUM_CS    16
37 #define SPI_D2WD_PIN_NUM_WP    7
38 #define SPI_D2WD_PIN_NUM_HD    11
39 
40 #define SPI2_FUNC_NUM           HSPI_FUNC_NUM
41 #define SPI2_IOMUX_PIN_NUM_MISO HSPI_IOMUX_PIN_NUM_MISO
42 #define SPI2_IOMUX_PIN_NUM_MOSI HSPI_IOMUX_PIN_NUM_MOSI
43 #define SPI2_IOMUX_PIN_NUM_CLK  HSPI_IOMUX_PIN_NUM_CLK
44 #define SPI2_IOMUX_PIN_NUM_CS   HSPI_IOMUX_PIN_NUM_CS
45 #define SPI2_IOMUX_PIN_NUM_WP   HSPI_IOMUX_PIN_NUM_WP
46 #define SPI2_IOMUX_PIN_NUM_HD   HSPI_IOMUX_PIN_NUM_HD
47 
48 #define SPI3_FUNC_NUM           VSPI_FUNC_NUM
49 #define SPI3_IOMUX_PIN_NUM_MISO VSPI_IOMUX_PIN_NUM_MISO
50 #define SPI3_IOMUX_PIN_NUM_MOSI VSPI_IOMUX_PIN_NUM_MOSI
51 #define SPI3_IOMUX_PIN_NUM_CLK  VSPI_IOMUX_PIN_NUM_CLK
52 #define SPI3_IOMUX_PIN_NUM_CS   VSPI_IOMUX_PIN_NUM_CS
53 #define SPI3_IOMUX_PIN_NUM_WP   VSPI_IOMUX_PIN_NUM_WP
54 #define SPI3_IOMUX_PIN_NUM_HD   VSPI_IOMUX_PIN_NUM_HD
55 
56 //Following Macros are deprecated. Please use the Macros above
57 #define HSPI_FUNC_NUM           1
58 #define HSPI_IOMUX_PIN_NUM_MISO 12
59 #define HSPI_IOMUX_PIN_NUM_MOSI 13
60 #define HSPI_IOMUX_PIN_NUM_CLK  14
61 #define HSPI_IOMUX_PIN_NUM_CS   15
62 #define HSPI_IOMUX_PIN_NUM_WP   2
63 #define HSPI_IOMUX_PIN_NUM_HD   4
64 
65 #define VSPI_FUNC_NUM           1
66 #define VSPI_IOMUX_PIN_NUM_MISO 19
67 #define VSPI_IOMUX_PIN_NUM_MOSI 23
68 #define VSPI_IOMUX_PIN_NUM_CLK  18
69 #define VSPI_IOMUX_PIN_NUM_CS   5
70 #define VSPI_IOMUX_PIN_NUM_WP   22
71 #define VSPI_IOMUX_PIN_NUM_HD   21
72 
73 #ifdef __cplusplus
74 }
75 #endif /* __cplusplus */
76 #endif /* __SPI_PINS_H__ */