1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

4425 Commits

Author SHA1 Message Date
Benjamin Valentin
ba17c14aef drivers/mtd_sdcard: drop .write()
The old .write() function is only used as a fall-back if .write_page()
is not implemented.
We can drop it.
2023-12-13 16:50:41 +01:00
Benjamin Valentin
ea105d34ec drivers/mtd_spi_nor: drop .write()
The old .write() function is only used as a fall-back if .write_page()
is not implemented.
We can drop it.
2023-12-13 16:50:41 +01:00
Benjamin Valentin
26aba7b8c7 drivers/at25xxx: drop .write()
The old .write() function is only used as a fall-back if .write_page()
is not implemented.
We can drop it.
2023-12-13 16:50:41 +01:00
Benjamin Valentin
5acfb20d02 drivers/periph/uart: add functions to query RTS/CTS pins 2023-12-12 20:25:39 +01:00
Gunar Schorcht
9410ec705e drivers/mtd: replace checks by assert in mtd_dev_get
Assertions are used instead of returning a NULL pointer to detect errors in the MTD definition and access in the case that the return value is not evaluated.
2023-12-07 15:32:49 +01:00
Gunar Schorcht
4b6e13ce29 drivers/mtd_default: remove extern mtd_dev_t * declarations 2023-12-07 15:32:49 +01:00
Marian Buschsieweke
b917807444
drivers/periph_timer: add periph_timer_query_freqs
Allow accessing supported timer frequencies with a dedicated API.
This API needs to be implemented per platform and is available with
the feature periph_timer_query_freqs.
2023-12-05 16:07:24 +01:00
Benjamin Valentin
97ab5ef12e drivers/sdmmc: fix placement of #endif 2023-12-05 08:55:08 +01:00
benpicco
ad7bf85712
Merge pull request #20113 from gschorcht/drivers/mtd/fix_xfa
drivers/mtd: fix the order of entries in the MTD pointer XFA `mtd_dev_xfa`
2023-11-27 19:00:04 +00:00
benpicco
31224b4d2d
Merge pull request #20112 from maribu/drivers/lpsxxx
drivers/lpsxxx: add missing sign extension
2023-11-27 16:14:39 +00:00
Gunar Schorcht
ff79f39fd5 drivers/mtd: fix the order in the MTD pointer XFA
The commit fixes the order of entries in the MTD pointer XFA `mtd_dev_xfa` according to their index by using the index as the priority in the XFA.
2023-11-27 17:14:23 +01:00
benpicco
c93a5b84a3
Merge pull request #20020 from gompper/periph/freqm
drivers/include/periph: add FREQM peripheral driver
2023-11-27 16:06:52 +00:00
Marian Buschsieweke
bf6807c85a
drivers/lpsxxx: add missing sign extension
Fixes https://github.com/RIOT-OS/RIOT/issues/20093
2023-11-27 10:17:47 +01:00
Urs Gompper
97bde07e0d drivers/periph_common: add peripheral freqm to Kconfig 2023-11-23 20:53:15 +01:00
Urs Gompper
afcd4801bd drivers/include: add header definition for freqm 2023-11-23 20:37:52 +01:00
Benjamin Valentin
138cbb83d6 drivers/soft_uart: include board.h 2023-11-23 13:45:00 +01:00
Marian Buschsieweke
e7c9451b55
drivers/pcf857x: use errno code for error reporting
This makes it easier to use common error reporting such as `strerror()`
or `tiny_strerror()` to give more insight on why something failed.

The custom error codes via `enum` have been updated to be synonymous
with the `errno` codes for backward compatibility.

In addition, `pcf857x_init()` has been updated to no longer or
together the return code, but rather abort on the first fail transaction
and return the error code as is. Otherwise (when both fail due to
different error codes) the returned error code may be garbage.
2023-11-22 10:29:33 +01:00
Marian Buschsieweke
6380d81119
Merge pull request #20091 from benpicco/at24cs0x
drivers/at24cxxx: add defines for AT24CS04 & AT24CS08
2023-11-16 17:41:29 +00:00
Benjamin Valentin
1a19005c22 drivers/at24cxxx: add defines for AT24CS04 & AT24CS08 2023-11-16 14:28:20 +01:00
Karl Fessel
8a9fdf4661
Merge pull request #20062 from derMihai/at_fix_pr
drivers/at: fix URC collision with command response
2023-11-16 12:04:48 +00:00
Benjamin Valentin
63cd55cc7b drivers/mtd_default: deprecate mtd_default_get_dev() 2023-11-10 19:53:48 +01:00
Benjamin Valentin
396d3bbe2b drivers/mtd: introduce mtd_dev_get() 2023-11-10 19:53:48 +01:00
Mihai Renea
e99cafba33 drivers/at: fix URC collision with command response 2023-11-10 15:26:47 +01:00
benpicco
04617ee0a9
Merge pull request #20045 from benpicco/periph_adc_continous
periph/adc: introduce periph_adc_continuous
2023-11-10 12:13:54 +00:00
Benjamin Valentin
2421919295 periph/adc: introduce periph_adc_continous 2023-11-10 12:10:49 +01:00
Marian Buschsieweke
4b88a420ad
drivers/pcf857x: minor cleanup
- make sure format specifiers match variable arguments in debug
  statements
- drop unused headers
2023-11-10 09:57:58 +01:00
Benjamin Valentin
3889592db5 drivers/mtd_sdmmc: support mounting ext2/3/4 filesystems 2023-11-09 20:15:52 +01:00
Karl Fessel
a36802f9c7 driver/mtd: mtd_init add documentation for return value 2023-11-01 10:56:13 +01:00
Benjamin Valentin
6ec3f54b3c drivers/slipdev: improve default UART selection 2023-10-26 16:10:05 +02:00
bors[bot]
03d3874e51
Merge #19465 #19981 #19995
19465: drivers/mtd: use XFA for pointers to defined MTDs r=benpicco a=gschorcht

### Contribution description

This PR provides the support to hold pointers to defined MTDs within a XFA. The XFA allows
- to access MTDs of different types (`mtd_flashpage`, `mtd_sdcard`, `mtd_emulated`, ...) by an index
- to determine the number of MTDs defined in the system.

### Testing procedure

To be defined once PR #19443 is merged because emulated MTDs will allow to test this PR on arbitrary boards.

### Porting Guide

For external boards:
 - remove the `MTD_NUMOF` definition from `board.h`
 - add `MTD_XFA_ADD(<mtd_dev>, <idx>);` to the definition of `<mtd_dev>`.
 - `MTD_0`, `MTD_1`, … defines are no longer needed.

### Issues/PRs references

 Related to PR #19443

19981: Fletcher32: Add incremental API r=benpicco a=bergzand

### Contribution description

This PR extends the current fletcher32 checksum with an incremental API mode. This way the bytes to be checksummed can be supplied via multiple successive calls and do not have to be provided in a single consecutive buffer.

I've also rephrased the warning with the original function a bit as that function uses an `unaligned_get_u16` to access the data. The data thus does not require alignment, but the length does need to be supplied as number of 16 bit words.

### Testing procedure

The test has been extended


### Issues/PRs references

None

19995: sys/psa_crypto: Fix macro for public key max size and SE example r=benpicco a=Einhornhool

### Contribution description
#### 1. Wrong public key size when using secure elements, introduced by  #19954
Fixed conditions for key size macros in `crypto_sizes.h`.

#### 2. EdDSA and ECDSA examples fail when using a secure element because of unsopported changes introduced by #19954
Updated `example/psa_crypto` to use only supported functions for secure elements.

### Testing procedure
Build `example/psa_crypto` for secure elements and run application

Output on master:
```
2023-10-19 14:33:24,372 # main(): This is RIOT! (Version: 2019.07-devel-22378-gb6772)
2023-10-19 14:33:24,372 # HMAC SHA256 took 56393 us
2023-10-19 14:33:24,372 # Cipher AES 128 took 68826 us
2023-10-19 14:33:24,372 # *** RIOT kernel panic:
2023-10-19 14:33:24,373 # HARD FAULT HANDLER
2023-10-19 14:33:24,373 # 
2023-10-19 14:33:24,373 # *** rebooting...

```
Output with fixes:
```
2023-10-19 13:35:24,715 # main(): This is RIOT! (Version: 2019.07-devel-22384-g8ef66-dev/psa-crypto-fixes)
2023-10-19 13:35:24,715 # HMAC SHA256 took 56374 us
2023-10-19 13:35:24,715 # Cipher AES 128 took 68805 us
2023-10-19 13:35:24,715 # ECDSA took 281164 us
2023-10-19 13:35:24,715 # All Done
```


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
2023-10-19 19:01:12 +00:00
Marian Buschsieweke
edc43201db
tree-wide: fix typos in doc and comments
This should not change any generated binary
2023-10-16 12:17:48 +02:00
bors[bot]
dd62f419d7
Merge #19941
19941: drivers/lcd: add MCU-driven low-level parallel interface r=benpicco a=gschorcht

### Contribution description

The PR extends the LCD driver by a low-level interface for MCU-driven implementations of the MCU 8080 16-/8-bit parallel interface, allowing the MCU to use special peripherals for the interface, such as the FMC for STM32 MCUs, which is significantly faster than the integrated GPIO-driven parallel interface implementation of the LCD driver.

### Testing procedure

~Once PR #19938 and PR #19939 are merged, a PRs for these board can be pushed that allow to test this PR.~

Use either PR #19943 or PR #19944 on top of this PR to test, e.g. with PR #19943:
```
BOARD=stm32f723e-disco make -j8 -C tests/drivers/st77xx flash
```

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-10-05 09:29:41 +00:00
Gunar Schorcht
9da0cc5bfd drivers/mtd_sdmmc: use XFA with MTD pointers 2023-10-02 12:28:08 +02:00
Gunar Schorcht
e70e6d7db2 drivers/mtd_emulated: use XFA with MTD pointers 2023-10-02 12:28:08 +02:00
Gunar Schorcht
e5c541b77c drivers/mtd_sdcard: use XFA with MTD pointers 2023-10-02 12:28:07 +02:00
Gunar Schorcht
739cb53ca9 drivers/mtd_default: use XFA with MTD pointers 2023-10-02 12:28:07 +02:00
Gunar Schorcht
bd67236788 drivers/mtd: store MTD pointers as XFA 2023-10-02 12:27:35 +02:00
bors[bot]
149cee491e
Merge #19760 #19946 #19956 #19957
19760: cpu/sam0_common/periph: add low-level SDMMC peripheral driver for SDHC r=benpicco a=gschorcht

### Contribution description

This PR implements the low-level SDIO/SDMMC peripheral driver for SAM0 SDHC according to the definition in #19539.

### Testing procedure

```
BOARD=same54-xpro make -C tests/drivers/sdmmc
```
```
BOARD=same54-xpro make -C tests/sys/vfs_default
```

### Issues/PRs references

~Depends on PR #19539~
Depends on PR #19899

19946: posix_sockets.c: Fix 2 byte int compilation errors r=benpicco a=mrdeep1



19956: cpu/esp32: fix heap definition for ESP32-S2 and ESP32-S3 r=benpicco a=gschorcht

### Contribution description

For ESP32-S2 and ESP32-S3 the symbol `_heap_end` must not be used as `_eheap` for the newlibc `malloc` and function `sbrk`.

