-
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
drivers/atwinc15x0: add Kconfig #17382
base: master
Are you sure you want to change the base?
Changes from all commits
ff37253
503c94a
6befb7d
047c60a
14a3792
e21f575
4091611
57fc6f8
9c4ee95
bac0efb
de96ed6
29f8ab6
c533b6c
ae17fcc
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,58 @@ | ||
# Copyright (c) 2020 HAW Hamburg | ||
# | ||
# 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 MODULE_ATWINC15X0 | ||
bool | ||
prompt "ATWINC15x0 WiFi module" if !(MODULE_NETDEV_DEFAULT && HAVE_ATWINC15X0) | ||
default y if (MODULE_NETDEV_DEFAULT && HAVE_ATWINC15X0) | ||
depends on HAS_PERIPH_GPIO | ||
depends on HAS_PERIPH_GPIO_IRQ | ||
depends on HAS_PERIPH_SPI | ||
depends on TEST_KCONFIG | ||
select PACKAGE_DRIVER_ATWINC15X0 | ||
select MODULE_PERIPH_GPIO | ||
select MODULE_PERIPH_GPIO_IRQ | ||
select MODULE_PERIPH_SPI | ||
select MODULE_NETDEV_ETH | ||
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. I'm sorry but I think this is not modelled yet. That's the main reason we did not move yet to modelling networking drivers. 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.
|
||
select MODULE_ZTIMER_MSEC | ||
gschorcht marked this conversation as resolved.
Show resolved
Hide resolved
|
||
help | ||
This netdev device driver is used for the Microchip ATWINC15x0 | ||
WiFi module. The ATWINC15x0 WiFi module is widely used as WiFi | ||
interface on various boards and extension boards. | ||
|
||
if MODULE_ATWINC15X0 | ||
|
||
config WIFI_SSID | ||
string "WiFi SSID" | ||
default "RIOT_AP" | ||
help | ||
SSID of the AP to be used. The SSID must not contain more | ||
than 32 characters. | ||
|
||
config WIFI_USE_WPA2 | ||
bool "Use WPA2 authentication" | ||
default n | ||
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.
|
||
help | ||
Specify whether WPA2 authentication is used to connect to the | ||
AP. If WPA2 authentication is enabled, the passphrase has to be | ||
defined. | ||
|
||
config WIFI_PASS | ||
string "Passphrase for WPA2 Personal Mode authentication" | ||
depends on WIFI_USE_WPA2 | ||
default "This is RIOT-OS" | ||
help | ||
The passphrase is defined as a clear text string with a maximum | ||
of 64 characters. It is used for WPA2 personal mode authentication. | ||
Comment on lines
+29
to
+50
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. Definitely outside the scope of this PR, but at some point we need to handle this system-wide and not driver-specific. 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. Hm, this seems to be a hen's egg problem because it is required for the compilation of the driver. 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. Yeah, as it is currently done. Perhaps we can think about some key management (something similar to credman?). Would it be possible (on a separate PR) to start unifying the macro name and have one system-wide for other modules (e.g., ESP)? |
||
|
||
endif # MODULE_ATWINC15X0 | ||
|
||
config HAVE_ATWINC15X0 | ||
bool | ||
help | ||
Indicates that a ATWINC15x0 module is present. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,10 +156,13 @@ Symbol | Default | Description | |
|
||
At the moment only WPA2 Personal Mode is supported. The required settings are: | ||
|
||
Parameter | Default | Description | ||
:---------|:----------|:------------ | ||
WIFI_SSID | "RIOT_AP" | SSID of the AP to be used. | ||
WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars). | ||
Parameter | Default | Description | ||
:----------|:----------|:------------ | ||
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used. | ||
#WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars) [1]. | ||
Comment on lines
+161
to
+162
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. I'd suggest to migrate these values to include the 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. My concern is that user applications may have already used these documented configuration settings. We can change them but we should have some deprecation mechanism which. My approach was to use it in that way #ifndef WIFI_SSID
#ifndef CONFIG_WIFI_SSID
#define WIFI_SSID "RIOT_AP"
#else /* CONFIG_WIFI_SSID */
#define WIFI_SSID CONFIG_WIFI_SSID
#endif /* CONFIG_WIFI_SSID */
#endif /* WIFI_SSID */ which allows to use both definitions. 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. Sure, we should add a deprecation warning if we change them. It already has been done with other configurations (e.g., #13129). |
||
|
||
|
||
1. Leave `WIFI_PASS` undefined to connect to an open WiFi access point. | ||
|
||
The following example shows the make command with the setting of different GPIOs and the WiFi parameters. | ||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ if MODULE_RANDOM | |
choice RANDOM_IMPLEMENTATION | ||
bool "PRNG Implementation" | ||
depends on TEST_KCONFIG | ||
default MODULE_PRNG_HWRNG if HAS_PERIPH_HWRNG | ||
default MODULE_PRNG_HWRNG if HAS_PERIPH_HWRNG && !MODULE_NETDEV_DEFAULT | ||
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. why? 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. To be honest, I don't remember but there was a problem when module |
||
default MODULE_PRNG_MUSL_LCG | ||
|
||
menuconfig MODULE_PRNG_FORTUNA | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2021 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. | ||
# | ||
|
||
rsource "../driver_netdev_common/Kconfig" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# this file enables modules defined in Kconfig. Do not use this file for | ||
# application configuration. This is only needed during migration. | ||
CONFIG_DRIVER_NETDEV_COMMON=y | ||
CONFIG_MODULE_ATWINC15X0=y |
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.
@fjmolinas can you check if this is needed?
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.
Nimble has not been modeled so far, but what should be done is change the default NRF5X_RADIO backend if using Nimble no? I think something like this:
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.
If when using nimble the backend is fixed, then we should also hide the prompt, so it cannot be changed.
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.
True