Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
19027: sys/fmt: optimize scn_u32_dec scn_u32_hex r=benpicco a=kfessel

### Contribution description

Improves the compilation result for `scn_u32_dec` `scn_u32_hex` especially on `cortex-m` reducing either stack usage and or code size.

This makes use of unsigned int overflow (slightly less better without doing that `hexn`).

See godbolt (original versions got an `o` attached, modified versions got `k`s) all functions are  marked `_S_` defined to `static`

by assigning the global at end the compiled function can be changed (`deco deck  hexo hexk hexkk hexn`)

this PR is `hexkk` and `deck` 

### Testing procedure

run unit-test/test-fmt

```
<RIOT>/tests/unittests$ make tests-fmt
<RIOT>/tests/unittests$ make term
```

### Issues/PRs references

[godbolt](https://godbolt.org/z/MzT1zh4q1)

19256: pkg/tinyusb: add GD32VF103 support r=benpicco a=gschorcht

### Contribution description

This PR provides the tinyUSB support for GD32VF103 and enables the `tinyusb_device` feature as well as `stdio_tinyusb_cdc_acm` for GD32VF103 boards.

### Testing procedure

```
BOARD=sipeeed-longan-nano make -C tests/shell flash term
```
should work

### Issues/PRs references


19269: cpu/gd32v/periph_i2c: interrupt based driver r=benpicco a=gschorcht

### Contribution description

This PR provides an interrupt-driven version of the I2C low-level driver.

The existing I2C low-level driver for GDVF103 uses a busy-waiting approach where the status register is continuously polled while waiting for a certain status when sending or receiving. The MCU is thus occupied the whole time during a send or receive operation.

The driver provided with this PR uses an interrupt-driven approach. This is, while waiting for a certain status when sending or receiving, the calling thread is suspended and woken up by interrupts.

Since the I2C controller allows to receive up to two bytes before the application has to react, receiving a single byte, two bytes or more than two bytes needs a different handling for correct receiption. This requires a tricky implementation which distinguish a number of different case. There the driver requires 860 byte more ROM and 8 byte more RAM.

### Testing procedure

The driver should work with any I2C sensor/actuator. It was tested with
- `tests/driver_bmp180`
   <details>
  
   ```
    main(): This is RIOT! (Version: 2023.04-devel-355-g940c7-cpu/gd32v/periph_i2c_interrupt_driven)
    BMP180 test application
    
    +------------Initializing------------+
    Initialization successful
    
    +------------Calibration------------+
    AC1: 8448
    AC2: -1208
    AC3: -14907
    AC4: 33310
    AC5: 24774
    AC6: 19213
    B1: 6515
    B2: 49
    MB: -32768
    MC: -11786
    MD: 2958
    
    +--------Starting Measurements--------+
    Temperature [°C]: 22.0
    Pressure [hPa]: 1006.49
    Pressure at see level [hPa]: 1025.55
    Altitude [m]: 157
    
    +-------------------------------------+
    Temperature [°C]: 22.0
    Pressure [hPa]: 1006.56
    Pressure at see level [hPa]: 1025.58
    Altitude [m]: 157
    
    +-------------------------------------+
   ```
   
   </details>
- `tests/driver_ccs811`
   <details>
  
   ```
    main(): This is RIOT! (Version: 2023.04-devel-355-g940c7-cpu/gd32v/periph_i2c_interrupt_driven)
    CCS811 test application
    
    +------------Initializing------------+
    
    +--------Starting Measurements--------+
    TVOC [ppb]: 0
    eCO2 [ppm]: 0
    +-------------------------------------+
    TVOC [ppb]: 0
    eCO2 [ppm]: 0
    +-------------------------------------+
    TVOC [ppb]: 0
    eCO2 [ppm]: 0
    +-------------------------------------+
    TVOC [ppb]: 0
    eCO2 [ppm]: 400
    +-------------------------------------+
    TVOC [ppb]: 0
    eCO2 [ppm]: 400
    +-------------------------------------+
    TVOC [ppb]: 0
    eCO2 [ppm]: 400
    +-------------------------------------+
    TVOC [ppb]: 7
    eCO2 [ppm]: 446
    +-------------------------------------+
    TVOC [ppb]: 7
    eCO2 [ppm]: 446
    +-------------------------------------+
    TVOC [ppb]: 7
    eCO2 [ppm]: 446
    +-------------------------------------+
    TVOC [ppb]: 7
    eCO2 [ppm]: 446
    +-------------------------------------+
    ```
   
   </details>
- `tests/driver_sht3x`
   <details>
  
    ```
    main(): This is RIOT! (Version: 2023.04-devel-355-g940c7-cpu/gd32v/periph_i2c_interrupt_driven)
    SHT3X test application
    
    +------------Initializing------------+
    Initialization successful
    
    
    +--------Starting Measurements--------+
    Temperature [°C]: 21.46
    Relative Humidity [%]: 54.50
    +-------------------------------------+
    Temperature [°C]: 21.47
    Relative Humidity [%]: 54.53
    +-------------------------------------+
    Temperature [°C]: 21.46
    Relative Humidity [%]: 54.48
    +-------------------------------------+
    Temperature [°C]: 21.46
    Relative Humidity [%]: 54.47
    +-------------------------------------+
    ```
   
   </details>
- `tests/driver_l3gxxxx`
   <details>
  
    ```
    main(): This is RIOT! (Version: 2023.04-devel-375-g75547-cpu/gd32v/periph_i2c_interrupt_driven)
    L3GXXXX gyroscope driver test application
    
    Initializing L3GXXXX sensor
    [OK]
    
    gyro [dps] x:    +0, y:    -1, z:    -2
    gyro [dps] x:    +0, y:    +0, z:    +0
    gyro [dps] x:    +0, y:    +0, z:    +0
    gyro [dps] x:    +0, y:    +0, z:    +0
    gyro [dps] x:    +0, y:    +0, z:    +0
    gyro [dps] x:    +0, y:    +0, z:    +0
    gyro [dps] x:    -1, y:    +0, z:    +4
    gyro [dps] x:    +0, y:    +0, z:   -21
    gyro [dps] x:    +0, y:    +0, z:    +6
    gyro [dps] x:   -43, y:    +0, z:   -13
    gyro [dps] x:   -21, y:    -2, z:    +0
    gyro [dps] x:    +0, y:    +1, z:    +3
    gyro [dps] x:   +25, y:    +0, z:    +0
    ```
   
   </details>
- `tests/driver_hd44780` with `pcf8574a` I2C interface

### Issues/PRs references



19286: cpu/esp_common: use generic WIFI_SSID/WIFI_PASS defines r=benpicco a=benpicco



Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
  • Loading branch information
4 people authored Feb 17, 2023
5 parents 6f6727d + 18a783d + f0041c9 + 3fd04b7 + cebd768 commit e753b2d
Show file tree
Hide file tree
Showing 34 changed files with 2,455 additions and 302 deletions.
63 changes: 63 additions & 0 deletions boards/common/gd32v/include/cfg_usbdev_default.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Copyright (C) 2023 Gunar Schorcht <gunar@schorcht.net>
*
* 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.
*/

/**
* @ingroup boards_common_gd32v
* @{
*
* @file
* @brief Default USB OTG configuration for GD32 RISC-V board
*
* @author Gunar Schorcht <gunar@schorcht.net>
*/

#ifndef CFG_USBDEV_DEFAULT_H
#define CFG_USBDEV_DEFAULT_H

#include "vendor/usbdev_gd32v.h"
#include "usbdev_synopsys_dwc2.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name USB OTG configuration
* @{
*/
/**
* @brief Enable the full speed USB OTG peripheral
*/
#define DWC2_USB_OTG_FS_ENABLED

/**
* @brief Common USB OTG FS configuration
*/
static const dwc2_usb_otg_fshs_config_t dwc2_usb_otg_fshs_config[] = {
{
.periph = USB_OTG_FS_PERIPH_BASE,
.type = DWC2_USB_OTG_FS,
.phy = DWC2_USB_OTG_PHY_BUILTIN,
.rcu_mask = RCU_AHBEN_USBFSEN_Msk,
.bus = AHB,
.irqn = USBFS_IRQn,
}
};

/**
* @brief Number of available USB OTG peripherals
*/
#define USBDEV_NUMOF ARRAY_SIZE(dwc2_usb_otg_fshs_config)
/** @} */

#ifdef __cplusplus
}
#endif

#endif /* CFG_USBDEV_DEFAULT_H */
/** @} */
7 changes: 7 additions & 0 deletions boards/common/gd32v/include/periph_common_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
extern "C" {
#endif

#if defined(MODULE_USBDEV_SYNOPSYS_DWC2) || defined(MODULE_TINYUSB_DEVICE)
/* If the USB OTG peripheral is used, the USB clock of 48 MHz is derived by
* dividing the PLL clock by 1, 1.5, 2, or 2.5. That is the maximum core clock
* frequency can be 96 MHz. */
#define CLOCK_CORECLOCK MHZ(96) /**< CPU clock frequency in Hz */
#else
#define CLOCK_CORECLOCK MHZ(108) /**< CPU clock frequency in Hz */
#endif

#define CLOCK_AHB CLOCK_CORECLOCK /**< Equal to the CPU clock */
#define CLOCK_APB1 CLOCK_AHB/2 /**< Half AHB clock */
Expand Down
2 changes: 2 additions & 0 deletions boards/seeedstudio-gd32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ config BOARD_SEEEDSTUDIO_GD32
select CPU_MODEL_GD32VF103VBT6
select BOARD_HAS_HXTAL
select BOARD_HAS_LXTAL
select HAS_HIGHLEVEL_STDIO
select HAS_PERIPH_ADC
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_TINYUSB_DEVICE
select HAVE_SAUL_GPIO

source "$(RIOTBOARD)/common/gd32v/Kconfig"
1 change: 1 addition & 0 deletions boards/seeedstudio-gd32/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif

include $(RIOTBOARD)/common/makefiles/stdio_tinyusb_cdc_acm.dep.mk
include $(RIOTBOARD)/common/gd32v/Makefile.dep
6 changes: 5 additions & 1 deletion boards/seeedstudio-gd32/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

include $(RIOTBOARD)/common/gd32v/Makefile.features
# Other features provided by the board (in alphabetical order)
FEATURES_PROVIDED += highlevel_stdio
FEATURES_PROVIDED += tinyusb_device

include $(RIOTBOARD)/common/gd32v/Makefile.features
1 change: 1 addition & 0 deletions boards/seeedstudio-gd32/Makefile.include
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PORT_LINUX ?= /dev/ttyACM0
include $(RIOTBOARD)/common/gd32v/Makefile.include
1 change: 1 addition & 0 deletions boards/seeedstudio-gd32/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#include "cfg_uart_default.h"
#include "cfg_usbdev_default.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 2 additions & 0 deletions boards/sipeed-longan-nano/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ config BOARD_SIPEED_LONGAN_NANO
select CPU_MODEL_GD32VF103CBT6
select BOARD_HAS_HXTAL
select BOARD_HAS_LXTAL
select HAS_HIGHLEVEL_STDIO
select HAS_PERIPH_ADC
select HAS_PERIPH_DAC
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_TINYUSB_DEVICE
select HAVE_SAUL_GPIO

select HAVE_MTD_SDCARD_DEFAULT
Expand Down
1 change: 1 addition & 0 deletions boards/sipeed-longan-nano/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ ifneq (,$(filter vfs_default,$(USEMODULE)))
USEMODULE += mtd
endif

include $(RIOTBOARD)/common/makefiles/stdio_tinyusb_cdc_acm.dep.mk
include $(RIOTBOARD)/common/gd32v/Makefile.dep
4 changes: 4 additions & 0 deletions boards/sipeed-longan-nano/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += sdcard_spi

# Other features provided by the board (in alphabetical order)
FEATURES_PROVIDED += highlevel_stdio
FEATURES_PROVIDED += tinyusb_device

include $(RIOTBOARD)/common/gd32v/Makefile.features
1 change: 1 addition & 0 deletions boards/sipeed-longan-nano/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
PORT_LINUX ?= /dev/ttyACM0
PROGRAMMER ?= dfu-util
include $(RIOTBOARD)/common/gd32v/Makefile.include
1 change: 1 addition & 0 deletions boards/sipeed-longan-nano/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#include "cfg_uart_default.h"
#include "cfg_usbdev_default.h"

#ifdef __cplusplus
extern "C" {
Expand Down
30 changes: 15 additions & 15 deletions cpu/esp32/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1561,8 +1561,8 @@ Furthermore, the following configuration parameters have to be defined:

Parameter | Default | Description
:-------------------|:--------------------------|:------------
#ESP_WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
#ESP_WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars).
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
#WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars).
#ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.

</center><br>
Expand All @@ -1573,14 +1573,14 @@ line, for example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USEMODULE=esp_wifi \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\"' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@note
- Module `esp_wifi` is not enabled automatically when module
`netdev_default` is used.
- Leave 'ESP_WIFI_PASS' undefined to connect to an open WiFi access point.
- Leave 'WIFI_PASS' undefined to connect to an open WiFi access point.
- The Wifi network interface (module `esp_wifi`) and the
[ESP-NOW network interface](#esp32_esp_now_network_interface) (module `esp_now`)
can be used simultaneously, for example, to realize a border router for
Expand Down Expand Up @@ -1612,16 +1612,16 @@ following configuration parameters have to be defined:

Parameter | Default | Description
:-------------------|:----------|:------------
#ESP_WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
ESP_WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication.[1]
ESP_WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
ESP_WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication.[1]
WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
#ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.

</center><br>

[1] If the optional anonymous identy `ESP_WIFI_EAP_ID` is not defined, the user
name `ESP_WIFI_EAP_USER` defined for phase 2 (inner) EAP authentication is used
[1] If the optional anonymous identy `WIFI_EAP_ID` is not defined, the user
name `WIFI_EAP_USER` defined for phase 2 (inner) EAP authentication is used
as identity in phase 1.

These configuration parameter definitions, as well as enabling the `esp_wifi`
Expand All @@ -1630,7 +1630,7 @@ line, for example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USEMODULE=esp_wifi_enterprise \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_EAP_ID=\"anonymous\" -DESP_WIFI_EAP_USER=\"MyUserName\" -DESP_WIFI_EAP_PASS=\"MyPassphrase\"' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_EAP_ID=\"anonymous\" -DWIFI_EAP_USER=\"MyUserName\" -DWIFI_EAP_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -1660,8 +1660,8 @@ The following parameters can be configured:

Parameter | Default | Description
:-------------------------|:--------------------------|:-------------
#ESP_WIFI_SSID | "RIOT_AP" | Static SSID definition for the SoftAP
#ESP_WIFI_PASS | none | The password for the WiFi SoftAP network interface.[1]
#WIFI_SSID | "RIOT_AP" | Static SSID definition for the SoftAP
#WIFI_PASS | none | The password for the WiFi SoftAP network interface.[1]
#ESP_WIFI_SSID_DYNAMIC | 0 | Defines whether dynamic SSID is used for the SoftAP [2].
#ESP_WIFI_SSID_HIDDEN | 0 | Defines whether the SoftAP SSID should be hidden.
#ESP_WIFI_MAX_CONN | 4 | The maximum number of connections for the SoftAP.
Expand All @@ -1673,7 +1673,7 @@ Parameter | Default | Description
[1] If no password is provided, the interface will be "open", otherwise it
uses WPA2-PSK authentication mode.<br>
[2] If `#ESP_WIFI_SSID_DYNAMIC` is set to 1, a dynamic SSID is generated for the
SoftAP by extending the defined SSID (`ESP_WIFI_SSID`) with the MAC address
SoftAP by extending the defined SSID (`WIFI_SSID`) with the MAC address
of the SoftAP interface used, e.g.: `RIOT_AP_aabbccddeeff`

These configuration parameter definitions, as well as enabling the `esp_wifi_ap`
Expand All @@ -1682,7 +1682,7 @@ line, for example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USEMODULE=esp_wifi_ap \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\" -DESP_WIFI_MAX_CONN=1' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_PASS=\"MyPassphrase\" -DESP_WIFI_MAX_CONN=1' \
make -C examples/gnrc_networking BOARD=...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
16 changes: 8 additions & 8 deletions cpu/esp8266/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,8 @@ Furthermore, the following configuration parameters have to be defined:

Parameter | Default | Description
:-------------------|:--------------------------|:------------
#ESP_WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
#ESP_WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars).
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
#WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars).
#ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT |Stack size used for the WiFi netdev driver thread.

</center>
Expand All @@ -729,14 +729,14 @@ line, e.g.:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USEMODULE=esp_wifi \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\"' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@note
- Module `esp_wifi` is not enabled automatically when module
`netdev_default` is used.
- Leave `ESP_WIFI_PASS` undefined to connect to an open WiFi access point.
- Leave `WIFI_PASS` undefined to connect to an open WiFi access point.
- The Wifi network interface (module `esp_wifi`) and the
[ESP-NOW network interface](#esp8266_esp_now_network_interface)
(module `esp_now`) can be used simultaneously, for example, to realize a
Expand All @@ -758,8 +758,8 @@ The following parameters can be configured:

Parameter | Default | Description
:-------------------------|:--------------------------|:-------------
#ESP_WIFI_SSID | "RIOT_AP" | Static SSID definition for the SoftAP
#ESP_WIFI_PASS | none | The password for the WiFi SoftAP network interface.[1]
#WIFI_SSID | "RIOT_AP" | Static SSID definition for the SoftAP
#WIFI_PASS | none | The password for the WiFi SoftAP network interface.[1]
#ESP_WIFI_SSID_DYNAMIC | 0 | Defines whether dynamic SSID is used for the SoftAP [2].
#ESP_WIFI_SSID_HIDDEN | 0 | Defines whether the SoftAP SSID should be hidden.
#ESP_WIFI_MAX_CONN | 4 | The maximum number of connections for the SoftAP.
Expand All @@ -771,7 +771,7 @@ Parameter | Default | Description
[1] If no password is provided, the interface will be "open", otherwise it
uses WPA2-PSK authentication mode.<br>
[2] If #ESP_WIFI_SSID_DYNAMIC is set to 1, a dynamic SSID is generated for the
SoftAP by extending the defined SSID (`ESP_WIFI_SSID`) with the MAC address
SoftAP by extending the defined SSID (`WIFI_SSID`) with the MAC address
of the SoftAP interface used, e.g.: `RIOT_AP_aabbccddeeff`

These configuration parameter definitions, as well as enabling the `esp_wifi_ap`
Expand All @@ -780,7 +780,7 @@ line, for example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USEMODULE=esp_wifi_ap \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\" -DESP_WIFI_MAX_CONN=1' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_PASS=\"MyPassphrase\" -DESP_WIFI_MAX_CONN=1' \
make -C examples/gnrc_networking BOARD=...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
18 changes: 9 additions & 9 deletions cpu/esp_common/esp-wifi/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Furthermore, the following configuration parameters have to be defined:

Parameter | Default | Description
:------------------|:--------------------------|:------------
ESP_WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
ESP_WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars).
WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
WIFI_PASS | - | Passphrase used for the AP as clear text (max. 64 chars).
ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.

</center>
Expand All @@ -50,14 +50,14 @@ line, for example:

```
USEMODULE=esp_wifi \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\"' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=...
```

@note
- Module `esp_wifi` is not enabled automatically when module
`netdev_default` is used.
- Leave 'ESP_WIFI_PASS' undefined to connect to an open WiFi access point.
- Leave 'WIFI_PASS' undefined to connect to an open WiFi access point.
- The Wifi network interface (module `esp_wifi`) and the
ESP-NOW network interface (module `esp_now`)
can be used simultaneously, for example, to realize a border router for
Expand Down Expand Up @@ -87,10 +87,10 @@ following configuration parameters have to be defined:

Parameter | Default | Description
:------------------|:----------|:------------
ESP_WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
ESP_WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication. If it is not defined, the user name defined for phase 2 (inner) EAP authentication is used as idendity in phase 1.
ESP_WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
ESP_WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication. If it is not defined, the user name defined for phase 2 (inner) EAP authentication is used as idendity in phase 1.
WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.

</center>
Expand All @@ -101,7 +101,7 @@ line, for example:

```
USEMODULE=esp_wifi_enterprise \
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_EAP_ID=\"anonymous\" -DESP_WIFI_EAP_USER=\"MyUserName\" -DESP_WIFI_EAP_PASS=\"MyPassphrase\"' \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_EAP_ID=\"anonymous\" -DWIFI_EAP_USER=\"MyUserName\" -DWIFI_EAP_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=...
```

Expand Down
Loading

0 comments on commit e753b2d

Please sign in to comment.