`_heap_end` is used by the ESP-IDF heap implementation `esp-idf-heap` and points to the highest possible address (0x40000000) that could be used for the heap in ESP-IDF. It doesn't point to the top address of the unused SRAM area that can be used in newlibc `malloc` and function `sbrk`. Instead, the origin and the length of `dram0_0_seg` must be used to calculate the end of the heap `_eheap`.

The problem only occurs for the newlibc `malloc` when the `sbrk` function is used but not for the ESP-IDF heap implementation `esp_idf_heap`.

### Testing procedure

Use any ESP32-S2 or ESP32-S3 board and flash `tests/sys/malloc`, e.g.
```
CFLAGS='-DCHUNK_SIZE=16384' USEMODULE='stdio_uart' BOARD=esp32s3-pros3 make -j8 -C tests/sys/malloc flash
```
Without the PR the `nm` command will give the wrong address 
```
nm -s tests/sys/malloc/bin/esp32s3-pros3/tests_malloc.elf | grep _eheap
40000000 A _eheap
```
The test will stuck, i.e. the allocation of memory stops when the top of unused SRAM is reached and the board restarts when the watchdog timer expires. With the PR it should work as expected
```
Help: Press s to start test, r to print it is ready
START
main(): This is RIOT! (Version: 2023.10-devel-309-g4669e)
calloc(zu, zu) = 0x10000000
CHUNK_SIZE: 16384
NUMBER_OF_TESTS: 3
Allocated 16384 Bytes at 0x3fc8c4b0, total 16384
...
Allocated 16384 Bytes at 0x3fcec6f0, total 409792
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403763e3
```

With this PR the `nm` command should give a address in unused SRAM address space
```
nm -s tests/sys/malloc/bin/esp32s3-pros3/tests_malloc.elf | grep _eheap
3fcca000 A _eheap
```
and the test should pass.

### Issues/PRs references


19957: cpu/esp32: fix Octal SPI RAM for ESP32-S3 r=benpicco a=gschorcht

### Contribution description

This PR fixes Octal SPI RAM handling for ESP32-S3.

Functions that are used during the initialization of the Octal SPI RAM must reside in IRAM instead of Flash. Otherwise, the system stucks during boot once the Octal SPI RAM is enabled. The reason is that the Flash is not available during the initialization of the Octal SPI RAM and the functions that are called during that initialization can't be accessed in Flash. As a result the call of such a function leads to code that is messed up and the system crashes.

The PR also includes the documentation fixe for the `esp32s3-box`. It also includes a small documentation fix regarding the SPI RAM for the `esp32s3-pros3` board.

### Testing procedure

Use a board that has Octal SPI RAM and flash `tests/sys/malloc`, e.g.:
```
CFLAGS='-DCHUNK_SIZE=16384' USEMODULE='stdio_uart esp_spi_ram esp_log_startup' \
BOARD=esp32s3-box make -C tests/sys/malloc
```
Without the PR, the system stuck during boot once the information for the Octal SPI RAM is print
```
ESP-ROM:esp32s3-20210327
...
I (133) boot: Loaded app from partition at offset 0x10000
I (134) boot: Disabling RNG early entropy source...
vendor id : 0x0d (AP)
dev id    : 0x02 (generation 3)
density   : 0x03 (64 Mbit)
good-die  : 0x01 (Pass)
Latency   : 0x01 (Fixed)
VCC       : 0x01 (3V)
SRF       : 0x01 (Fast Refresh)
BurstType : 0x01 (Hybrid Wrap)
BurstLen  : 0x01 (32 Byte)
Readlatency  : 0x02 (10 cycles@Fixed)
DriveStrength: 0x00 (1/1)
```
and the board restarts when the watchdog timer expires.

With this PR, the system starts as expected.
```
ESP-ROM:esp32s3-20210327
...
I (132) boot: Loaded app from partition at offset 0x10000
I (133) boot: Disabling RNG early entropy source...
vendor id : 0x0d (AP)
dev id    : 0x02 (generation 3)
density   : 0x03 (64 Mbit)
good-die  : 0x01 (Pass)
Latency   : 0x01 (Fixed)
VCC       : 0x01 (3V)
SRF       : 0x01 (Fast Refresh)
BurstType : 0x01 (Hybrid Wrap)
BurstLen  : 0x01 (32 Byte)
Readlatency  : 0x02 (10 cycles@Fixed)
DriveStrength: 0x00 (1/1)
Found 64MBit SPI RAM device
SPI RAM mode: sram 40m
PSRAM initialized, cache is in normal (1-core) mode.
Pro cpu up.
Single core mode
SPI SRAM memory test OK
Initializing. RAM available for dynamic allocation:
At 3FC8C150 len 00053EB0 (335 KiB): D/IRAM
At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
At 3FCF0000 len 00008000 (32 KiB): DRAM

Starting ESP32x with ID: f412fafd0f8c
ESP-IDF SDK Version v4.4.1

Current clocks in Hz: CPU=80000000 APB=80000000 XTAL=40000000 SLOW=150000
PRO cpu is up (single core mode, only PRO cpu is used)
PRO cpu starts user code
Adding pool of 8192K of external SPI memory to heap allocator
Used clocks in Hz: CPU=80000000 APB=80000000 XTAL=40000000 FAST=8000000 SLOW=150000
XTAL calibration value: 3643448
Heap free: 8754851 bytes

Board configuration:
	UART_DEV(0)	txd=43 rxd=44
	LED		pins=[ ]
	BUTTONS		pins=[ 0 ]

Starting RIOT kernel on PRO cpu
Help: Press s to start test, r to print it is ready
```

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2023-09-29 08:36:50 +00:00
Gunar Schorcht
ca44651d78 drivers/mtd: fix missing dependency in Kconfig for periph_sdmmc 2023-09-29 07:49:41 +02:00
Gunar Schorcht
5393c7571a drivers/sdmmc: fix dependencies for ztimer_msec
Enabling `ztimer_msec` through `sdmmc` in case `ztimer_usec` is not enabled will not work if the dependencies for `sdmmc` are resolved before the dependencies of another module that enables `ztimer_usec`. Therefore, `ztimer_msec` has to be enabled by `sdmmc`
2023-09-29 07:48:32 +02:00
Gunar Schorcht
7a4c2a526f drivers/sht3x: fix references in documentation 2023-09-27 09:12:06 +02:00
Gunar Schorcht
b73be0d546 drivers/sdmmc: add low-levl SD Host Controller implementation 2023-09-23 19:26:30 +02:00
Gunar Schorcht
e0a76c5768 drivers/lcd: add MCU-driven low-level parallel interface 2023-09-23 08:03:16 +02:00
Gunar Schorcht
0353e05bc3 drivers/lcd: move GPIO low-level interface to separate file 2023-09-23 08:03:16 +02:00
Gunar Schorcht
a73ff74b5a tests/drivers/st77xx: read ID and status 2023-09-22 17:00:00 +02:00
Gunar Schorcht
8306838424 drivers/lcd: expose lcd_ll_set_area function 2023-09-22 17:00:00 +02:00
Gunar Schorcht
4ae2e65108 drivers/st77xx: fix compilation with NDEBUG 2023-09-22 17:00:00 +02:00
bors[bot]
6bac1514c2
Merge #19937
19937: drivers/lcd: add MCU 8080 16-bit parallel mode support r=benpicco a=gschorcht

### Contribution description

This PR adds the 16-bit support for MCU 8080 parallel mode for LCD driver ICs.

### Testing procedure

Use either PR #19938
```
BOARD=stm32l496g-disco make -j8 -C tests/drivers/st77xx
```
or #19939  on top of this PR to test.
```
BOARD=sstm32f723e-disco make -j8 -C tests/drivers/st77xx
```

### Issues/PRs references

Prerequisite for PR #19938 or PR #19938

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-21 14:58:41 +00:00
Gunar Schorcht
c3006c59d0 drivers/st7735: add MCU 8080 16-bit parallel mode support 2023-09-21 13:12:03 +02:00
Gunar Schorcht
a30609ccd1 drivers/ili9341: add MCU 8080 16-bit parallel mode support 2023-09-21 13:12:03 +02:00
Gunar Schorcht
a12427fc4c drivers/lcd: add debug info to lcd_ll_write_cmd and lcd_ll_read_cmd 2023-09-21 13:00:35 +02:00
Gunar Schorcht
ad604fe6e2 drivers/lcd: implement MCU 8080 16-bit parallel mode 2023-09-21 13:00:35 +02:00
Gunar Schorcht
65d937c99d drivers/st77xx: fix init for ST7796 2023-09-21 12:14:48 +02:00
bors[bot]
1691dbe0d3
Merge #19914 #19915
19914: boards: complete SD Card MTD definition for several bords r=benpicco a=gschorcht

### Contribution description

This PR completes the MTD definition for the following boards:
- `seeedstudio-gd32`
- `sipeed-longan-nano` including `sipeed-longan-nano-tft`
- `waveshare-nrf52840-eval-kit`
- ESP32x boards that have an SPI SD Card interface and use `mtd_sdcard_default`

### Testing procedure

Green CI

### Issues/PRs references#19465 

Prerequisite for PR #19465 

19915: drivers/lcd: support MCU 8080 8-bit parallel mode r=benpicco a=gschorcht

### Contribution description

LCD driver ICs usually support
- SPI serial mode,
- MCU 8080 8-bit parallel mode and
- MCU 8080 16-bit parallel mode.

This PR extends the LCD display driver API to support the MCU 8080 8-/16-bit parallel modes and implements a GPIO-driven MCU 8080 8-bit parallel mode.

The following features are already working locally and will be provided as follow-on PRs for which this PR is a prerequisite.

