-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/esp*: add Kconfig #13135
cpu/esp*: add Kconfig #13135
Changes from all commits
1588fa9
5d40b07
57a29da
d64257b
9d51cb5
d51872e
3b1fb70
946ce9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2020 Gunar Schorcht | ||
# | ||
# 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. | ||
# | ||
menu "CPU" | ||
|
||
rsource "*/Kconfig" | ||
|
||
endmenu # CPU |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2020 Gunar Schorcht | ||
# | ||
# 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. | ||
# | ||
|
||
menuconfig KCONFIG_CPU_ESP32 | ||
bool "Configure ESP32 CPU" | ||
depends on MODULE_ESP_ESP32 | ||
help | ||
Configure ESP32 CPU via Kconfig. | ||
|
||
if KCONFIG_CPU_ESP32 | ||
|
||
choice ESP32_DEFAULT_CPU_FREQ_MHZ | ||
bool "CPU frequency" | ||
default ESP32_DEFAULT_CPU_FREQ_MHZ_80 | ||
help | ||
Defines the CPU frequency. | ||
|
||
config ESP32_DEFAULT_CPU_FREQ_MHZ_80 | ||
bool "80 MHz" | ||
config ESP32_DEFAULT_CPU_FREQ_MHZ_160 | ||
bool "160 MHz" | ||
config ESP32_DEFAULT_CPU_FREQ_MHZ_240 | ||
bool "240 MHz" | ||
endchoice | ||
|
||
rsource "esp-wifi/Kconfig" | ||
rsource "$(RIOTBASE)/cpu/esp_common/esp-now/Kconfig" | ||
|
||
endif # ESP32 settings |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2020 Gunar Schorcht | ||
# | ||
# 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. | ||
# | ||
|
||
menuconfig KCONFIG_MODULE_ESP_WIFI | ||
bool "Configure ESP-WiFi netdev" | ||
depends on MODULE_ESP_WIFI | ||
help | ||
Configure ESP-Wifi netdev when module esp_wifi is used. | ||
|
||
if KCONFIG_MODULE_ESP_WIFI | ||
|
||
config ESP_WIFI_SSID | ||
string "SSID" | ||
default "RIOT_AP" | ||
help | ||
This string defines the SSID of the AP to be used. | ||
|
||
config ESP_WIFI_PASS | ||
string "Passphrase for WPA2" | ||
default "ThisistheRIOTporttoESP" | ||
help | ||
This string defines the passphrase as plain text, which is used for | ||
the AP during WPA2 authentication. It can be up to 64 characters long. | ||
|
||
endif # KCONFIG_MODULE_ESP_WIFI |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,37 +22,77 @@ | |
|
||
#if defined(MODULE_ESP_WIFI) || defined(DOXYGEN) | ||
|
||
/** | ||
* @name Legacy definitions of default configuration parameters | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @brief Legacy definition for compatibility reasons. | ||
* #ESP_WIFI_STACKSIZE is deprecated, please use #CONFIG_ESP_WIFI_STACKSIZE | ||
* instead. | ||
*/ | ||
#ifndef ESP_WIFI_STACKSIZE | ||
#define ESP_WIFI_STACKSIZE (THREAD_STACKSIZE_DEFAULT) | ||
#endif | ||
|
||
/** | ||
* @brief Legacy definition for compatibility reasons. | ||
* #ESP_WIFI_PRIO is deprecated, please use #CONFIG_ESP_WIFI_PRIO instead. | ||
*/ | ||
#ifndef ESP_WIFI_PRIO | ||
#define ESP_WIFI_PRIO (GNRC_NETIF_PRIO) | ||
#endif | ||
|
||
/** | ||
* @brief Legacy definition for compatibility reasons. | ||
* #ESP_WIFI_SSID is deprecated, please use #CONFIG_ESP_WIFI_SSID instead. | ||
*/ | ||
#ifndef ESP_WIFI_SSID | ||
#define ESP_WIFI_SSID "RIOT_AP" | ||
#endif | ||
|
||
/** | ||
* @brief Legacy definition for compatibility reasons. | ||
* #ESP_WIFI_PASS is deprecated, please use #CONFIG_ESP_WIFI_PASS instead. | ||
*/ | ||
#ifndef ESP_WIFI_PASS | ||
#define ESP_WIFI_PASS "ThisistheRIOTporttoESP" | ||
#endif | ||
|
||
/** | ||
* @name Set default configuration parameters for the ESP WiFi netdev driver | ||
* @{ | ||
*/ | ||
|
||
/** @} */ | ||
|
||
/** | ||
* @brief The size of the stack used for the ESP WIFI netdev driver thread. | ||
*/ | ||
#ifndef ESP_WIFI_STACKSIZE | ||
#define ESP_WIFI_STACKSIZE (THREAD_STACKSIZE_DEFAULT) | ||
#ifndef CONFIG_ESP_WIFI_STACKSIZE | ||
#define CONFIG_ESP_WIFI_STACKSIZE ESP_WIFI_STACKSIZE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Namespace |
||
#endif | ||
|
||
/** | ||
* @brief The priority of the ESP WiFi netdev driver thread. Should not be changed. | ||
*/ | ||
#ifndef ESP_WIFI_PRIO | ||
#define ESP_WIFI_PRIO (GNRC_NETIF_PRIO) | ||
#ifndef CONFIG_ESP_WIFI_PRIO | ||
#define CONFIG_ESP_WIFI_PRIO ESP_WIFI_PRIO | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Namespace |
||
#endif | ||
|
||
/** | ||
* @brief SSID of the AP to be used. | ||
*/ | ||
#ifndef ESP_WIFI_SSID | ||
#define ESP_WIFI_SSID "RIOT_AP" | ||
#ifndef CONFIG_ESP_WIFI_SSID | ||
#define CONFIG_ESP_WIFI_SSID ESP_WIFI_SSID | ||
#endif | ||
|
||
/** | ||
* @brief Passphrase used for the AP as clear text (max. 64 chars). | ||
*/ | ||
#ifndef ESP_WIFI_PASS | ||
#define ESP_WIFI_PASS "ThisistheRIOTporttoESP" | ||
#ifndef CONFIG_ESP_WIFI_PASS | ||
#define CONFIG_ESP_WIFI_PASS ESP_WIFI_PASS | ||
#endif | ||
|
||
/**@}*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (c) 2020 Gunar Schorcht | ||
# | ||
# 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. | ||
# | ||
|
||
menuconfig KCONFIG_CPU_ESP8266 | ||
bool "Configure ESP8266 CPU" | ||
depends on MODULE_ESP_ESP8266 | ||
help | ||
Configure ESP8266 CPU via Kconfig. | ||
|
||
if KCONFIG_CPU_ESP8266 | ||
|
||
choice ESP8266_CPU_FREQUENCY | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
bool "CPU frequency" | ||
default ESP8266_CPU_FREQUENCY_80MHZ | ||
help | ||
Defines the CPU frequency. | ||
|
||
config ESP8266_CPU_FREQUENCY_80MHZ | ||
bool "80 MHz" | ||
config ESP8266_CPU_FREQUENCY_160MHZ | ||
bool "160 MHz" | ||
endchoice | ||
|
||
rsource "esp-wifi/Kconfig" | ||
rsource "$(RIOTBASE)/cpu/esp_common/esp-now/Kconfig" | ||
|
||
endif # ESP8266 settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to associate a symbol to the choice here, as it is not extended somewhere else.