Esp32/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 - Esp32
8  *
9  */
10 
11 #pragma once
12 
13 #include <hal/gpio_ll.h>
14 #include <soc/spi_pins.h>
15 #include <fast_io.h>
16 
17 #define GP_IN(pin) GP_FAST_READ(pin, GPIO_IN_REG)
18 #define GP_OUT(pin, val) GP_FAST_WRITE(pin, val, GPIO_OUT_W1TC_REG, GPIO_OUT_W1TS_REG)
19 
20 namespace spisoft
21 {
22 constexpr SpiPins defaultPins{
23  .sck = SPI2_IOMUX_PIN_NUM_CLK,
24  .miso = SPI2_IOMUX_PIN_NUM_MISO,
25  .mosi = SPI2_IOMUX_PIN_NUM_MOSI,
26 };
27 
28 }
Definition: Esp32/spisoft_arch.h:21
constexpr SpiPins defaultPins
Definition: Esp32/spisoft_arch.h:22
SPI pin connections.
Definition: SPIBase.h:36
uint8_t sck
Definition: SPIBase.h:37