- GPIO-driven bit-banging implementation of the 16-bit mode of the MCU 8080 parallel interface
- Enabling the display on `stm32f723e-disco` and `stm32l496g-disco` using the feature above
- Definition of a low-level API for the parallel modes using the LCD controller of the MCU
- Using FMC for the display on `stm32f723e-disco` and `stm32l496g-disco`
- Using LCD controller for the display of `esp32-wt32-sc01-plus` (PR #19917)

### Testing procedure

The PR can be tested with PR #19917 on top of this PR.
```
BOARD=esp32s3-wt32-sc01-plus make -j8 -C tests/drivers/st77xx flash
```
The following video shows the test.

**Please note** The test is pretty slow because the display has 480 x 320 pixels and the MCU 8080 8-bit parallel interface is realized by a GPIO-driven bit-banging implementation where each GPIO of the data bus is set separately. A follow-up PR will use the ESP32-S3 LCD controller and DMA for this board. This PR just defines the extension of the driver by the parallel interface and provides the bit-banging implementation for MCUs that don't have a LCD controller on chip.

https://github.com/RIOT-OS/RIOT/assets/31932013/c1e3e3d7-05d9-4ca5-8fff-9a5eaca50fba

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-20 15:55:34 +00:00
bors[bot]
ec69cfde6f
Merge #19919 #19931 #19935
19919: drivers/st77xx: introduce rotation defines r=benpicco a=gschorcht

### Contribution description

The PR introduces counterclockwise rotations for the definition of parameter `ST77XX_PARAM_ROTATION`.

It is more intuitive and universal to use `ST77XX_ROTATION_{0,90,180,270}` instead of `ST77XX_ROTATION_{ST77XX_ROTATION_{VERT,VERT_FLIP,HORZ,HORZ_FLIP}`, especially because the orientation of the display may vary with respect to the orientation of the board.

### Testing procedure

`tests/drivers/st77xx` should still work, for example:
```
BOARD=adafruit-pybadge make -C tests/drivers/st77xx flash
```
```
BOARD=esp32s3-usb-otg make -j8 -C tests/drivers/st77xx flash
```

### Issues/PRs references


19931: boards: fix documentation for GD32V boards and doxygen 1.9.4 r=benpicco a=gschorcht

### Contribution description

This PR fixes some small problems in documentation of `sipeed-longan-nano`, `sipeed-longan-nano-tft` and `seeedstudio-gd32` for doxygen 1.9.4 that is used on `doc.riot-os.org`.

Doxygen version 1.9.4 doesn't like anymore
- single double quotes as symbol for the inches unit in the text
- line breaks in `[]()` to avoid exhausting the 100 characters per line.

See https://doc.riot-os.org/group__boards__sipeed__longan__nano.html for example.

Doxygen 1.9.1 which is part of `riot-docker` container didn't have theses problems 😟

### Testing procedure

Documentation should be fixed.

### Issues/PRs references


19935: boards/nucleo64: fix SPI Arduino mapping for most boards r=benpicco a=maribu

### Contribution description

Before, the Arduino SPI mapping for all Nucleo-64 boards was incorrect. With this, the situation improves to the following:

- [x] nucleo-f030r8
- [ ] nucleo-f070rb
    - No SPI buses provided.
- [x] nucleo-f072rb
- [x] nucleo-f091rc
- [x] nucleo-f103rb
- [ ] nucleo-f302r8
    - No SPI bus at D11, D12, D13 provided
- [x] nucleo-f303re
- [x] nucleo-f334r8
- [x] nucleo-f401re
- [x] nucleo-f410rb
- [x] nucleo-f411re
- [x] nucleo-f446re
- [x] nucleo-g070rb
- [x] nucleo-g071rb
- [x] nucleo-g431rb
- [x] nucleo-g474re
- [x] nucleo-l053r8
- [x] nucleo-l073rz
- [x] nucleo-l152re
    - No SPI bus at D11, D12, D13 provided
- [x] nucleo-l452re
- [x] nucleo-l476rg
- [x] nucleo-wl55jc

The remaining offenders still need to be fixed, but that is better done one PR at a time.

### Testing procedure

- Check if the SPI device provided in the given `boards/<BOARD_NAME>/incude/periph_conf.h` is indeed `SPI_DEV(0)`, or in `periph_conf.h` the correct SPI dev is found
    - this should be fine for all boards above, except for the unchecked ones

or:

- run https://github.com/RIOT-OS/RIOT/pull/19932: The SPI test should pass now

### Issues/PRs references

Bug found in https://github.com/RIOT-OS/RIOT/pull/19932#issuecomment-1726305437

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-09-20 11:42:38 +00:00
Gunar Schorcht
b0ec24bc9e drivers/st7735: add MCU 8080 8-/16-bit parallel mode support 2023-09-20 13:03:36 +02:00
Gunar Schorcht
10122a7c2b drivers/ili9341: add MCU 8080 8-/16-bit parallel mode support 2023-09-20 13:03:36 +02:00
Gunar Schorcht
9dde49dd23 drivers/lcd: remove const for dev due to the mutex 2023-09-20 13:03:36 +02:00
Gunar Schorcht
04c3facd8e drivers/lcd: add MCU 8080 8-/16-bit parallel mode support
For the parallel interface support the following changes were made:

1. Additional `lcd_*` pseudomodules are defined to control whether SPI serial or MCU 8080 8-/16-bit parallel interface is used.
2. The low level function implementation was extended for parallel interfaces so that the now can use either the SPI serial interface or the MCU 8080 8-/16-bit parallel interface.

Using the `lcc_*` modules, either the SPI serial interface or the MCU 8080 8-/16-bit interface or even both for multiple display can be used simultaneously.
2023-09-20 13:03:36 +02:00
bors[bot]
e688211541
Merge #19923
19923: boards: add Silabs EFM32 Giant Gecko GG11 Starter Kit r=miri64 a=gschorcht

### Contribution description

The PR adds the support for the EFM32GG11B family and the Silabs EFM32 Giant Gecko GG11 Starter Kit board.

The Silabs EFM32 Giant Gecko GG11 has the following on-board features:

- EFM32GG11B MCU with 2 MB flash and 512 kB RAM
- J-Link USB debugger
- 176x176 RGB LCD (not supported)
- 2 user buttons, 2 user RGB LEDs and a touch slider
- Si7021 Relative Humidity and Temperature Sensor
- Si7210 Hall-Effect Sensor (not supported)
- USB OTG interface (Device mode supported)
- 32 MByte Quad-SPI Flash (not supported yet)
- SD card slot (not supported yet, follow-up PR based on PR #19760)
- RJ-45 Ethernet (not supported)
- Dual microphones (not supported)

### Testing procedure

Basic tests should work.

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-19 19:10:14 +00:00
Gunar Schorcht
b34f48c233 drivers/usdev_synopsys_dwc2: enable EFM32GG11B support 2023-09-18 12:40:33 +02:00
Marian Buschsieweke
d0fccdb549
drivers/pcf857x: Move compile time check to compilation unit
This allows including the header without using the module. Obviously,
calls to the functions provided by the header won't like without using
the module. But including the header can still be useful for e.g.:

    if (IS_USED(MODULE_PCF857x)) {
        /* make use of the module */
    }

In the above example all calls to pcf857x functions would be optimized
out when the module is not used, full compile checks happen in either
case.
2023-09-15 12:52:58 +02:00
Gunar Schorcht
bdfbe6f8a6 periph/sdmmc: add ADD_CMD12 feature in Kconfig 2023-09-14 10:01:14 +02:00
Gunar Schorcht
4a6f4ad798 drivers/sdmmc: store SDMMC devs in XFA 2023-09-12 14:30:18 +02:00
Gunar Schorcht
093593a3bd drivers/st77xx: add ST77XX_ROTATION macros that are more clear 2023-09-08 12:00:47 +02:00
Gunar Schorcht
f03bc3327c drivers/lcd: rename low-level functions
To be clear that the functions are low-level functions, they are renamed to `lcd_ll_*`.
2023-09-08 08:07:09 +02:00
Gunar Schorcht
7599ce7b00 drivers/st77xx: expose configuration parameters in Kconfig 2023-09-07 16:33:31 +02:00
Gunar Schorcht
5c7a9cc966 drivers/lcd: assert controller-specific init function 2023-09-07 16:33:31 +02:00
Gunar Schorcht
9447f59d59 drivers/st77xx: fix initialization sequences fror ST77xx 2023-09-07 16:33:31 +02:00
bors[bot]
85c7bd937c
Merge #19825
19825: drivers: rename st7735 to more generic st77xx r=aabadie a=gschorcht

### Contribution description

This PR provides the following changes:
- renames the driver `st7735` to `st77xx`
- renames the test `st7735` to `st77xx`
- models controller variants as pseudomodules `st7735`, `st7789` and `st7796`
- removes the buggy initialization as a workaround to use reset defaults, see issue #19818 
- adds backward compatibility header files for `ST7735_PARAM_*` symbols
- adds a test board for compilation test of backward compatibility
- updates the corresponding board definitions

The PR should solve the remaining dependency issues in KConfig we had by using `st7735` module for different controller variants. The backward compatibility header files should work for boards that still use `ST7735_PARAM_*` in their board definitions so that the board defintions at user's side use shouldn't be affected.

~To be compilable, the PR includes PR #19824.~

### Testing procedure

- Green CI
- `tests/drivers/disp_dev` and `tests/drivers/st77xx` should still work for all boards using a ST77xx display.
- The PR was already tested for these tests for:
   - [x] `adafruit-pybadge`
   - [x] `esp32s2-lilygo-ttgo-t8`
   - [x] `esp32s3-usb-otg`
   - [x] `sipeed-longan-nano`

### Issues/PRs references

Workaround for issue #19818
Preqruisite for PR #19827 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-06 10:19:01 +00:00
Gunar Schorcht
020861b2ea drivers/lcd.h: fixes and improvements of documentation 2023-09-06 11:52:11 +02:00
Gunar Schorcht
7f28ab8ec1 drivers/lcd.h: move doc to module section 2023-09-06 11:52:11 +02:00
Gunar Schorcht
1c2cce7c66 drivers/st77xx: add st7735 compatibility headers
If a board definition already used the ST7735 driver, `st7735*.h` header files and `ST7735_*` macros were used in the board definitions to define the default configuration parameter set. For backward compatibility these header files are kept and the `ST7735_*` macros are mapped to the `ST77XX_*` macros if they are defined.
2023-09-06 11:52:10 +02:00
Gunar Schorcht
b5a7101f5e drivers: rename st7735 driver to more generic st77xx 2023-09-06 11:52:10 +02:00
Gunar Schorcht
ef7234b455 drivers/lcd: support of controller variant parameter
If the controller-specific driver supports multiple controller variants, the variant has to be specified in the configuration parameter set.
2023-09-06 11:52:10 +02:00
bors[bot]
da7deb518b
Merge #19794 #19912
19794: drivers/periph: Add documentation on thread safety and initialization r=aabadie a=maribu



19912: drivers/at86rf215: switch example config to use EXT3 on same54-xpro  r=aabadie a=benpicco



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-09-05 12:03:37 +00:00
Marian Buschsieweke
6bf23bd683
drivers/periph: Add documentation on thread safety and initialization 2023-09-05 09:40:12 +02:00
Benjamin Valentin
05bf94492f drivers/at86rf215: switch example config to use EXT3 on same54-xpro
This avoids the conflict of using the same IRQ line (EXTI07) as the PHY
2023-09-04 16:03:40 +02:00
bors[bot]
51a39d0127
Merge #19355 #19883
19355: boards/adafruit-itsybitsy-m4: configure littleFS on external flash r=aabadie a=benpicco



19883: drivers/stmpe811: introduce conversion for X and Y coordinates r=aabadie a=gschorcht

### Contribution description

To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates by swapping and mirroring. Instead of hard coding this conversion, it is now controlled by an additional conversion parameter. For the sake of simplicity, possible rotations are predefined.

The PR fixes `tests/pkg/lgvl_touch` for the `stm32f429i-disc1`  board where the coordinates from the touch panel seem to be mirrored in relation to the screen coordinates at the vertical axis.

### Testing procedure

Flash `tests/pkg/lvgl_touch`. Without this PR the coordinates of the button don't correspond to the touch panel coordinates once the button has been pressed. Instead they seem to be mirrored at the vertical axis. With this PR, the coordinates should be correct.

### Issues/PRs references


Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-02 17:47:18 +00:00
Gunar Schorcht
ebe51e7f51 drivers/stmpe811: introduce coordinate conversion
To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates from the touch display by swapping and mirroring. For the sake of simplicity, possible rotations are additionally defined.
2023-09-02 17:01:46 +02:00
bors[bot]
99f020402b
Merge #19908
19908: drivers/mtd_spi_nor: fix init when only ztimer_msec is used r=aabadie a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-09-02 13:44:41 +00:00
bors[bot]
930811dc45
Merge #19884
19884: drivers/touch_dev_gestures: add gesture recognition for touch devices r=aabadie a=gschorcht

### Contribution description

This PR adds simple gesture recognition for touch devices accessed via the generic Touch Device API. It can be used in conjunction with device drivers that use either interrupts or polling mode. It supports up to two touches and the following gestures:
- Single and double tap at given position
- Long press and release given position
- Moving while pressed with current position
- Swipe left, right, up and down
- Zoom in (spread) and out (pinch)

Gesture recognition has been tested with:
- [x] `stm32f746g-disco` (works out of the box)
- [x] `stm32f723e-disco` (works out of the box)
- [x] `stm32f429i-disc1` (works on top of PR #19885)
- [x] `stm32l496g-disco` (works with my local LCD display changes waiting for PR #19825, not yet provided)
- [x] `esp32s3-wt32-sc01-plus` (new board, not yet provided)

### Testing procedure

Flash `tests/drivers/touch_dev_gestures` to a board with touch pane, for example:
```
BOARD=stm32f746g-disco make -j8 -C tests/drivers/touch_dev_gestures/ flash
```
PR #19885 is required for the `stm32f429i-disc1` board.

The output should look like this:
```
main(): This is RIOT! (Version: 2023.10-devel-121-g81c5c-drivers/touch_dev_gestures)
Single Tap X: 255, Y:154
Single Tap X: 253, Y:153
Double Tap X: 253, Y:149
Swipe right
Swipe down
Swipe left
Swipe up
Pressed    X: 257, Y:155
Moving     X: 257, Y:155
Moving     X: 257, Y:155
Moving     X: 259, Y:156
Moving     X: 262, Y:157
Moving     X: 266, Y:158
Moving     X: 269, Y:160
Moving     X: 273, Y:162
Moving     X: 276, Y:165
Moving     X: 278, Y:167
Moving     X: 278, Y:169
Moving     X: 278, Y:169
Released   X: 279, Y:172
```

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-01 12:57:14 +00:00
Gunar Schorcht
54ec84df88 drivers: add gesture recognition for touch devices 2023-08-31 20:12:33 +02:00
Benjamin Valentin
4f2f412c39 drivers/mtd_spi_nor: improve fallback when no timer is used 2023-08-31 15:22:33 +02:00
Benjamin Valentin
6e290fbace drivers/mtd_spi_nor: fix init when only ztimer_msec is used 2023-08-31 14:37:55 +02:00
bors[bot]
8017249bab
Merge #19885
19885: drivers/stmpe811: changes for interrupt-driven touch handling and gesture recognition r=aabadie a=gschorcht

### Contribution description

This PR contains changes needed for the purely interrupt-driven handling of the touch position as `touch_dev` device, which is a prerequisite for the realization of gesture recognition. (PR #19884).

The interrupt-driven approach of `touch_dev` devices (PR #19882) and the gesture recognition (PR #19884) need continuous reporting of the touch position as long as there is at least one touch. Since the driver so far only uses the _Touch Detect_ interrupt, only the position at the beginning of a touch is available. All further positions must be polled.

Therefore, the changes in this PR additionally enable the _FIFO Threshold_ interrupt when the `touch_dev` module is enabled. However, since the _Touch Detect_ interrupt does not work reliably when the _FIFO Threshold_ interrupt is enabled and the FIFO Threshold is 1, the FIFO Threshold is set to 2 by default when the `touch_dev` module is enabled.

Furthermore, the FIFO queue has to be reset after reading one touch position. Otherwise new touch positions are processed with a delay if the rate of calling the function to read the FIFO is slower than the rate at which the FIFO is filled. The reason for this is that with each call of this function only the oldest touch position is read value by value from the FIFO. Gestures can't be implemented with such a behavior.

### Testing procedure

1. `tests/drivers/stmpe811` should work as before (only a single position is shown):
   ```
   BOARD=stm32f429i-disco make -j8 -C tests/drivers/stmpe811 flash
   ```
   ```
   main(): This is RIOT! (Version: 2023.10-devel-120-g848d1- 
   drivers/stmpe811_touch_dev_gestures)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Pressed!
   X: 135, Y:131
   Released!
   ```
2. `tests/drivers/stmpe811` should work on top of PR #19882 with continuous outputs of touch positions:
   ```
   BOARD=stm32f429i-disco make -j8 -C tests/drivers/touch_dev flash
   ```
   ```
   main(): This is RIOT! (Version: 2023.10-devel-121-g38d3db-drivers/stmpe811_touch_dev_gestures)
   Event: pressed!
   X: 131, Y:145
   X: 133, Y:141
   X: 135, Y:138
   X: 138, Y:133
   X: 141, Y:128
   X: 146, Y:122
   X: 151, Y:117
   Event: released!
   ```
3. `tests/driver/touch_dev_gestures` of PR #19884 should work on top of this PR:
   ```
   BOARD=stm32f429i-disco make -j8 -C tests/drivers/touch_dev_gestures flash
   ```
   ```
   main(): This is RIOT! (Version: 2023.10-devel-128-g05f690-drivers/touch_dev_gestures_work)
   Swipe right
   Swipe left
   Swipe down
   Swipe up
   Single Tap X: 246, Y:148
   Single Tap X: 256, Y:139
   Double Tap X: 247, Y:136
   Pressed    X: 246, Y:131
   Moving     X: 248, Y:132
   Moving     X: 250, Y:133
   Moving     X: 258, Y:135
   Moving     X: 270, Y:136
   Moving     X: 285, Y:132
   Moving     X: 300, Y:126
   Moving     X: 309, Y:122
   Moving     X: 310, Y:119
   Released   X: 310, Y:119
   ```

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-08-31 06:21:40 +00:00
Gunar Schorcht
0382e10e6f drivers/stmpe811: use FIFO thresh interrupt for touch_dev by default 2023-08-30 16:52:25 +02:00
Gunar Schorcht
9aecdaf2f6 drivers/stmpe811: enable FIFO threshold interrupt
For continuous reporting of the touch position the FIFO threshold interrupt is used. This is necessary for example to implement gestures in interrupt mode. To activate the FIFO threshold interrupt and thus continuous reporting, the macro 'STMPE811_FIFO_THRESHOLD_ENABLED' must be set to 1. However, the driver only works reliably with FIFO threshold interrupts if the FIFO threshold value is at least 2. Otherwise the Touch Detect interrupt will not work correctly when a touch is released. Therefore, the FIFO threshold is set to 2 by default when `STMPE811_FIFO_THRESHOLD_ENABLED` is set. This default value can be overwritten by `STMPE811_FIFO_THRESHOLD`.
2023-08-30 16:52:25 +02:00
Gunar Schorcht
3531770689 drivers/stmpe811: reset the FIFO queue after read
The FIFO queue has to be reset after reading one touch position. Otherwise new touch positions are processed with a delay if the rate of calling the function to read the FIFO is slower than the rate at which the FIFO is filled. The reason for this is that with each call of this function always only the oldest touch position is read value by value from the FIFO. Gestures, for example, can't be implemented with such a behavior
2023-08-30 16:52:25 +02:00
Benjamin Valentin
aef1a718c0 drivers/mtd_default: fix for boards that define MTD_NUMOF 2023-08-29 15:45:46 +02:00
bors[bot]
5cf32002f5
Merge #19880
19880: drivers/ft5x06: fix initialization if callback function parameter is NULL r=aabadie a=gschorcht

### Contribution description

This PR fixes the `ft5x06` driver initialization if the callback function parameter `cb` is `NULL. This might be the case for example if the application uses the touch device in polling mode.

If the interrupt pin is initialized if the callback function parameter `cb` is `NULL`, the driver crashes the first time an interrupt is triggered. Therefore, the INT pin must be initialized only if also the callback function parameter `cb` is not `NULL`.

To be able to test the polling mode, this PR also includes a change of the `tests/drivers/ft5x06` application which introduces the environment variables `FT5X06_POLLING_MODE` `FT5X06_POLLING_PERIOD` and in the makefile.

### Testing procedure

1. Use any board with a FTXXXX touch device and test it in polling mode, for example:
   ```
   FT5X06_POLLING_MODE=1 BOARD=stm32f746g-disco make -C tests/drivers/ft5x06 flash term
   ```
   It should work as expected.
   ```
   main(): This is RIOT! (Version: 2023.10-devel-119-g92a44a-drivers/ft5x06_fix_cb_null)
   FT5x06 test application
   +------------Initializing------------+
   Initialization successful
   1 touch detected
   Touch 1 - X: 236, Y:111
   Touch 1 - X: 236, Y:111
   ...
   Touch 1 - X: 236, Y:111
   Released!
   ```

2. Checkout master branch and cerry-pick commit 691a5e6308426ddc685e5a2c297238529211c258. The test application `tests/drivers/ft5x06` will crash once a touch event occur:
   ```
   +------------Initializing------------+
   Initialization successful
   1 touch detected
   Context before hardfault:
   ```

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-08-29 08:19:52 +00:00
Gunar Schorcht
bf720c0b41 drivers/ft5x06: configure interrupt mode in any case
The interrupt mode has to be configured independent on whether the INT pin is initialized already by the `ft5x06_init` function if parameter `cb` is defined or later, for example by the `touch_dev` implementation.
2023-08-28 18:50:04 +02:00
bors[bot]
da88c4169f
Merge #19906
19906: netdev/ieee802154_submac: support setting promiscuous mode option r=aabadie a=geonnave



### Contribution description

Found this was missing when trying to use `examples/sniffer` with the `nrf52840dk`. The solution was actually provided by `@benpicco` on the matrix channel.


### Testing procedure

Use the `examples/sniffer` following its README.


### Issues/PRs references

N/A.

Co-authored-by: Geovane Fedrecheski <geonnave@gmail.com>
2023-08-28 07:24:49 +00:00
Gunar Schorcht
ca6760047c drivers/ft5x06: introduce coordinate conversions
To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates from the touch display by swapping and mirroring. For the sake of simplicity, possible rotations are additionally defined.
2023-08-26 17:49:29 +02:00
Gunar Schorcht
7ac2865f7e drivers/ft5x06: init INT pin only if callback is defined
If the INT pin is initialized if the callback function parameter `cb` is `NULL`, the driver crashes the first time an interrupt is triggered. Therefore, the INT pin must be initialized only if also the callback function parameter `cb` is not `NULL`.
2023-08-25 17:35:23 +02:00
Geovane Fedrecheski
7c0accb4f1 netdev/ieee802154_submac: support setting promiscuous mode option 2023-08-25 16:20:27 +02:00
bors[bot]
ce0ae8fc73
Merge #19866
19866: drivers/ft5x06: use a pointer to config parameters instead of copying them r=benpicco a=gschorcht

### Contribution description

There is no need to copy the configuration parameter set to the device descriptor. A const pointer to the configuration parameter set in ROM is sufficient. It saves 16 byte of RAM.

Includes PR #19860 for the moment to be compilable.

### Testing procedure

Use 
```
CFLAGS='-DNDEBUG' BOARD=stm32f723e-disco make -j8 -C tests/drivers/touch_dev/
```
with and w/o this PR and compare the sizes.

Without the PR the sizes are:
```
  text	   data	    bss	    dec
  14652	    136	   2704	  17492
```
With the PR the sizes are:
```
  text	   data	    bss	    dec
  14676	    136	   2688	  17500
```

### Issues/PRs references

~Depends on PR #19860~


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-08-24 10:21:07 +00:00
bors[bot]
d1edbd94d6
Merge #19881 #19892
19881: drivers/stmpe811: fix initialization if callback function parameter is NULL r=benpicco a=gschorcht

### Contribution description

This PR fixes the `stmpe811` driver initialization if the callback function parameter `cb` is `NULL. This might be the case for example if the application uses the touch device in polling mode.

If the interrupt pin is initialized if the callback function parameter `cb` is `NULL`, the driver crashes the first time an interrupt is triggered. Therefore, the INT pin must be initialized only if also the callback function parameter `cb` is not `NULL`.

To be able to test the polling mode, this PR also includes a change of the `tests/drivers/stmpe811` application which introduces the environment variables `STMPE811_POLLING_MODE` `STMPE811_POLLING_PERIOD` and in the makefile.

### Testing procedure

1. Use a `stm32f429i-disc1` board and test it in polling mode:
   ```
   STMPE811_POLLING_MODE=1 BOARD=stm32f429i-disc1 make -C tests/drivers/stmpe811 flash term
   ```
   It should work as expected.
   ```
   main(): This is RIOT! (Version: 2023.10-devel-119-g26e7a-drivers/stmpe811_fix_cb_null)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Pressed!
   X: 113, Y:135
   X: 113, Y:135
   X: 113, Y:136
   Released!
   ```

2. Checkout master branch and cerry-pick commit 691a5e6308426ddc685e5a2c297238529211c258. The test application `tests/drivers/stmpe811` will crash once a touch event occur:
   ```
   main(): This is RIOT! (Version: 2023.10-devel-117-g91441)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Stack pointer corrupted, reset to top of stack
   FSR/FAR:
    CFSR: 0x00020000
    HFSR: 0x40000000
    DFSR: 0x00000008
    AFSR: 0x00000000
   Misc
   EXC_RET: 0xfffffff1
   *** RIOT kernel panic:
   HARD FAULT HANDLER
   ```

### Issues/PRs references

19892: pkg/tinydtls: allow to set buffer size from application again r=benpicco a=leandrolanzieri

### Contribution description

Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before.

### Testing procedure

Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors.


### Issues/PRs references
Reported in #19838


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2023-08-23 22:43:56 +00:00
Gunar Schorcht
d88e46b3d5 drivers/ft5x06: use a const pointer to params instead of a copy
There is no need to copy the configuration parameter set to the device descriptor. A const pointer to the configuration parameter set in ROM is sufficient. It saves some 16 byte of RAM.
2023-08-23 23:36:39 +02:00
bors[bot]
2a4496b32a
Merge #19539 #19815 #19860 #19886
19539: drivers/periph_sdmmc: define a High-level SDIO/SD/MMC API and low-level SDMMC periperal driver interface r=benpicco a=gschorcht

### Contribution description

This PR provides a SDIO/SD/MMC Device API (SDMMC). It implements a SD host controller driver that provides a high-level functions using a low-level SDIO/SD/MMC peripheral driver for accessing

- MultiMediaCards (MMC) and Embedded MultiMediaCards (eMMC)
- SD Memory Cards (SD Cards) with Standard Capacity (SDSC), High Capacity (SDHC) or Extended Capacity (SDXC).

It supports:

- 1-bit, 4-bit and 8-bit data bus width
- Default Speed and High Speed
- Auto-CLK

The SDIO/SD/MMC device API (SDMMC) is divided into two parts:

1. The high-level API that implements the SD Host Controller driver and allows
   - to inititialize and identify different types of cards,
   - to access them either blockwise or bytewise,
   - to get information about the used card, and
   - to send single commands or application specific commands to the card.

2. The low-level SDIO/SD/MMC peripheral driver implements the low-level functions required by the high-level device API. It has to be implemented for each MCU.

### Limitations:

- Only one card per SDIO/SD/MMC device is supported.
- eMMCs specific features are not supported.
- UHS-I, UHS-II and UHS-III are not supported.

### Testing procedure

PR #19540, PR #19760 or PR #19786 is needed to test this PR.

### Issues/PRs references

Prerequisite for PR #19540
Prerequisite for PR #19760
Prerequisite for PR #19786

19815: cpu/sam0_common/periph/sdhc: busy waiting and clock fixes r=benpicco a=benpicco



19860: drivers/ft5x06: fix vendor ID for FT6xx6 and FTxxxx register addresses r=benpicco a=gschorcht

### Contribution description

This PR provides a fix of the vendor ID for FT6xx6 touch panel driver ICs and a fix of register addresses for FTxxxx.

According to the [Application Note for FT6x06 CTPM](https://cdn-shop.adafruit.com/datasheets/FT6x06_AN_public_ver0.1.3.pdf), the vendor ID of FT6x06 touch panel driver ICs is `0x11` instead of `0xcd`. Although there are no information found in the Web about the FT6x36, the FT6336U touch panel of a ESP32-S3 WT32 SC01 Plus is also working with `0x11` as vendor ID so that it seems that FT6x36 is also using `0x11` as vendor ID.

Figured out with a `stm32f723e-disco` board (revision D03). Without this PR, `tests/drivers/ft5x06` gives:
```
+------------Initializing------------+
[ft5x06] init: invalid vendor ID: '0x11' (expected: 0xcd)
[Error] Initialization failed
```
With this PR it works as expected.
```
+------------Initializing------------+
Initialization successful
main(): This is RIOT! (Version: 2023.10-devel-96-gbb9011-drivers/ft5x06_fix_vendor_id)
FT5x06 test application

+------------Initializing------------+
[ft5x06] init: configuring touchscreen interrupt
Initialization successful
1 touch detected
[ft5x06] read gesture_id '0x00'
Touch 1 - X: 151, Y:138
[ft5x06] read gesture_id '0x00'
```

Some background information found in the Web:

- According to the [STM32CubeF7](c20e6dd15b/Drivers/BSP/STM32F723E-Discovery/stm32f723e_discovery_ts.c (L24-L27)) the FRIDA LCD panel mounted on the `stm32f723e-disco` board either uses FT6x36 (prior revision D) or FT3x67 (revision D). However, the FT5x06 driver type for the card is defined as FT6x06, which does not seem correct: bb9011c3fb/boards/stm32f723e-disco/include/board.h (L59)
- According to the [STM32CubeF7](c20e6dd15b/Drivers/BSP/Components/ft6x06/ft6x06.h (L269-L270)), the vendor ID for FT6x36 should be `0xcd`. However, the FT6336U on ESP32-S3 WT32 SC01 Plus works with vendor ID `0x11`.
- The [Adafruit FT6206 library](95118cd983/Adafruit_FT6206.h (L28)) uses `0x11` as vendor id.
- The `stm32l496g-disco` board uses a FT6236 which has vendor ID `0xcd`.

So the information available on the web is confusing. Maybe, a better solution would be to accept `0x11` as well as `0xcd` as vendor ID for FT6xxx touch panels. Unfortunately, there are no documents available on the registers directly from FocalTech 😟 so it seems to be more speculation than knowledge.

### Testing procedure


### Issues/PRs references



19886: cpu/efm32: fix DAC configuration r=benpicco a=gschorcht

### Contribution description

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.

At the moment we have only defined one board (`stwstk6220a`) that uses the DAC, so changing the configuration interface shouldn't be critical.

### Testing procedure

`tests/periph/dac` should still work for the `stwstk6220a`
```
BOARD=slwstk6220a make -j8 -C tests/periph/dac flash
```
I don't have a `stwstk6220a` board (EFM32 Series 0) so that I can't test it. I could only test it for the `sltb009a` board (EFM32 Series 1) with the change for VDAC in PR #19887.

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-08-23 16:55:09 +00:00
bors[bot]
e56353cf24
Merge #19387 #19874 #19875
19387: drivers/atwinc15x0: support dynamic scanning and connection to AP r=benpicco a=fabian18



19874: coap: add missing option numbers r=benpicco a=JKRhb



19875: coap: add missing Content-Format definitions r=benpicco a=JKRhb



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.loc@MLPA-NB119.(none)>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Jan Romann <jan.romann@hs-emden-leer.de>
2023-08-21 13:49:27 +00:00
Fabian Hüßler
8e122e9354 drivers/atwinc15x0: handle M2M errors of m2m_wifi_enable_mac_mcast 2023-08-19 23:23:10 +02:00
Fabian Hüßler
814d718d7b drivers/atwinc15x0: support network scanning and dynamic connection
There are new pseudomodules for this driver:

- atwinc15x0_static_connect: Should behave as before, by trying to connect to an AP
by specified WIFI_SSIS and WIFI_PASS

- atwinc15x0_dynamic_connect: takes connection request via NETOPT_CONNECT
and provides the connection result via callback

- atwinc15x0_dynamic_scan: takes network scan requests via NETOPT_SCAN
and provides the scan result as a sorted list via callback
2023-08-19 23:23:10 +02:00
Fabian Hüßler
7f2b214e47 drivers/net/netdev: extend netopt request/result for Wi-Fi 2023-08-19 23:23:10 +02:00
Gunar Schorcht
a9f3ce121a drivers/ft5x06: fix register addresses 2023-08-15 00:06:14 +02:00
Gunar Schorcht
a5a08f0d63 drivers/touch_dev: add a function to get the maximum number of touches 2023-08-14 18:26:08 +02:00
Gunar Schorcht
09f07262f4 drivers/touch_dev: define invalid touch position 2023-08-14 18:26:08 +02:00
Gunar Schorcht
b921bf460b drivers/stmpe811: init INT pin only if callback is defined
If the INT pin is initialized if the callback function parameter `cb` is `NULL`, the driver crashes the first time an interrupt is triggered. Therefore, the INT pin must be initialized only if also the callback function parameter `cb` is not `NULL`.

Even if the interrupt pin is not initialized here because the callback function parameter `cb` is NULL, the device interrupts are configured here so that they will work when the interrupt pin is initialized later, as is the case when the Touch Device API is used, for example. Since the interrupt state is cleared on each read, this is not a problem even if the interrupt pin is not used at all.
2023-08-13 17:11:54 +02:00
Gunar Schorcht
00275326a8 drivers/mtd: add SDMMC support 2023-08-08 09:09:12 +02:00
Gunar Schorcht
556ef5235c drivers: add periph_sdmmc support 2023-08-08 09:09:12 +02:00
Gunar Schorcht
12f441ff74 drivers/st7735: remove buggy initialization, use reset defaults
Instead of using a wrong intialization command sequence for power and frame control, default values after reset are used.
2023-08-08 06:44:59 +02:00
Gunar Schorcht
d5a8ec9ae0 drivers/lcd: fix command index 2023-08-08 06:44:59 +02:00
Gunar Schorcht
0df9480126 drivers/fx5x06: fix vendor ID for FT6xx6
The vendor ID of FT6xx6 touch panel driver ICs is `0x11` instead of `0xcd`.
2023-08-06 16:09:40 +02:00
Gunar Schorcht
37472d54c3 cpu/stm32/periph: add FMC support 2023-07-26 09:02:10 +02:00
LP-HAW
61857d11ca drivers/enc28j60: disable flow control 2023-07-22 21:44:02 +02:00
Marian Buschsieweke
0337d08bcc
drivers/vl6180x: fix compilation with clang
Some of the `static inline` functions are only used in some
configurations, depending on the preprocessor. Explicitly disable the
warning to allow compilation with clang.
2023-07-18 12:24:08 +02:00
Marian Buschsieweke
510c6fd84e
drivers/dht: fix compilation with LLVM 2023-07-18 12:24:08 +02:00
bors[bot]
ae2118cbf6
Merge #19816
19816: drivers/lcd: code deduplication for st7735 and ili9341 r=aabadie a=gschorcht

### Contribution description

In preparation for the parallel interface support the following changes were made:

1. The code for basic communication (acquire/release SPI device, SPI transfers), which were always duplicated by copy & paste in each display driver again and again, has been moved to the LCD driver as low-level functions that are now used by the display drivers. These low level function allow 
- code deduplication and
- to define a more abstract communication interface that can then be extended later by parallel communication interface
2. Identical GPIO initializations has also been moved from display drivers to the LCD driver.
3. Using a default implementation of `lcd_set_area` function allows further code deduplication.

Finally, the `ili9341` and `st7735` drivers only implement the inialization sequence for the LCD driver IC.

### Testing procedure

`tests/drivers/ili9341` should still work for a board with an ILI9341. Tested with `esp32-wrover-kit`.
`tests/drivers/st7735` should still work for a board with a ST77xx. Tested with `esp32s3-usb-otg`.

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-12 14:08:56 +00:00
Gunar Schorcht
5cb51b17a3 driver/lcd: use a default implementation of lcd_set_area used
Using a default implementation of `lcd_set_area` function allows further code deduplication.
2023-07-12 15:31:29 +02:00
Gunar Schorcht
878af4f9a1 drivers/st7735: move basic communication functions to drivers/lcd 2023-07-12 15:31:29 +02:00
Gunar Schorcht
c51496fe2e drivers/ili9341: move basic communication functions to drivers/lcd 2023-07-12 15:31:29 +02:00
Gunar Schorcht
3f8ba798cb drivers/lcd: move basic communication functions to drivers/lcd
In preparation for the parallel interface support the following changes were made:

1. The code for basic communication (acquire/release SPI device, SPI transfers), which were always implemented identically in the individual display drivers again and again, have been moved to the LCD driver as low-level functions and are now used by the display drivers. These low level function allow 
- code deduplication on one hand and 
- to define a more abstract communication interface on the other hand that can then be extended by parallel communication
2. Identical GPIO initialization has  also been moved from display drivers to the LCD driver.
2023-07-12 15:31:29 +02:00
Gunar Schorcht
b30401a1c2 drivers/st7735: fix Kconfig logic for ST7789
MODULE_ST7789 is enabled if MODULE_ST7735 is enabled and the board has selected HAVE_ST7789.
2023-07-12 15:31:29 +02:00
bors[bot]
1b8ad7cffc
Merge #19777
19777: cpu/avr8_common: Prepare for rework ISR r=benpicco a=nandojve

### Contribution description

This prepares for rework how ISR is handled for AVR-8 platform. It is not expected changes on the behavior but tests on other boards were welcome to avoid regressions.

#### Improvements
 * Split UART state from ISR states. Now it is necessary two variables and GPIORx registers are automatically selected when available.
 * UART states now supports up to 8 UARTs.
 * Added AVR8_ISR macro do clean-up and hide internals related to ISR processing. This allows changes on ISR without any other changes on drivers.

### Testing procedure

Tests were conducted using atmega328p-xplained-mini and atxmega-a1u-xpro and the zigduino board was only built. The example thread_duel was used to test regressions.

Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-07-11 10:39:11 +00:00
bors[bot]
37c6233bcb
Merge #19764 #19781
19764: drivers/shield_w5100: add module for the W5100 Ethernet Shield r=benpicco a=maribu

### Contribution description

This module provides no more than the correct configuration parameters for the `w5100` driver using the Arduino I/O mapping features. But by doing so, it will work out of the box with every mechanically and electrically compatible board for which the Arduino I/O mapping features are implemented.


19781: cpu/nrf{53,9160}: add pwm support r=benpicco a=dylad

### Contribution description

This PR moves the nRF52 PWM driver to `cpu/nrf5x_common` to allow nRF9160 and nRF53 to use this driver.
IP is identical on these families.

I didn't test on nRF9160DK and I didn't test if there is any regression on nRF52-based board as I don't have any so tests are welcome !
However it works fine on nRF53-based board.


### Testing procedure

Flash the `tests/periph/pwm` test application on `nrf5340dk` or `nrf9160dk`.
You can then use the `osci` command to make the onboard LEDs "breath".
You can also attach an oscilloscope and/or logic analyzer to watch the signal.


### Issues/PRs references
~~Based on #19769~~

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: dylad <dylan.laduranty@mesotic.com>
2023-07-10 10:51:20 +00:00
Marian Buschsieweke
ca07f77f48
drivers/st7735: fix inconsistency in dependency modeling
In KConfig `MODULE_ST7789` now is hidden module that automatically
gets selected when `HAVE_ST7789` is selected in `MODULE_ST7735` is used.

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-09 14:15:25 +02:00
dylad
ef9dca0108 drivers/servo: update build dependencies for Nordic families
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2023-07-08 17:19:57 +02:00
Marian Buschsieweke
f1ab3b1ea6
drivers/shield_w5100: add module for the W5100 Ethernet Shield
This module provides no more than the correct configuration parameters
for the `w5100` driver using the Arduino I/O mapping features. But
by doing so, it will work out of the box with every mechanically and
electrically compatible board for which the Arduino I/O mapping
features are implemented.
2023-07-08 08:36:41 +02:00
Gunar Schorcht
f57b6b70b8 drivers/st7735: support for ST7789
ST7735 driver can also be used for ST7789. st7789 is simply defined as pseudomodule that pulls in automatically module st7735.
2023-07-07 08:17:12 +02:00
Gerson Fernando Budke
1e237305ea drivers: at86rf2xx: at86rf2xx_netdev: Fix vera warnings
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-07-05 20:00:19 +02:00
Gerson Fernando Budke
783afbc666 cpu/avr8_common: Add AVR8_ISR macro
The current ISR implementation for AVR8 requires use of
avr8_[enter/exit]_isr pair which add some boilerplate on code.
This add AVR8_ISR which clean-up the code and make it simpler
and hides any schedule detail from the user perspective.

This is a preparation for future scheduling and irq optimizations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-07-05 20:00:19 +02:00
Gunar Schorcht
34ba3a22c8 drivers/usbdev_synopsys_dwc2: set V_DDUSB for U5 2023-07-05 09:39:13 +02:00
Gunar Schorcht
b69165cde8 drivers/usbdev_synopsys_dwc2: fix disabling of V_BUS sensing 2023-07-05 09:33:53 +02:00
Gunar Schorcht
db52e5fa62 drivers/usbdev_synopsys_dwc2: comments improved 2023-07-05 09:29:48 +02:00
Marian Buschsieweke
043e8cc88e
boards,sys/arduino: major clean up
- Rename all `arduino_pinmap.h` to `arduino_iomap.h`
    - An empty `arduino_pinmap.h` that just includes `arduino_iomap.h`
      is provided for backward compatibility
    - Move all info from `arduino_board.h` into the new file as trivial
      macros, so that they can also be used outside of sketches
    - The new name reflects the fact not just pin mappings, but also
      other I/O features such as PWMs are mapped
- Drop all `arduino_board.h`
    - `arduino_board.h` and `arduino_iomap.h` now provide the exact
      same information, just in a different format
    - a generic `arduino_board.h` is provided instead that just
      uses the info in `arduinio_iomap.h` and provides them in the
      format the code in `sys/arduino` expects it
- Add fine grained features to indicate for mappings
    - availability of mappings for analog pins, DAC pins, PWM pins,
      UART devices, SPI/I2C buses to the corresponding RIOT
      identification can now be expressed:
        - `arduino_pins`: `ARDUINO_PIN_0` etc. are available
        - `arduino_analog`: `ARDUINO_A0` etc. are available
        - `arduino_pwm`: `ARDUINO_PIN_13_PWM_DEV` etc. are available
        - `arduino_dac`: `ARDUINO_DAC0` etc. are available
        - `arduino_uart`: `ARDUINO_UART_D0D1` or similar are available
        - `arduino_spi`: `ARDUINO_SPI_ISP` or similar are available
        - `arduino_i2c`: `ARDUINO_I2C_UNO` or similar are available
    - mechanical/electrical compatibility with specific form factors
      can now be expressed as features:
        - `aruino_shield_nano`: Arduino NANO compatible headers
        - `aruino_shield_uno`: Arduino UNO compatible headers
        - `aruino_shield_mega`: Arduino MEGA compatible headers
        - `aruino_shield_isp`: ISP header is available

This provides the groundwork to implement shield support as modules
that can rely on the I/O mappings, rather than having to provide a
configuration per board.
2023-06-26 17:24:07 +02:00
bors[bot]
561e19303d
Merge #19718 #19737 #19746
19718: drivers/dht: busy wait reimplementation r=benpicco a=hugueslarrive

### Contribution description

In PR #19674, I also provided quick and dirty fixes to restore functionality on esp8266 and enable operation on AVR. While reviewing PR #18591, it became apparent to me that this driver needed a refresh, particularly its migration to ztimer.

The cause of the malfunction on esp8266 was that since the default switch to ztimer as the backend for xtimer, XTIMER_BACKOFF was no longer taken into account. Therefore, the correction I provided in PR #19674 simply made explicit what was previously done implicitly with xtimer and now needs to be done explicitly with ztimer (spinning instead of sleeping).

Moreover, it was unnecessarily complex to measure the pulse duration in a busy-wait implementation, which required 2 calls to ztimer_now() and  32-bit operations expensive on 8-bit architecture. Instead, it is sufficient to read the state of the bus at the threshold moment.

Finally, in practice, it is possible to reduce the read interval (down to less than 0.5s for DHT22) by "harassing" the DHT with start signals until it responds.

This re-implementation brings the following improvements:
- Many backports from `@maribu's` IRQ based implementation (#18591):
  - Use of ztimer
  - Use of errno.h
  - Use of a dht_data structure to pass arguments, to facilitate integration
  - Adaptation of the bit parsing technique to parse bits into the data array
- Reintroduction of DHT11/DHT22 differentiation.
- Separation of `dht_read()` steps into functions for better readability and the ability to share certain functions among different implementations
- Sensor presence check in `dht_init()`
- ~~Automatic adjustment to a minimum data hold time~~
- Default input mode changed to open drain (a pull-up resistor should be placed close to the output if necessary but not close to the input)
- AVR support without platform-specific handling by avoiding  ztimer_spin() and using the overflow of an 8-bit variable as a pre-timeout to minimize time-consuming ztimer_now() calls

Regarding the changes in the start signal sequence and the removal of the `_reset()` function:
![nano_dht_read_2](https://github.com/RIOT-OS/RIOT/assets/67432403/95966813-2b5f-4a0f-a388-8ac630526ab2)

~~In the previous implementation, there was an unnecessary spike at the beginning of the signal sequence, corresponding to START_HIGH_TIME. This spike has been removed in the re-implementation, as it is unnecessary. Instead, the MCU now simply pulls the signal low for START_LOW_TIME and then releases the bus, which is sufficient for initiating communication with the DHT sensor.~~ Actually, it is necessary to raise the bus level; otherwise, the _wait_for_level() called immediately after to check the response of the DHT may read the port before the signal level is raised, resulting in a false positive.

Additionally, the previous implementation had an issue where the MCU switched back to output mode and went high immediately after reading the 40 bits of data. However, the DHT sensor was still transmitting 2 or 3 additional bytes of '0' at that point, causing a conflict. This issue has been resolved in the re-implementation:
![nano_dht_read_optimized](https://github.com/RIOT-OS/RIOT/assets/67432403/ff124839-5ec5-4df3-bab7-5348d8160a25)

~~Regarding the optimization for AVR, I have performed measurements of `_wait_for_level()` until timeout (85 loops):~~
~~- on esp8266-esp-12x: 264 µs, which is 3.11 µs per loop~~
~~- on nucleo-f303k8: 319 µs, which is 3.75 µs per loop~~
~~- on arduino-nano: 3608 µs, which is 42.45 µs per loop~~
~~Duration measurements on the Arduino Nano:~~


19737: dist/tools/openocd: start debug-server in background and wait r=benpicco a=fabian18



19746: buildsystem: Always expose CPU_RAM_BASE & SIZE flags r=benpicco a=Teufelchen1

### Contribution description

Hello 🐧 

This moves the definition of `CPU_RAM_BASE/SIZE` from being only available in certain situation to be always available.
Reason for change is to simplify common code in the cpu folder.

In cooperation with `@benpicco` 

### Testing procedure

Passing CI


### Issues/PRs references

First usage will be in the PMP driver. Although there is more code in RIOT that could be refactored to use these defines instead of hacks / hardcoded values.

Co-authored-by: Hugues Larrive <hlarrive@pm.me>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Teufelchen1 <bennet.blischke@outlook.com>
2023-06-20 10:40:01 +00:00
Hugues Larrive
a582da1f31 drivers/dht: busy wait reimplementation
- many backports from @maribu's IRQ based implementation (#18591)
- use of ztimer and errno.h
- separation of dht_read() steps into functions for better readability
- reintroduction of DHT11/DHT22 differentiation
- sensor presence checking in dht_init()
- default input mode changed to open drain
- AVR support without platform-specific handling by avoiding
  ztimer_spin() and using the overflow of an 8-bit variable as a
  pre-timeout to minimize time-consuming ztimer_now() calls
- add a new DHT11_2022 type for 0.01 °C resolution devices
- data caching removed
2023-06-20 12:07:48 +02:00
bors[bot]
829af7c105
Merge #19703 #19724 #19735
19703: cpu/sam0_eth: interrupt based link detection/auto-negotiation r=benpicco a=benpicco



19724: dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable r=benpicco a=fabian18



19735: nrf5x_common: Clear I2C periph shorts r=benpicco a=bergzand

### Contribution description

The I2C peripheral's shortcuts are used with the read and write register to automatically stop the I2C transaction or to continue with the next stage.

With simple I2C read and write bytes these shorts are not used, but are also not cleared by the function in all cases, causing it to use the shortcut configuration set by a previous function call. This patch ensures that the shorts are always set by the read and write functions

### Testing procedure

Should be possible to spot with a logic analyzer and the I2C periph test. Maybe the HIL test can also detect it :)

### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-06-14 12:34:33 +00:00
bors[bot]
61d7c4028e
Merge #19734
19734: drivers/pcf857x: allow to define PCF857x_BASE_ADDR at compile time r=maribu a=hugueslarrive



Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-06-14 07:38:17 +00:00
Hugues Larrive
85e41a1f18 drivers/pcf857x: allow to define PCF857x_BASE_ADDR at compile time 2023-06-14 05:38:20 +02:00
Marian Buschsieweke
826095d56e
drivers/sx127x: reduce use of floats 2023-06-12 13:54:06 +02:00
bors[bot]
d7e4f939c2
Merge #19695
19695: drivers/hih6130: avoid using floats r=maribu a=maribu

### Contribution description

- avoid using floating point arithmetic
- use ztimer instead of xtimer
- use fmt to print fixed point numbers in the test app


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-08 13:02:12 +00:00
Marian Buschsieweke
bb366c476a
drivers/hih6130: avoid using floats 2023-06-08 14:33:38 +02:00
Marian Buschsieweke
5dd548860c
drivers/mrf24j40: add note about missing wake pin handling
Fixes https://github.com/RIOT-OS/RIOT/issues/19711
2023-06-07 15:10:33 +02:00
Benjamin Valentin
9627b0d264 drivers/mii: add Interrupt Control/Status register 2023-06-05 12:46:08 +02:00
Benjamin Valentin
e469ecb593 drivers/mii: add missing MII_EXPANSION bit 2023-06-05 11:42:55 +02:00
bors[bot]
d16f8f1032
Merge #19696 #19698
19696: drivers/mq3: avoid use of floats r=maribu a=maribu



19698: tests/pkg/lvgl: avoid using floats r=maribu a=maribu



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-02 05:48:07 +00:00
Marian Buschsieweke
e29499cf3a
drivers/mq3: avoid use of floats 2023-06-01 16:52:26 +02:00
77a11be676
drivers/kw41zrf: boards/openlabs-kw41z-mini: cleanup Kconfig 2023-06-01 12:19:44 +02:00
bors[bot]
e71054def9
Merge #19691 #19694
19691: drivers/bmx055: fix crazy use of FPU r=maribu a=maribu

### Contribution description

As the title says...


19694: tests/drivers/epd_bw_spi_disp_dev: fix accidental use of FPU r=maribu a=maribu



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-01 02:53:25 +00:00
Marian Buschsieweke
6ddf76103a
drivers/bmx055: fix crazy use of FPU 2023-05-31 16:32:14 +02:00
Benjamin Valentin
7457c4545a drivers/shtcx: fix assertion and shtcx_saul_info idx 2023-05-31 14:42:44 +02:00
bors[bot]
00b5bc12a2
Merge #19610 #19670 #19678 #19679 #19680 #19681
19610: drivers/periph/rtc: improve doc on rtc_set_alarm r=maribu a=maribu

### Contribution description

- point out behavior on denormalized time stamps
- use errno codes to indicate errors (and adapt the few instances of actual error handling to use them)


19670: cpu/stm32: stm32f4 BRR from BSRR r=maribu a=kfessel

### Contribution description

sometimes one wants to save one instruction :) 
just write the bits we need to write.

### Testing procedure

tests/periph/gpio_ll tests this 

### Issues/PRs references

`@maribu` might know some reference

maybe #19407

19678: gnrc_sixlowpan_iphc: fix NULL pointer dereference r=maribu a=miri64



19679: gnrc_sixlowpan_frag_sfr: fix ARQ scheduler race-condition r=maribu a=miri64



19680: gnrc_sixlowpan_frag_rb: fix OOB write in _rbuf_add r=maribu a=miri64



19681: sys/xtimer: improve documentation r=maribu a=maribu

### Contribution description

- Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer` is gone


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-05-30 17:11:06 +00:00
Marian Buschsieweke
51127f674a
drivers/periph/rtc: improve doc on rtc_set_alarm
- point out behavior on denormalized time stamps
- use errno codes to indicate errors (and adapt the few instances of
  actual error handling to use them)
2023-05-30 17:41:36 +02:00
bors[bot]
993c10a2a2
Merge #19556 #19662
19556: tools/mspdebug: fix `make debug` and `make debugserver` r=aabadie a=maribu

### Contribution description

The semantics of `make debug` and `make debugserver` have changed in the years since the MSP430 integration. This brings the implementation back into line with the current semantics

- `make debug` now starts both mspdebug and GDB, no need to run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added


19662: driver/lc709203f: remove unnecessary use of float r=aabadie a=kfessel

### Contribution description

removes a unnecessary use of float

### Testing procedure

read and test if you got that hardware (I don't)

### Issues/PRs references

#19614 

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-05-24 15:54:23 +00:00
bors[bot]
7b324d7a4f
Merge #19650 #19660
19650: drivers/nrf24l01p: model in kconfig r=aabadie a=aabadie



19660: cpu/rpx0xx: Fix kconfig model r=aabadie a=MrKevinWeiss



### Contribution description

Broken master due to incorrect model of the periph_pio in kconfig.

### Testing procedure

Green murdock (now that the board is added to the list)

### Issues/PRs references

Look at the master CI...

Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
2023-05-24 13:09:20 +00:00
Karl Fessel
2c3920ab62 driver/lc709203f: remove unnecessary use of float 2023-05-24 14:22:24 +02:00
1dc6e0e32b
drivers/nrf24l01p: model in Kconfig 2023-05-24 10:18:53 +02:00
MrKevinWeiss
adbf951481
cpu/rpx0xx: Fix kconfig model 2023-05-24 09:53:23 +02:00
bors[bot]
40d0f64a04
Merge #19549 #19608 #19657
19549: pkg/littlefs2: bump version to 2.6 r=benpicco a=benpicco




19608: build system: fix `make compile-commands BUILD_IN_DOCKER=1` r=benpicco a=maribu

### Contribution description

Just run `make compile-commands` outside of docker, as the compile commands generated in the docker container won't be helpful for tools outside of the container anyway.


19657: drivers/mpu9x50: clean up code r=benpicco a=maribu

### Contribution description

Avoid using floating point arithmetic and some minor cleanups.


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-23 23:35:57 +00:00
Marian Buschsieweke
533af18119
drivers/mpu9x50: clean up code
Avoid using floating point arithmetic and some minor cleanups.
2023-05-23 21:40:40 +02:00
bors[bot]
f3150120f7
Merge #17425
17425: cpu/rpx0xx: initial PIO support r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
2023-05-23 07:02:45 +00:00
Fabian Hüßler
116c579cb5 cpu/rpx0xx: Add PIO I2C implementation 2023-05-23 08:49:37 +02:00
Fabian Hüßler
18315d3ddc cpu/rpx0xx: Add PIO implementation 2023-05-23 08:49:37 +02:00
bors[bot]
e4490f1793
Merge #19647
19647: drivers/mtd_spi_nor: fix hang and debug msgs r=aabadie a=Enoch247

### Contribution description

This patch adds a missing release of the SPI bus on error

### Testing procedure

This was discovered while attempting to bring up a board where I had the pin definitions wrong for a SPI flash part. Once the driver was fixed I was able to get the debug messages and not hang other drivers using the same bus.

### Issues/PRs references

None known

Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
2023-05-22 20:02:16 +00:00
Joshua DeWeese
ff450cd7f4 drivers/mtd_spi_nor: fix hang
This patch releases the SPI bus when the memory devices is not found.
This frees the bus for other devices to use the bus. It also allows
future attempts to init the device.
2023-05-22 12:22:01 -04:00
Joshua DeWeese
33cb2f489b drivers/mtd_spi_nor: fix debug msg
This patch adds some missing newline chars to debug output ensuring the
lines get flushed and don't run together.
2023-05-22 12:21:59 -04:00
Marian Buschsieweke
b9484852f1
drivers/sx126x: fix argument validation in spreading factor
The lowest possible value is `LORA_SF5` and not `LORA_SF6`. This fixes
the argument validation to allow setting `LORA_SF5` as spreading factor.

Fixes https://github.com/RIOT-OS/RIOT/issues/17861
2023-05-22 15:06:07 +02:00
bors[bot]
8fc1187278
Merge #17830 #19635
17830: periph/timer: fix Kconfig menu title r=aabadie a=gschorcht

### Contribution description

This PR is a very small fix of inconsistent peripheral driver entry in `Kconfig` for `periph/timer`.

In Kconfig menu `(Top) → Drivers → Peripherals drivers` all entries start with the peripheral name in alphabetical order with only one exception, the timer entry. This entry is called `Configure timer peripheral driver`:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] UART peripheral driver  --->
[*] Configure timer peripheral driver  --->
```
This is confusing and doesn't help to find the right entry. This PR
1. changes the entry to `Timer peripheral driver` and
2. corrects the alphabetical order.

### Testing procedure

Use command
```
TEST_KCONFIG=1 make -C tests/periph_timer menuconfig
```
and check the output. in menu `(Top) → Drivers → Peripherals drivers`. It should be with this PR:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] Timer peripheral driver  --->
[*] UART peripheral driver  --->
```
### Issues/PRs references


19635: drivers/mrf24j40: cleanup function r=aabadie a=maribu

### Contribution description

`_set_csma_params()` spends some time to prepare a value in `uint8_t tmp`, which then is never used. Likely this is a leftover of moving code to `mrf24j40_set_csma_max_retries()`. This drops the leftover code.


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-20 18:43:44 +00:00
Marian Buschsieweke
c10b8838f1
drivers/mrf24j40: cleanup function
`_set_csma_params()` spends some time to prepare a value in
`uint8_t tmp`, which then is never used. Likely this is a leftover
of moving code to `mrf24j40_set_csma_max_retries()`. This drops the
leftover code.
2023-05-20 16:59:25 +02:00
bors[bot]
a08b90c648
Merge #19633
19633: drivers/slipdev: fix logic bug r=fabian18 a=maribu

### Contribution description

A typo resulted in a boolean expression to always be true and the `_poweron()` function to always exit early. This fixes the issue.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-20 00:35:17 +00:00
bors[bot]
24593ce18c
Merge #19631 #19632
19631: drivers/dfplayer: fix bug in utility function r=maribu a=maribu

### Contribution description

Apparently, those functions have never been used. Otherwise this obvious bug wouldn't have sailed unnoticed for so long.



19632: drivers/pcf857x: fix error handling r=maribu a=maribu

### Contribution description

This fixes a typo/copy paste error in the error handling.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-19 21:54:05 +00:00
Marian Buschsieweke
adfe9ac306
drivers/slipdev: fix logic bug
A typo resulted in a boolean expression to always be true and the
`_poweron()` function to always exit early. This fixes the issue.
2023-05-19 23:01:30 +02:00
Marian Buschsieweke
bc1c831d39
drivers/pcf857x: fix error handling
This fixes a typo/copy paste error in the error handling.
2023-05-19 21:59:40 +02:00
Marian Buschsieweke
5683281b5d
drivers/dfplayer: fix bug in utility function
Apparently, those functions have never been used. Otherwise this
obvious bug wouldn't have sailed unnoticed for so long.
2023-05-19 21:51:44 +02:00
bors[bot]
a46b49a24c
Merge #19605 #19624 #19625
19605: drivers/at86rf2xx: setting rx timestamp based on symbol counter for ATmega*RFR2 r=maribu a=chudov



19624: pkg/tensorflow-lite: remove deprecated package r=maribu a=aabadie

Use tflite-micro instead



19625: sys/hashes: remove deprecated aes cmac hashing r=maribu a=aabadie



Co-authored-by: chudov <chudov@gmail.com>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-19 17:05:02 +00:00
chudov
c52f6e71c2 drivers/at86rf2xx: rx timestamp generation for ATmegaRFR2
Signed-off-by: chudov <chudov@gmail.com>
2023-05-19 15:33:15 +02:00
Marian Buschsieweke
dcb49cb46d
drivers/lpsxxx: avoid float arithmetics
Fixes https://github.com/RIOT-OS/RIOT/issues/17486
2023-05-19 09:23:30 +02:00
2dbf57fa46
drivers/pcf857x: fix path to saul test application 2023-05-13 19:08:40 +02:00
Fabian Hüßler
500d257a52 drivers/periph_common: Add PIO to periph init 2023-05-12 23:03:05 +02:00
Fabian Hüßler
d8cf31b094 drivers/include/periph: Add PIO driver interface 2023-05-12 23:03:05 +02:00
f9d247791d
treewide: replace occurrences of tests/driver_ with new path 2023-05-06 15:38:21 +02:00
Gunar Schorcht
714b3e3384 drivers/mtd_default: add external declarations for mtd*
The `mtd_default` module defines `MTD_NUMOF` if not existing based on the `MTD_*` defines which are usually set to the corresponding MTD device pointer variables `mtd*`. However, these MTD device pointer variables are not always made known by external variable declarations. An example are SD Card Interfaces which are defined via the `mtd_sdcard_default` module. As a consequence, an application that uses `mtd_default` has still to be modified. Therefore, `mtd_default` also declares up to 6 `mtd*` MTD device pointer variables.
2023-05-02 23:07:29 +02:00
bors[bot]
c4b27d8241
Merge #19523 #19527 #19530 #19532 #19533 #19535
19523: boards/iotlab-m3: enable l3g4200d_ng r=benpicco a=benpicco



19527: drivers/sdcard_spi: small cleanup r=benpicco a=gschorcht

### Contribution description

This PR provides a small cleanup:
- the copy of `sdcard_spi_params_t` is removed (commit bfc2a51f70)
- the documentation was changed to fit the 100 characters per line. (commit 36f0162b34)

It is not necessary to hold a complete copy `sdcard_spi_params_t` in the device descriptor. Constant parameters can be used directly from ROM instead. This saves 24 bytes of RAM.

### Testing procedure

Use any board with SD Card SPI interface. The driver test should still work, for example:
```
BOARD=esp32-wrover-kit make -j8 -C tests/driver_sdcard_spi flash term
```
```
main(): This is RIOT! (Version: 2023.07-devel-176-g7213c-drivers/sdcard_spi_cleanup)
SD-card spi driver test application
insert SD-card and use 'init' command to set card to spi mode
WARNING: using 'write' or 'copy' commands WILL overwrite data on your sd-card and
almost for sure corrupt existing filesystems, partitions and contained data!
> init
Initializing SD-card at SPI_0...
[OK]
> 
```

### Issues/PRs references


19530: sys/xtimer: add missing "modules.h" include to `xtimer.h` r=benpicco a=kaspar030



19532: tests/unittests: tests-core-mbox: add missing `container.h` include r=benpicco a=kaspar030



19533: core: move macros/math.h to core/lib/include/macros r=benpicco a=kaspar030



19535: nanocoap_sock: defuse nanocoap_sock_get() API footgun r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-05-02 13:37:57 +00:00
Marian Buschsieweke
c3500eb6e0
tree wide: fix typos in comments found by codespell
This will not change generated binaries, only the Doxygen output and
source code will have less typos.
2023-05-02 09:52:06 +02:00
Gunar Schorcht
36f0162b34 drivers/sdcard_spi: doc cleanup to fit in 100 characters per line 2023-05-01 14:36:25 +02:00
Gunar Schorcht
bfc2a51f70 drivers/sdcard_spi: remove copy of sdcard_spi_params_t from device
It is not necessary to hold a complete copy `sdcard_spi_params_t` in the device descriptor. Constant parameters can be used directly from ROM instead. This saves 24 bytes of RAM.
2023-05-01 14:36:25 +02:00
Benjamin Valentin
fcece44394 drivers/l3gxxxx: fix check for l3g4200d_ng 2023-04-28 17:24:15 +02:00
Marian Buschsieweke
c0a614d896
drivers/servo: Fix missing dep
The servo test app uses `USEMODULE += servo` and lets the build system
pick automatically the best suitable backend. If one explicitly chooses
a backend e.g. via `USEMODULE += servo_timer`, this currently requires
adding `USEMODULE += servo` in addition. This commit fixes the issue.

Fixes https://github.com/RIOT-OS/RIOT/issues/19474
2023-04-26 15:15:53 +02:00
chrysn
8e2d26923a drivers/lsm303agr: Rename deprecated unit G to GForce 2023-04-25 09:23:21 +02:00
Gunar Schorcht
26d435a101 drivers/usbdev_synopsys_dwc2: add GD32V support 2023-04-16 23:24:23 +02:00
Gunar Schorcht
ee83893496 drivers/periph_usbdev: TXFE not used any longer
After changing IN EPs also to use XFRC (Transfer Complete) interrupts in non-DMA mode, the TXFE (TX FIFO Empty) interrupt is no longer needed to signal the completion of an IN transfer.
2023-04-16 23:24:23 +02:00
Gunar Schorcht
ea776c92b6 drivers/usbdev_synopsys_dwc2: handle RXFLVL interruprs in ISR
Since RXFLVL (RX FIFO Level) interrupt doen't complete transfers anymore, they are handled now directly in the ISR.
2023-04-16 23:24:23 +02:00
Gunar Schorcht
d15f0f3a7b drivers/usbdev_synopsys_dwc2: use XFRC for OUT EPs in non-DMA mode
XFRC (Transfer Complete) interrupts are now also used for OUT EPs in non-DMA mode. RXFLVL (RX FIFO Level) interrupts are no longer used to signal completed transfers, but only to copy data from FIFO to memory and to set a flag indicating that a SETUP stage is in progress. STUP (SETUP phase done) interrupts are then used to signal a completed SETUP stage and to reset the flags that indicates the SETUP stage. The flag that indicates the SETUP stage in progress is used to ignore additional XFRC interrupts for EP0 during the SETUP stage.
2023-04-16 23:24:23 +02:00
Gunar Schorcht
1ccafe1621 drivers/usbdev_synopsys_dwc2: use XFRC for IN EPs in non-DMA mode
XFRC (Transfer Complete) interrupts are now also used for IN EPs in non-DMA mode. TXFE (TX FIFO Empty) interrupts are not necessarily needed but are still enabled.
2023-04-16 22:59:11 +02:00
Gunar Schorcht
1a37d3b9e0 drivers/usbdev_synopsys_dwc2: several cleanups 2023-04-16 22:59:11 +02:00
Gunar Schorcht
e3fb4e7cfb drivers/usbdev_synopsys_dwc2: add OTG interrupt handling 2023-04-16 22:59:11 +02:00
Gunar Schorcht
1d7224602d drivers/usbdev_synopsys_dwc2: print CID/HW debug info 2023-04-16 22:59:11 +02:00
Gunar Schorcht
ff9e9e3a7c drivers/usbdev_synopsys_dwc2: fix power modes for STM32 2023-04-16 22:59:11 +02:00
Gunar Schorcht
d35fa914c8 drivers/usbdev_synopsys_dwc2: fix a typo 2023-04-16 22:59:11 +02:00