2018-09-05 02:39:50 +02:00
|
|
|
/*
|
2019-09-05 13:35:58 +02:00
|
|
|
* Copyright (C) 2019 Gunar Schorcht
|
2018-09-05 02:39:50 +02:00
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2019-01-14 11:56:32 +01:00
|
|
|
* @defgroup cpu_esp8266_conf ESP8266 compile configurations
|
2018-09-05 02:39:50 +02:00
|
|
|
* @ingroup cpu_esp8266
|
2019-01-14 11:56:32 +01:00
|
|
|
* @ingroup config
|
|
|
|
* @brief Compile-time configuration macros for ESP8266 modules
|
2018-09-05 02:39:50 +02:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief CPU specific configuration options
|
|
|
|
*
|
|
|
|
* @author Gunar Schorcht <gunar@schorcht.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CPU_CONF_H
|
|
|
|
#define CPU_CONF_H
|
|
|
|
|
2020-02-29 12:02:11 +01:00
|
|
|
#include "cpu_conf_common.h"
|
2018-09-05 02:39:50 +02:00
|
|
|
#include "xtensa_conf.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-04-20 10:45:13 +02:00
|
|
|
/**
|
|
|
|
* @name Clock configuration
|
|
|
|
* @{
|
|
|
|
*/
|
2021-12-19 12:20:34 +01:00
|
|
|
|
|
|
|
#ifndef DOXYGEN
|
|
|
|
/* Mapping of Kconfig defines to the respective enumeration values */
|
|
|
|
#if CONFIG_ESP8266_CPU_FREQUENCY_80
|
|
|
|
#define ESP8266_CPU_FREQUENCY 80
|
|
|
|
#elif CONFIG_ESP8266_CPU_FREQUENCY_160
|
|
|
|
#define ESP8266_CPU_FREQUENCY 160
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2018-09-05 02:39:50 +02:00
|
|
|
/**
|
2019-09-05 13:35:58 +02:00
|
|
|
* @brief Defines the CPU frequency in MHz
|
|
|
|
*
|
|
|
|
* Possible values are 80 and 160 MHz.
|
|
|
|
*/
|
|
|
|
#ifndef ESP8266_CPU_FREQUENCY
|
|
|
|
#define ESP8266_CPU_FREQUENCY (80)
|
|
|
|
#endif
|
2021-12-19 12:20:34 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Mapping configured ESP8266 default clock to CLOCK_CORECLOCK define
|
|
|
|
*/
|
2021-04-20 10:45:13 +02:00
|
|
|
#define CLOCK_CORECLOCK (1000000UL * ESP8266_CPU_FREQUENCY)
|
|
|
|
/** @} */
|
2019-09-05 13:35:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Stack size configurations
|
2018-09-05 02:39:50 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2018-12-26 16:05:27 +01:00
|
|
|
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
|
2018-09-05 02:39:50 +02:00
|
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF (0)
|
|
|
|
#endif
|
2022-09-02 08:57:04 +02:00
|
|
|
|
2018-12-26 16:05:27 +01:00
|
|
|
#ifndef THREAD_STACKSIZE_DEFAULT
|
|
|
|
#define THREAD_STACKSIZE_DEFAULT (1024)
|
|
|
|
#endif
|
2022-09-02 08:57:04 +02:00
|
|
|
|
2018-12-26 16:05:27 +01:00
|
|
|
#ifndef THREAD_STACKSIZE_IDLE
|
|
|
|
#define THREAD_STACKSIZE_IDLE (1024)
|
|
|
|
#endif
|
2022-09-02 08:57:04 +02:00
|
|
|
|
2018-12-26 16:05:27 +01:00
|
|
|
#ifndef THREAD_STACKSIZE_MAIN
|
|
|
|
#define THREAD_STACKSIZE_MAIN (3072)
|
|
|
|
#endif
|
|
|
|
|
2022-09-02 08:57:04 +02:00
|
|
|
#ifndef THREAD_STACKSIZE_SMALL
|
|
|
|
#define THREAD_STACKSIZE_SMALL (THREAD_STACKSIZE_MEDIUM * 3 / 2)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef THREAD_STACKSIZE_TINY
|
|
|
|
#define THREAD_STACKSIZE_TINY (THREAD_STACKSIZE_MEDIUM / 2)
|
|
|
|
#endif
|
|
|
|
|
2019-01-16 19:29:58 +01:00
|
|
|
#ifndef GNRC_IPV6_STACK_SIZE
|
|
|
|
#define GNRC_IPV6_STACK_SIZE (1536)
|
|
|
|
#endif
|
2019-01-07 12:00:53 +01:00
|
|
|
#ifndef GNRC_PKTDUMP_STACKSIZE
|
2019-09-05 13:35:58 +02:00
|
|
|
#define GNRC_PKTDUMP_STACKSIZE (THREAD_STACKSIZE_DEFAULT << 1)
|
2019-01-07 12:00:53 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ESP_NOW_STACKSIZE
|
|
|
|
#define ESP_NOW_STACKSIZE (2560)
|
|
|
|
#endif
|
2019-12-14 15:02:40 +01:00
|
|
|
|
|
|
|
#ifndef TCPIP_THREAD_STACKSIZE
|
|
|
|
#define TCPIP_THREAD_STACKSIZE (3072)
|
|
|
|
#endif
|
2022-02-01 22:10:42 +01:00
|
|
|
|
|
|
|
#ifndef ESP_WIFI_STACKSIZE
|
|
|
|
/** Stack size for the WiFi thread */
|
|
|
|
#define ESP_WIFI_STACKSIZE (1536)
|
|
|
|
#endif
|
|
|
|
|
2018-09-05 02:39:50 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Buffer size used for printf functions (maximum length of formatted output).
|
|
|
|
*/
|
|
|
|
#define PRINTF_BUFSIZ 256
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2019-01-07 12:00:53 +01:00
|
|
|
#endif
|
2018-09-05 02:39:50 +02:00
|
|
|
|
|
|
|
#endif /* CPU_CONF_H */
|
|
|
|
/** @} */
|