Configurations of the MCU periphery that are common for all ESP8266 boards. More...
Configurations of the MCU periphery that are common for all ESP8266 boards.
Definition in file periph_conf_common.h.
Go to the source code of this file.
#define | BIT(X) (1<<(X)) |
ADC configuration | |
ESP8266 provides one ADC pin that is broken out on all boards. | |
#define | ADC_NUMOF (1) |
number of ADC channels | |
DAC configuration | |
#define | DAC_NUMOF (0) |
number of DAC channels | |
I2C configuration | |
#define | I2C_NUMOF ARRAY_SIZE(i2c_config) |
Number of I2C interfaces. More... | |
static const i2c_conf_t | i2c_config [] |
Static array with configuration for declared I2C devices. More... | |
PWM configuration | |
The hardware implementation of ESP8266 PWM supports only frequencies as power of two. Therefore a software implementation of one PWM device PWM_DEV(0) with up to 8 PWM channels (PWM_CHANNEL_NUM_MAX) is used. The GPIOs that can be used as PWM channels are defined by PWM0_GPIOS in board definition.
| |
#define | PWM_NUMOF (1) |
Number of PWM devices. More... | |
static const gpio_t | pwm0_channels [] = PWM0_GPIOS |
Static array of GPIOs that can be used as channels of PWM_DEV(0) | |
SPI configuration | |||||||||||
ESP8266 has two SPI controllers:
Thus, HSPI is the only SPI interface that is available for peripherals. It is exposed as RIOT's SPI_DEV(0). Furthermore, the pin configuration of the HSPI interface is fixed as shown in following table.
The only pin definition that can be overridden by an application-specific board configuration is the CS signal defined by SPI0_CS0. | |||||||||||
#define | SPI0_DEV SPI_DEV(0) | ||||||||||
HSPI / SPI_DEV(0) device. | |||||||||||
#define | SPI0_CTRL HSPI | ||||||||||
HSPI / SPI_DEV(0) controller. | |||||||||||
#define | SPI0_MISO GPIO12 | ||||||||||
HSPI / SPI_DEV(0) MISO pin. | |||||||||||
#define | SPI0_MOSI GPIO13 | ||||||||||
HSPI / SPI_DEV(0) MOSI pin. | |||||||||||
#define | SPI0_SCK GPIO14 | ||||||||||
HSPI / SPI_DEV(0) SCK pin. | |||||||||||
#define | SPI0_CS0 GPIO15 | ||||||||||
HSPI / SPI_DEV(0) CS default pin, only used when cs parameter in spi_acquire is GPIO_UNDEF. | |||||||||||
#define | SPI_NUMOF ARRAY_SIZE(spi_config) | ||||||||||
Number of SPI interfaces. More... | |||||||||||
static const spi_conf_t | spi_config [] | ||||||||||
Static array with configuration for declared SPI devices. More... | |||||||||||
Timer configuration | |
#define | TIMER_NUMOF (1U) |
number of timer devices | |
#define | TIMER_CHANNEL_NUMOF (1U) |
number of channels per timer device | |
UART configuration | |
All ESP8266 boards have exactly one UART device with fixed pin mapping. This UART device is used for flashing and as a console interface. Therefore, the number of UART devices is fixed and can not be overridden. Used pins are determined by the MCU implementation and are defined here only for documentation reasons. | |
#define | UART0_TXD GPIO1 |
TxD pin of UART_DEV(0) | |
#define | UART0_RXD GPIO3 |
RxD pin of UART_DEV(0) | |
#define | UART_NUMOF ARRAY_SIZE(uart_config) |
Number of UART interfaces. More... | |
static const uart_conf_t | uart_config [] |
Static array with configuration for declared UART devices. More... | |
#define I2C_NUMOF ARRAY_SIZE(i2c_config) |
Number of I2C interfaces.
The number of I2C interfaces is determined automatically from board-specific peripheral definitions.
Definition at line 86 of file periph_conf_common.h.
#define PWM_NUMOF (1) |
Number of PWM devices.
The number of PWM devices is determined from the PWM0_GPIOS definition.
Definition at line 120 of file periph_conf_common.h.
#define SPI_NUMOF ARRAY_SIZE(spi_config) |
Number of SPI interfaces.
The number of SPI interfaces is determined from board-specific peripheral definitions of SPIn_*.
Definition at line 184 of file periph_conf_common.h.
#define UART_NUMOF ARRAY_SIZE(uart_config) |
Number of UART interfaces.
The number of UART interfaces is determined from board-specific peripheral definitions of UARTn_*.
Definition at line 241 of file periph_conf_common.h.
|
static |
Static array with configuration for declared I2C devices.
Definition at line 61 of file periph_conf_common.h.
|
static |
|
static |
Static array with configuration for declared UART devices.
Definition at line 226 of file periph_conf_common.h.