Rp2040/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 - Rp2040
8  *
9  */
10 
11 #pragma once
12 
13 #include <hardware/gpio.h>
14 #include <fast_io.h>
15 
16 #define GP_IN(pin) GP_FAST_READ(pin, SIO_BASE + SIO_GPIO_IN_OFFSET)
17 #define GP_OUT(pin, val) GP_FAST_WRITE(pin, val, SIO_BASE + SIO_GPIO_OUT_CLR_OFFSET, SIO_BASE + SIO_GPIO_OUT_SET_OFFSET)
18 
19 #define SPISOFT_ARCH_DELAY_FIXED 1
20 
21 namespace spisoft
22 {
23 constexpr SpiPins defaultPins{
24  .sck = PICO_DEFAULT_SPI_SCK_PIN,
25  .miso = PICO_DEFAULT_SPI_RX_PIN,
26  .mosi = PICO_DEFAULT_SPI_TX_PIN,
27 };
28 
29 } // namespace spisoft
SPI pin connections.
Definition: SPIBase.h:36
constexpr SpiPins defaultPins
Definition: Esp32/spisoft_arch.h:22
Definition: Esp32/spisoft_arch.h:20
uint8_t sck
Definition: SPIBase.h:37