Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board_common.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2018 Gunar Schorcht
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
16
/* not required when compiling ESP vendor code parts */
17
#ifndef ESP_PLATFORM
18
19
#include <stdint.h>
20
21
#include "cpu.h"
22
#include "periph_conf.h"
23
#include "
periph_conf_common.h
"
24
#include "
periph/gpio.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#ifdef LED0_PIN
35
#define LED0_MASK (BIT(LED0_PIN))
36
#define LED0_TOGGLE (gpio_toggle(LED0_PIN))
37
#define LED0_ON (gpio_write(LED0_PIN, LED0_ACTIVE))
38
#define LED0_OFF (gpio_write(LED0_PIN, !LED0_ACTIVE))
39
#endif
40
41
#ifdef LED1_PIN
42
#define LED1_MASK (BIT(LED1_PIN))
43
#define LED1_TOGGLE (gpio_toggle(LED1_PIN))
44
#define LED1_ON (gpio_write(LED1_PIN, LED1_ACTIVE))
45
#define LED1_OFF (gpio_write(LED1_PIN, !LED1_ACTIVE))
46
#endif
47
48
#ifdef LED2_PIN
49
#define LED2_MASK (BIT(LED2_PIN))
50
#define LED2_TOGGLE (gpio_toggle(LED2_PIN))
51
#define LED2_ON (gpio_write(LED2_PIN, LED2_ACTIVE))
52
#define LED2_OFF (gpio_write(LED2_PIN, !LED2_ACTIVE))
53
#endif
60
#ifndef STDIO_UART_BAUDRATE
61
#define STDIO_UART_BAUDRATE (115200)
62
#endif
65
#ifndef DOXYGEN
70
#if defined(MODULE_ESP_SW_TIMER)
71
#define XTIMER_BACKOFF (100U)
72
#define XTIMER_ISR_BACKOFF (100U)
73
#endif
/* MODULE_ESP_SW_TIMER */
74
76
#endif
/* DOXYGEN */
77
78
#if defined(MODULE_MTD) || defined(DOXYGEN)
88
#define MTD_0 mtd_dev_get(0)
89
95
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
96
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
97
#endif
98
100
#endif
/* defined(MODULE_MTD) || defined(DOXYGEN) */
101
102
#if defined(MODULE_SPIFFS) || defined(DOXYGEN)
109
#define SPIFFS_ALIGNED_OBJECT_INDEX_TABLES 1
110
#define SPIFFS_READ_ONLY 0
111
#define SPIFFS_SINGLETON 0
112
#define SPIFFS_HAL_CALLBACK_EXTRA 1
113
#define SPIFFS_CACHE 1
115
#endif
/* defined(MODULE_SPIFFS) || defined(DOXYGEN) */
116
120
void
board_print_config
(
void
);
121
122
#ifdef __cplusplus
123
}
/* end extern "C" */
124
#endif
125
126
/* include definitions for optional off-board hardware modules */
127
#include "
board_modules.h
"
128
131
#endif
/* ESP_PLATFORM */
board_modules.h
Definitions for Wemos stackable hardware modules (shields)
board_print_config
void board_print_config(void)
Print the board configuration in a human readable format.
gpio.h
Low-level GPIO peripheral driver interface definitions.
periph_conf_common.h
Common peripheral configuration for the Particle Mesh.
Generated on Thu Jul 24 2025 16:03:56 by
1.9.1