Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board_common.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Gunar Schorcht
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#ifndef BOARD_COMMON_H
10
#define BOARD_COMMON_H
11
20
/* not required when compiling ESP vendor code parts */
21
#ifndef ESP_PLATFORM
22
23
#include <stdint.h>
24
25
#include "cpu.h"
26
#include "periph_conf.h"
27
#include "
periph_conf_common.h
"
28
#include "
periph/gpio.h
"
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
38
#ifdef LED0_PIN
39
#define LED0_MASK (BIT(LED0_PIN))
40
#define LED0_TOGGLE (gpio_toggle(LED0_PIN))
41
#define LED0_ON (gpio_write(LED0_PIN, LED0_ACTIVE))
42
#define LED0_OFF (gpio_write(LED0_PIN, !LED0_ACTIVE))
43
#endif
44
45
#ifdef LED1_PIN
46
#define LED1_MASK (BIT(LED1_PIN))
47
#define LED1_TOGGLE (gpio_toggle(LED1_PIN))
48
#define LED1_ON (gpio_write(LED1_PIN, LED1_ACTIVE))
49
#define LED1_OFF (gpio_write(LED1_PIN, !LED1_ACTIVE))
50
#endif
51
52
#ifdef LED2_PIN
53
#define LED2_MASK (BIT(LED2_PIN))
54
#define LED2_TOGGLE (gpio_toggle(LED2_PIN))
55
#define LED2_ON (gpio_write(LED2_PIN, LED2_ACTIVE))
56
#define LED2_OFF (gpio_write(LED2_PIN, !LED2_ACTIVE))
57
#endif
64
#ifndef STDIO_UART_BAUDRATE
65
#define STDIO_UART_BAUDRATE (115200)
66
#endif
69
#ifndef DOXYGEN
74
#if defined(MODULE_ESP_SW_TIMER)
75
#define XTIMER_BACKOFF (100U)
76
#define XTIMER_ISR_BACKOFF (100U)
77
#endif
/* MODULE_ESP_SW_TIMER */
78
80
#endif
/* DOXYGEN */
81
82
#if defined(MODULE_MTD) || defined(DOXYGEN)
92
#define MTD_0 mtd_dev_get(0)
93
99
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
100
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
101
#endif
102
104
#endif
/* defined(MODULE_MTD) || defined(DOXYGEN) */
105
106
#if defined(MODULE_SPIFFS) || defined(DOXYGEN)
113
#define SPIFFS_ALIGNED_OBJECT_INDEX_TABLES 1
114
#define SPIFFS_READ_ONLY 0
115
#define SPIFFS_SINGLETON 0
116
#define SPIFFS_HAL_CALLBACK_EXTRA 1
117
#define SPIFFS_CACHE 1
119
#endif
/* defined(MODULE_SPIFFS) || defined(DOXYGEN) */
120
124
void
board_print_config
(
void
);
125
126
#ifdef __cplusplus
127
}
/* end extern "C" */
128
#endif
129
130
/* include definitions for optional off-board hardware modules */
131
#include "
board_modules.h
"
132
135
#endif
/* ESP_PLATFORM */
136
#endif
/* BOARD_COMMON_H */
gpio.h
Low-level GPIO peripheral driver interface definitions.
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.
periph_conf_common.h
Common peripheral configuration for the Particle Mesh.
Generated on Sat Nov 16 2024 04:50:48 by
1.9.8