Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
ESP8266EX.h
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/anakod/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  ****/
7 
8 #ifndef _SMING_CORE_ESP8266EX_H_
9 #define _SMING_CORE_ESP8266EX_H_
10 
11 #include "../include/user_config.h"
12 
13 
14 #define TOTAL_PINS 16
15 #define NUM_DIGITAL_PINS TOTAL_PINS
16 //#define TOTAL_ANALOG_PINS 1
17 
18 
19 //#define pinToInterrupt(PIN) \
20 // ( ((PIN) == 2) ? EXTERNAL_INTERRUPT_0 : \
21 // ( ((PIN) == 3) ? EXTERNAL_INTERRUPT_1 : -1))
22 
27 {
28  uint8_t id;
29  uint32_t mux;
30  uint8_t gpioFunc;
31 
32  operator const int(){return id;}
33  void mode(uint8_t mode);
34  void write(uint8_t val);
35  uint8_t read();
36 };
37 
41 static EspDigitalPin EspDigitalPins[] =
42 {
43  { 0, PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0}, // FLASH
44  { 1, PERIPHS_IO_MUX_U0TXD_U, FUNC_GPIO1}, // TXD0
45  { 2, PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2}, // TXD1
46  { 3, PERIPHS_IO_MUX_U0RXD_U, FUNC_GPIO3}, // RXD0
47  { 4, PERIPHS_IO_MUX_GPIO4_U, FUNC_GPIO4},
48  { 5, PERIPHS_IO_MUX_GPIO5_U, FUNC_GPIO5},
49  { 6, 0, 0}, // SD_CLK_U
50  { 7, 0, 0}, // SD_DATA0_U
51  { 8, 0, 0}, // SD_DATA1_U
52  { 9, PERIPHS_IO_MUX_SD_DATA2_U, FUNC_GPIO9},
53  {10, PERIPHS_IO_MUX_SD_DATA3_U, FUNC_GPIO10},
54  {11, 0, 0}, // SD_CMD_U
55  {12, PERIPHS_IO_MUX_MTDI_U, FUNC_GPIO12}, // HSPIQ
56  {13, PERIPHS_IO_MUX_MTCK_U, FUNC_GPIO13}, // HSPID
57  {14, PERIPHS_IO_MUX_MTMS_U, FUNC_GPIO14}, // HSPICLK
58  {15, PERIPHS_IO_MUX_MTDO_U, FUNC_GPIO15}, // HSPICS
59 };
60 
61 
62 
63 #endif /* _SMING_CORE_ESP8266EX_H_ */
ESP GPIO pin configuration.
Definition: ESP8266EX.h:26