19299: Add missing newline to output of telnet example r=benpicco a=Enoch247
### Contribution description
From the commit msg:
> The telnet example prints a line to the console, but it is not ended with a newline. When using pyterm, the last line is then never shown as it reads the console line by line and is waiting for the end of the line.
>
> This patch swaps use of `printf` for `puts` for the last line printed. This means the missing newline character gets added. This is also done to be consistent with the rest of the file, where puts is used whenever possible instead of printf.
### Testing procedure
1. `cd examples/telnet`
2. `make all flash term`
3. observe the final line "Local shell disabled" is printed, but would not have without this patch
### Issues/PRs references
- none known
19301: fib: document unused state r=benpicco a=benpicco
Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
The telnet example prints a line to the console, but it is not ended
with a newline. When using pyterm, the last line is then never shown as
it reads the console line by line and is waiting for the end of the
line.
This patch swaps use of `printf` for `puts` for the last line printed.
This means the missing newline character gets added. This is also done
to be consistent with the rest of the file, where puts is used whenever
possible instead of printf.
19297: tests/rmutex: clean up test and reduce stack size r=maribu a=maribu
### Contribution description
As the title says. This results in a few more boards being able to run the test.
Also, the wording in the README.md is improved to not be interpreted as generally threads with lower thread ID being preferred over threads with higher when locking a mutex.
### Testing procedure
```
make -C tests/rmutex BOARD=foo flash test
```
### Issues/PRs references
Fixes https://github.com/RIOT-OS/RIOT/issues/19140
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
18392: drivers/servo: reimplement with high level interface r=benpicco a=maribu
### Contribution description
The previous servo driver didn't provide any benefit over using PWM directly, as users controlled the servo in terms of PWM duty cycles. This changes the interface to provide a high level interface that abstracts the gory PWM details.
In addition, a SAUL layer and auto-initialization is provided.
### Testing procedure
The test application provides access to the servo driver via the `saul` shell command.
```
> saul
2022-08-02 22:12:31,826 # saul
2022-08-02 22:12:31,827 # ID Class Name
2022-08-02 22:12:31,830 # #0 ACT_SWITCH LD1(green)
2022-08-02 22:12:31,832 # #1 ACT_SWITCH LD2(blue)
2022-08-02 22:12:31,834 # #2 ACT_SWITCH LD3(red)
2022-08-02 22:12:31,837 # #3 SENSE_BTN B1(User button)
2022-08-02 22:12:31,838 # #4 ACT_SERVO servo
> saul write 4 0
2022-08-02 22:12:41,443 # saul write 4 0
2022-08-02 22:12:41,445 # Writing to device #4 - servo
2022-08-02 22:12:41,447 # Data: 0
2022-08-02 22:12:41,450 # [servo] setting 0 to 2949 (0 / 255)
2022-08-02 22:12:41,453 # data successfully written to device #4
> saul write 4 256
2022-08-02 22:12:45,343 # saul write 4 256
2022-08-02 22:12:45,346 # Writing to device #4 - servo
2022-08-02 22:12:45,347 # Data: 256
2022-08-02 22:12:45,351 # [servo] setting 0 to 6865 (255 / 255)
2022-08-02 22:12:45,354 # data successfully written to device #4
```
Each write resulted in the MG90S servo that I connected to move to the corresponding position.
### Issues/PRs references
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
The previous servo driver didn't provide any benefit over using PWM
directly, as users controlled the servo in terms of PWM duty cycles.
This changes the interface to provide a high level interface that
abstracts the gory PWM details.
In addition, a SAUL layer and auto-initialization is provided.
Co-authored-by: benpicco <benpicco@googlemail.com>
19294: sys/shell: don't include suit command by default r=benpicco a=benpicco
19295: gcoap: Finish the gcoap_get_resource_list_tl -> gcoap_get_resource_list renaming r=benpicco a=chrysn
### Contribution description
In #16688, an argument was added to the `gcoap_get_resource_list` function by creating a new function `gcoap_get_resource_list_tl` with a deprecation and roll-over plan.
This plan has not been acted on so far.
This PR shortens the original plan by just adding the argument to `gcoap_get_resource_list` and removing `gcoap_get_resource_list_tl` in a single go. The rationale for this deviation is that while it's a public API, its only two practical consumers are the (built-in) well-known/core implementation, and the (built-in) CoRE Resource Directory (cord) endpoint. Moreover, a further change to this API (switching over to `coap_block_slicer_t`) is expected to happen within this release cycle, which would take something like 4 total releases to get through otherwise, which is unrealistic for an API that there are no known external users of.
A second commit clean up ToDo items (in the changed function's documentation) that referred to a IETF draft that has long been abandoned by the CoRE WG.
### Testing procedure
Plain inspection and CI passing should suffice.
### AOB
There is a second analogous pair left over from #16688, `gcoap_req_send` / `gcoap_req_send_tl`. As that *is* expected to be used widely, I prefer not to mix these two concerns, and get the present one through without unnecessary hold-up.
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: chrysn <chrysn@fsfe.org>
This is an API change in the latter, which would typically now take an
extra argument GCOAP_SOCKET_TYPE_UNDEF.
Follow-Up-For: https://github.com/RIOT-OS/RIOT/pull/16688
19256: pkg/tinyusb: add GD32VF103 support r=gschorcht 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
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
19291: dist/tools/insufficient_memory: Improve and clean up script r=maribu a=maribu
### Contribution description
- drop all bash specifics and use generic sh
- fix all shellcheck warnings
- use nproc instead of hard-coded `-j4`
- print output on (real) compilation error
### Testing procedure
Script should still work
### Issues/PRs references
None
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
- drop all bash specifics and use generic sh
- fix all shellcheck warnings
- use nproc instead of hard-coded `-j4`
- print output on (real) compilation error
19278: gnrc_dhcpv6_client_simple_pd: select upstream based on type/index r=benpicco a=benpicco
19290: sys/crypto: make AES_KEY struct private & rename it r=benpicco a=benpicco
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
* riot-wrappers:
* Fix infinite loop when using a Mutex
* Make ValueInThread Copy/Clone
* riot-sys:
* Export xxx_DEV (eg. I2C_DEV) C macros as functions
* Add auto_init_utils.h
19142: sock_dtls: move common code into sock_dtls_establish_session() r=benpicco a=benpicco
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
19287: boards/esp32s2-lilygo-ttgo-t8: fix STDIO selection in Kconfig r=benpicco a=gschorcht
### Contribution description
This PR fixes the default STDIO selection in Kconfig in case the USB port is connected to the USB to UART bridge which is then used for STDIO (default). It solves the compilation problems in the nightly build.
The PR also includes a very small documentation fix.
### Testing procedure
Green CI.
The compilations that caused problems in nightly build should pass:
```
python3 dist/tools/compile_test/compile_like_murdock.py -a tests/pkg_tinyusb_cdc_msc -b esp32s2-lilygo-ttgo-t8 -j8
```
```
python3 dist/tools/compile_test/compile_like_murdock.py -a tests/sys_fido2_ctap/ -b esp32s2-lilygo-ttgo-t8 -j8
```
```
python3 dist/tools/compile_test/compile_like_murdock.py -a tests/usbus_board_reset/ -b esp32s2-lilygo-ttgo-t8 -j8
```
### Issues/PRs references
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
19269: cpu/gd32v/periph_i2c: interrupt based driver r=gschorcht 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
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>