Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Gunar Schorcht
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
45
#ifndef BOARD_H
46
#define BOARD_H
47
48
#include <stdint.h>
49
55
#if !MODULE_ESP32_WROVER_KIT_CAMERA || DOXYGEN
56
#define LED0_PIN GPIO0
57
#define LED0_ACTIVE (1)
58
#endif
59
60
#if !MODULE_SDCARD_SPI || DOXYGEN
61
#define LED1_PIN GPIO2
62
#define LED1_ACTIVE (1)
63
#endif
64
65
#if !MODULE_ESP32_WROVER_KIT_CAMERA || DOXYGEN
66
#define LED2_PIN GPIO4
67
#define LED2_ACTIVE (1)
68
#endif
69
70
#ifdef LED0_PIN
71
#define LED_RED_PIN LED0_PIN
72
#endif
73
#ifdef LED1_PIN
74
#define LED_GREEN_PIN LED1_PIN
75
#endif
76
#ifdef LED2_PIN
77
#define LED_BLUE_PIN LED2_PIN
78
#endif
79
92
#if MODULE_SDCARD_SPI || DOXYGEN
93
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
94
#define SDCARD_SPI_PARAM_CLK SPI0_SCK
95
#define SDCARD_SPI_PARAM_MOSI SPI0_MOSI
96
#define SDCARD_SPI_PARAM_MISO SPI0_MISO
97
#define SDCARD_SPI_PARAM_CS SPI0_CS0
98
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
99
#endif
108
#if MODULE_ILI9341 || DOXYGEN
109
#define LCD_CS GPIO22
110
#define LCD_RST GPIO18
111
#define LCD_DC GPIO21
112
#define LCD_BACKLIGHT GPIO5
113
114
#define BACKLIGHT_ON gpio_clear(LCD_BACKLIGHT)
115
#define BACKLIGHT_OFF gpio_set(LCD_BACKLIGHT)
116
117
#define ILI9341_PARAM_SPI SPI_DEV(1)
118
#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
119
#define ILI9341_PARAM_CS LCD_CS
120
#define ILI9341_PARAM_DCX LCD_DC
121
#define ILI9341_PARAM_RST LCD_RST
122
#define ILi9341_PARAM_RGB 0
123
#define ILI9341_PARAM_INVERTED 0
124
#define ILI9341_PARAM_ROTATION ILI9341_ROTATION_HORZ_FLIP
125
#endif
128
/* include common board definitions as last step */
129
#include "board_common.h"
130
131
#ifdef __cplusplus
132
extern
"C"
{
133
#endif
134
135
#ifdef __cplusplus
136
}
/* end extern "C" */
137
#endif
138
139
#endif
/* BOARD_H */
Generated on Sat Nov 23 2024 01:58:05 by
1.9.8