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

8738 Commits

Author SHA1 Message Date
mguetschow
00e25adfe3
Merge pull request #20720 from netd-tud/chacha20-glue-code-implementation
sys/psa_crypto: one-shot Chacha20 support
2024-10-29 16:52:30 +00:00
Marian Buschsieweke
c2c2cc8592
drivers/periph_gpio: let gpio_read() return bool
Since https://github.com/RIOT-OS/RIOT/pull/20935 gpio_write()
uses a `bool` instead of an `int`. This does the same treatment for
`gpio_read()`.

This does indeed add an instruction to `gpio_read()` implementations.
However, users caring about an instruction more are better served with
`gpio_ll_read()` anyway. And `gpio_read() == 1` is often seen in
newcomer's code, which would now work as expected.
2024-10-23 13:24:09 +02:00
Benjamin Valentin
4627f66caa drivers/periph/gpio: make gpio_write() take a bool 2024-10-22 16:39:48 +02:00
Wunderbaeumchen
b9396c4739 sys/psa_crypto: chacha20 oneshot gluecode 2024-10-17 10:25:59 +02:00
AnnsAnn
db2a20c96c cpu/cortexm: fix spelling mistake 2024-10-16 16:04:10 +02:00
AnnsAnn
bd48d0bb82 cpu/esp32: improve build error messages 2024-10-16 16:02:32 +02:00
Marian Buschsieweke
702ad02b33
cpu/sam0_common/periph_dma: Fix API mismatch
Match the signature of the implementation of the dma_prepare() with the
declaration to fix:

    /home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/cpu/sam0_common/periph/dma.c:172:6: error: conflicting types for 'dma_prepare' due to enum/integer mismatch; have 'void(dma_t,  uint8_t,  const void *, void *, size_t,  uint8_t)' {aka 'void(unsigned int,  unsigned char,  const void *, void *, unsigned int,  unsigned char)'} [-Werror=enum-int-mismatch]
      172 | void dma_prepare(dma_t dma, uint8_t width, const void *src, void *dst,
          |      ^~~~~~~~~~~
    In file included from /home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/cpu/samd5x/include/periph_cpu.h:26,
                     from /home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/cpu/sam0_common/periph/dma.c:21:
    /home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/cpu/sam0_common/include/periph_cpu_common.h:1186:6: note: previous declaration of 'dma_prepare' with type void(dma_t,  uint8_t,  const void *, void *, size_t,  dma_incr_t)' {aka 'void(unsigned int,  unsigned char,  const void *, void *, unsigned int,  dma_incr_t)'}
     1186 | void dma_prepare(dma_t dma, uint8_t width, const void *src, void *dst,
          |      ^~~~~~~~~~~
2024-10-09 23:00:06 +02:00
Mikolai Gütschow
f0e6776d40
treewide: apply codespell corrections 2024-10-09 13:03:52 +02:00
Marian Buschsieweke
2ea8601b69
cpu/samd5x/periph_cph.h: drop non-UTF-8 chars
There were some bogus chars in a comment. Let's drop them.
2024-10-08 14:16:24 +02:00
benpicco
0e20bfd2b9
Merge pull request #20845 from thingsat/pr/add_can_to_board_nucleo-l432kc
boards/nucleo-l432kc: enable CAN support
2024-10-07 16:08:21 +00:00
Didier DONSEZ
84ec09f3cf boards/nucleo-l432kc: add configuration CAN peripheral
Signed-off-by: Didier DONSEZ <didier.donsez@gmail.com>
2024-10-07 17:35:10 +02:00
Marian Buschsieweke
20e218680c
cpu/samd5x/cpu.c: reformat code
This formats the code to improve readability and apply the coding
convention. This is a whitespace only change that will not change
generated binaries.
2024-09-17 22:07:46 +02:00
benpicco
ed9faa9f06
Merge pull request #20839 from mguetschow/nrf802154-rssi
cpu/nrf52: fix RSSI calculation in nrf802154_radio
2024-09-06 14:23:20 +00:00
mariemC
7df7886a69 cpu/sam0_common/periph: fix rtt reset after hibernation 2024-08-29 17:08:54 +02:00
Mikolai Gütschow
076dcefb92
cpu/nrf52: fix RSSI calculation in nrf802154_radio 2024-08-28 12:39:15 +02:00
Michael Richardson
7140aef74e doc: note that timer_settime() comes from librt on some systems 2024-08-18 16:02:15 -04:00
chrysn
d5bd9d7812
Merge pull request #20816 from maribu/cpu/native/periph_timer/linkflags
cpu/native/periph_timer: add missing -lrt to linker flags
2024-08-17 14:57:26 +00:00
Marian Buschsieweke
29a00beaf1
cpu/native/periph_timer: add missing -lrt to linker flags
This fixes https://github.com/RIOT-OS/RIOT/pull/20009#issuecomment-2294803168
2024-08-17 13:52:57 +02:00
krzysztof-cabaj
2d52ebd136 cpu/stm32/f4: add ADC support for f439zi 2024-08-16 10:03:33 +02:00
benpicco
3d5582d563
Merge pull request #20811 from nmeum/pr/riscv_common-format-error-llvm
riscv_common: Use unsiged long format specifier for printing CSR values
2024-08-12 16:40:30 +00:00
Sören Tempel
e7325ec02a riscv_common: Use unsiged long format specifier for printing CSR values
The read_csr macro returns the CSR value as a `unsigned long`. However,
the format specifier presently treats it as a `uint32_t`. This causes
a -Wformat error to be emitted by Clang 18:

	cpu/riscv_common/irq_arch.c:149:49: error: format specifies type 'unsigned int'
			   but the argument has type 'unsigned long' [-Werror,-Wformat]
	  149 |             printf("  mepc:   0x%" PRIx32 "\n", read_csr(mepc));
2024-08-12 15:09:00 +02:00
Marian Buschsieweke
8839ccbe50
cpu/stm32: implement periph_gpio_ll_switch_dir
This implements periph_gpio_ll_switch_dir for STM32 except for STM32F1,
which has a different register layout.
2024-08-08 22:17:35 +02:00
Marian Buschsieweke
fc907f9251
cpu/msp430/periph_gpio: resolve conflict with GPIO LL
In case both periph_gpio_irq and periph_gpio_ll_irq are used, the
periph_gpio_irq implementation now uses periph_gpio_ll_irq, so that
they can coexist.
2024-08-02 13:41:37 +02:00
Marian Buschsieweke
355f2335d5
cpu/msp430: implement gpio_ll_irq 2024-08-02 13:41:37 +02:00
Marian Buschsieweke
1a0da9a7af
cpu/msp430: fix warnings
clock.c: The MSP430 may need nop instructions after (and in some cases
         even before) touching the global interrupt enable bit in the
         status register. The assembler generates a warning when in
         doubt. Those nops should not be needed in our cases, but maybe
         it is better two waste flash for two instructions than having
         to live with the warning.

cpu.c: drop unneeded include
2024-08-02 13:41:37 +02:00
Marian Buschsieweke
0ce7b8dfde
cpu/msp430: add periph_gpio_ll 2024-08-02 13:41:37 +02:00
Marian Buschsieweke
422042bd00
drivers/periph_gpio_ll_irq: make support for both edges optional
The assumption that every MCU has this feature turned out wrong. Hence,
add a feature to allow testing for support of edge triggered IRQs on
both flanks.
2024-08-02 13:41:36 +02:00
Marian Buschsieweke
4a092862f8
cpu/stm32/periph_eth: adapt to GPIO LL API change 2024-08-02 09:55:25 +02:00
Marian Buschsieweke
36e8526046
drivers/periph_gpio_ll: change API to access GPIO ports
The API was based on the assumption that GPIO ports are mapped in memory
sanely, so that a `GPIO_PORT(num)` macro would work allow for constant
folding when `num` is known and still be efficient when it is not.

Some MCUs, however, will need a look up tables to efficiently translate
GPIO port numbers to the port's base address. This will prevent the use
of such a `GPIO_PORT(num)` macro in constant initializers.

As a result, we rather provide `GPIO_PORT_0`, `GPIO_PORT_1`, etc. macros
for each GPIO port present (regardless of MCU naming scheme), as well as
`GPIO_PORT_A`, `GPIO_PORT_B`, etc. macros if (and only if) the MCU port
naming scheme uses letters rather than numbers.

These can be defined as macros to the peripheral base address even when
those are randomly mapped into the address space. In addition, a C
function `gpio_port()` replaces the role of the `GPIO_PORT()` and
`gpio_port_num()` the `GPIO_PORT_NUM()` macro. Those functions will
still be implemented as efficient as possible and will allow constant
folding where it was formerly possible. Hence, there is no downside for
MCUs with sane peripheral memory mapping, but it is highly beneficial
for the crazy ones.

There are also two benefits for the non-crazy MCUs:
1. We can now test for valid port numbers with `#ifdef GPIO_PORT_<NUM>`
    - This directly benefits the test in `tests/periph/gpio_ll`, which
      can now provide a valid GPIO port for each and every board
    - Writing to invalid memory mapped I/O addresses was treated as
      triggering undefined behavior by the compiler and used as a
      optimization opportunity
2. We can now detect at compile time if the naming scheme of the MCU
   uses letters or numbers, and produce more user friendly output.
    - This is directly applied in the test app
2024-08-02 09:55:24 +02:00
benpicco
41204c8b81
Merge pull request #20450 from benpicco/THREAD_CREATE_STACKTEST-delete
core/thread: always use THREAD_CREATE_STACKTEST when DEVELHELP is enabled
2024-07-29 11:52:06 +00:00
Benjamin Valentin
312a550f1a treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
krzysztof-cabaj
99b5bc1f4f cpu/stm32/l4: enable missing star-up time 2024-07-24 12:09:42 +02:00
Benjamin Valentin
3237ed911e core/panic: don't use LOG_ functions in panic handler 2024-07-17 16:18:19 +02:00
crasbe
f93aa40186 cpu/stm32: add ADC support for WB55 2024-07-08 11:18:57 +02:00
benpicco
d312d36728
Merge pull request #20756 from krzysztof-cabaj/nucleo-l4xxx-fix-ADC
cpu/stm32-L4: fix ADC initialization
2024-07-04 14:22:39 +00:00
krzysztof-cabaj
f6e1ce779e boards/nucleo-l4xxx: fix ADC init 2024-07-01 21:49:55 +02:00
Dylan Laduranty
26b3583aa9 cpu/samd5x: avoid the use of bitfield in periph
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-29 13:26:51 +02:00
Dylan Laduranty
41c003d670 cpu/samd5x: avoid the use of bitfield in cpu init
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-27 21:51:13 +02:00
Dylan Laduranty
8f645a95a4
Merge pull request #20747 from dylad/pr/cpu/sam0/avoid_bitfield_usage
cpu/sam0_common: avoid bitfield usage
2024-06-25 20:47:20 +00:00
Dylan Laduranty
ccc155e351 cpu/sam0: remove bitfield usage in sdhc driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:17 +02:00
Dylan Laduranty
04e4770379 cpu/sam0: remove bitfield usage in headers
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:17 +02:00
Dylan Laduranty
25a04e6757 cpu/sam0/periph: remove bitfield usage in watchdog driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:17 +02:00
Dylan Laduranty
707fecbc38 cpu/sam0/periph: remove bitfield usage in usbdev driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:17 +02:00
Dylan Laduranty
f31ac8a978 cpu/sam0/periph: remove bitfield usage in UART driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
Dylan Laduranty
6ccaca1e76 cpu/sam0/periph: remove bitfield usage in timer driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
Dylan Laduranty
925e98b115 cpu/sam0/periph: remove bitfield usage in SPI driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
Dylan Laduranty
7c1e66bdae cpu/sam0/periph: remove bitfield usage in RTC/RTT driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
Dylan Laduranty
a66eebb8ac cpu/sam0/periph: remove bitfield usage in I2C driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
Dylan Laduranty
37b03d8172 cpu/sam0/periph: remove bitfield usage in trng driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
Dylan Laduranty
38c65b9531 cpu/sam0/periph: remove bitfield usage in PWM driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00