Esp8266/spisoft_arch.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  * softspi_arch.h - Esp8266
8  *
9  */
10 
11 #pragma once
12 
13 #include <fast_io.h>
14 
15 #define GP_IN(pin) GP_FAST_READ(pin, PERIPHS_GPIO_BASEADDR + GPIO_IN_ADDRESS)
16 #define GP_OUT(pin, val) \
17  GP_FAST_WRITE(pin, val, PERIPHS_GPIO_BASEADDR + GPIO_OUT_W1TC_ADDRESS, \
18  PERIPHS_GPIO_BASEADDR + GPIO_OUT_W1TS_ADDRESS)
19 
20 namespace spisoft
21 {
22 constexpr SpiPins defaultPins{
23  .sck = 14,
24  .miso = 12,
25  .mosi = 13,
26 };
27 
28 #ifdef SPISOFT_DELAY_VARIABLE
29 uint8_t checkSpeed(SPISpeed& speed);
30 #endif
31 
32 } // namespace spisoft
Definition: Esp32/spisoft_arch.h:21
constexpr SpiPins defaultPins
Definition: Esp32/spisoft_arch.h:22
Contains bus frequency and corresponding divisor/prescaler settings.
Definition: SPISettings.h:45
SPI pin connections.
Definition: SPIBase.h:36
uint8_t sck
Definition: SPIBase.h:37