Esp8266/Core/pins_arduino.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * pins_arduino.h
8  *
9  ****/
10 
11 // File name selected for compatibility
12 
13 #pragma once
14 
15 #include "esp8266_peri.h"
16 
17 constexpr uint8_t A0{17}; // Single ESP8266EX analog input pin (TOUT) 10 bit, 0..1v
18 
19 #define NOT_A_PIN 0
20 #define NOT_A_PORT 0
21 #define NOT_ON_TIMER 0
22 
23 #define GPIO_REG_TYPE uint32_t
24 
25 // We use maximum compatibility to standard Arduino logic.
26 
27 #define digitalPinToPort(pin) (0)
28 #define digitalPinToBitMask(pin) (1UL << (pin))
29 #define digitalPinToTimer(pin) (NOT_ON_TIMER)
30 #define portOutputRegister(port) ((volatile uint32_t*)&GPO)
31 #define portInputRegister(port) ((volatile uint32_t*)&GPI)
32 #define portModeRegister(port) ((volatile uint32_t*)&GPE)
constexpr uint8_t A0
Definition: Esp8266/Core/pins_arduino.h:17