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

127 Commits

Author SHA1 Message Date
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
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
Teufelchen1
0e839654e8 cpu/riscv: Add PMP driver 2023-06-28 11:55:34 +02:00
Gunar Schorcht
2ae7566a89 cpu/riscv_common: rename cpu.h to cpu_common.h
To allow CPU specific definitions in `cpu.h`, `riscv_common/cpu.h` is renamed to ``riscv_common/cpu_common.h` and included in new `cpu.h` files for FE310 and GD32V.
2023-04-18 06:20:14 +02:00
Benjamin Valentin
124b849503 cpu: call early_init() 2023-01-08 22:26:12 +01:00
9c71dd7566
Merge pull request #17342 from aabadie/pr/sysclk
sys: introduce sysclk function to retrieve core clock frequency
2021-12-15 15:41:34 +01:00
2eb800cb8b
cpu/fe310: use coreclk instead of cpu_freq 2021-12-15 13:14:19 +01:00
Francisco Molina
5e47fc7e22 cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
The sam0 rtt busy loops for 180us every time an alarm is set or
the counter is read, this propagates and leads to timing errors
on ztimer_msec that are higher than > +-1msec.

The same goes for fe310.
2021-12-14 18:43:53 +01:00
Gunar Schorcht
007e29ebb5 cpu/periph/i2c: update implementations to new I2C API
Make all `spi_acquire` implementations return `void` and add assertions to check for valid device identifier where missing.
2021-11-29 06:35:25 +01:00
Jan Romann
bd7b277f7e
cpu/fe310: uncrustify 2021-11-18 15:44:17 +01:00
Leandro Lanzieri
fe8e043c36
cpu/fe310: model Kconfig 2021-10-01 11:26:15 +02:00
José Alamos
1ee57f80a0
Merge pull request #15030 from jia200x/pr/lora/remove_xtimer
drivers/sx127x: remove ZTIMER_USEC dependency
2021-09-27 11:41:22 +02:00
Karl Fessel
baf07e881e cpu/fe310: add CPU_CORE information 2021-09-22 15:51:54 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Benjamin Valentin
a75ae3c938 cpu/riscv_common: move C lib selection to common place 2021-08-25 10:53:00 +02:00
Benjamin Valentin
a9c83017ee cpu/riscv_common: only select PLIC for fe310
Not every RISC-V implements that interrupt controller, gd32v uses
CLIC instead.
2021-08-25 10:49:47 +02:00
benpicco
025770968b
Merge pull request #16036 from bergzand/pr/gd32vf103/initial
gd32v/seeedstudio-gd32: Initial support
2021-08-25 00:38:00 +02:00
f2787448e1 cpu/riscv_common: Move MCAUSE defines to riscv_common 2021-08-24 14:30:23 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Jose Alamos
94d46e756e
cpu/fe310: fix RTT frequency 2021-07-02 14:53:22 +02:00
Benjamin Valentin
6d42c9fcfe cpu: make newlib_nano a DEFAULT_MODULE
This allows to disable nanospecs with

    DISABLE_MODULE += newlib_nano

if a full-features version of newlib is desired.
2021-05-04 12:12:36 +02:00
Benjamin Valentin
d47a880915 cpu: add periph_rtt_overflow feature
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.

This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Marian Buschsieweke
ab89234040
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-08 14:16:46 +01:00
Marian Buschsieweke
b9cb75fedf
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-04 18:05:06 +01:00
4dc7f33b2b
cpu/fe310: set newlib as default libc 2021-02-11 21:49:43 +01:00
2692957c0e
riscv_common: Refactor common fe310 code to riscv_common 2021-02-05 09:32:19 +01:00
ce97e9d8ce
Merge pull request #15859 from fjmolinas/pr_newlib_feature
treewide: model newlib as a FEATURE
2021-01-27 10:06:08 +01:00
Francisco Molina
63a2a6ce1b
treewide: model newlib as a FEATURE 2021-01-27 09:24:25 +01:00
128423edc6
cpu/fe310: Use newlib_syscalls_default stub implementations
This switches the fe310 to use the common newlib_syscalls_default
implementation.
2021-01-26 13:42:52 +01:00
b57b3d490d
cpu/fe310: Allow using immediates for ecall arguments
The mv instruction (which is usually implemented as `add rd, x0, r1`) is
changed to `add rd, x0, %input`. This can either be used as a load
immediate or as an move.

The code size grows by two bytes. This because GCC does not compress the
li instruction to the compressed version (even though this is possible).
2021-01-22 20:49:52 +01:00
896227ab08
cpu/fe310: Add used registers to clobbers 2021-01-22 20:49:17 +01:00
9979646b8b
cpu/fe310: Inline thread_yield_higher function 2021-01-19 11:03:21 +01:00
ba518ede09
cpu/fe310: Uncrustify code 2021-01-15 12:02:55 +01:00
5a203413a1
cpu/fe310: Remove software IRQ handling 2021-01-13 12:51:32 +01:00
1b2adb4821
cpu/fe310: Use ecall instruction for thread yield 2021-01-13 12:51:25 +01:00
73d3232f67
Merge pull request #15673 from maribu/fe310-malloc
cpu/fe310: use malloc_thread_safe
2020-12-21 13:29:02 +01:00
Marian Buschsieweke
b422ef9970
cpu/fe310: use malloc_thread_safe 2020-12-18 10:29:37 +01:00
dc77914ce8
cpu/fe310: add clock configuration header 2020-12-17 15:53:31 +01:00
aaca1331ca
cpu/fe310: move clock Kconfig to cpu 2020-12-17 15:53:31 +01:00
575189510d
Merge pull request #15465 from maribu/atomic-utils-volatile
sys/atomic_utils: Use volatile qualifier
2020-11-24 22:05:33 +01:00
Marian Buschsieweke
dd48ced151
cpu/*/atomic_utils_arch.h: Add volatile qualifier 2020-11-24 14:00:52 +01:00
Marian Buschsieweke
21bf7c0d01
cpu/fe310: Silence -Wcast-align 2020-11-18 09:58:52 +01:00
792e031a95
Merge pull request #14331 from maribu/atomic_utils
sys/atomic_utils: Functions for atomic access
2020-11-12 21:44:53 +01:00
Marian Buschsieweke
ce0982485d
cpu/fe310: Add atomic_utils_arch.h 2020-11-10 10:55:13 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02:12 +01:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Bas Stottelaar
fb61443bbd cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00