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

317 Commits

Author SHA1 Message Date
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
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
Fabian Hüßler
d8cf31b094 drivers/include/periph: Add PIO driver interface 2023-05-12 23:03:05 +02:00
Gunar Schorcht
d675cd7290 drivers/periph_usbdev: define USBDEV_SET_ADDR_AFTER_STATUS
The address in the USB device can be set either directly after the SETUP stage on receipt of the `SET ADDRESS Request` or after the associated status stage. When the USB device address has to be set depends on the hardware. If `USBDEV_SET_ADDR_AFTER_STATUS` has the value 1 (default), the address is only set in the USB device after the status stage. Overwrite it with 0 in `periph_cpu.h` to set the address already directly after the SETUP stage.
2023-04-16 17:14:08 +02:00
608322a4ce
usbdev: Add dedicated stall functions
This commit adds dedicated stall functions for usbdev peripherals. Two
functions are added. The first function (usbdev_ep_stall) to enable and
disable the stall condition on generic endpoints. The second function is
a dedicated function to set the stall condition on endpoint zero in both
directions. This status can only be set and should automatically be
cleared by the usbdev implementation (or hardware) after a new setup
request is received from the host.
2023-02-28 11:00:05 +01:00
bors[bot]
1c55118bd8
Merge #18257
18257: drivers/wdt: add periph_wdt_auto_start for early watchdog r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-13 21:09:07 +00:00
Benjamin Valentin
80fe4e5f26 sys/auto_init: add auto_init_wdt_{event, thread} modules 2023-02-13 15:06:24 +01:00
Gunar Schorcht
5217bc84a7 drivers/periph/gpio_ll: small doc fixes 2023-02-04 11:33:44 +01:00
Benjamin Valentin
b8a6988e79 drivers/wdt: add periph_wdt_auto_start for early watchdog
Add an option to enable the watchdog early to detect hangs during
initialisation.
2023-01-14 23:21:24 +01:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
Marian Buschsieweke
bae91c1660
Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped
drivers/periph/timer: add TIM_FLAG_SET_STOPPED flag
2022-05-03 12:06:37 +02:00
Marian Buschsieweke
23855e140e
drivers: Add periph/gpio_ll API
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2022-04-22 08:39:04 +02:00
Ollrogge
4974790bad periph/flashpage: deprecate *_free functions 2022-03-31 17:59:54 +02:00
Ollrogge
a834cc9acf periph/flashpage: activate FLASH_WRITABLE_INIT documentation 2022-03-31 17:59:44 +02:00
chrysn
facb5e633f
Merge pull request #17436 from Ollrogge/reserve_flash
cpu: add flash_writable section to linker script
2022-03-17 21:44:32 +01:00
Ollrogge
6ab1fb9a09 periph/flashpage: Add FLASH_WRITABLE_INIT macro 2022-03-17 19:46:00 +01:00
Benjamin Valentin
3d252bfba3 drivers/periph/timer: add TIM_FLAG_SET_STOPPED flag 2022-03-01 13:45:01 +01:00
Fabian Hüßler
66a7a0a065 drivers/periph: add VBAT interface 2022-02-20 13:43:19 +01:00
Francisco Molina
579ca6d941 drivers/periph_spi: spi_init_with_gpio_mode mode by reference 2022-01-18 16:22:18 +01:00
79df157727
sys: move rtc utility functions to their own module 2021-12-20 13:04:20 +01:00
benpicco
e8cbf1ea90
Merge pull request #16681 from benpicco/drivers/dose-collision
drivers/dose: make use of UART collision detection feature
2021-12-08 20:48:28 +01:00
b6cc07009f
Merge pull request #17284 from fjmolinas/pr_ztimer_no_periph_rtt
sys/ztimer: add 'ztimer_no_periph_rtt'
2021-12-02 11:02:24 +01:00
Francisco Molina
7c3360e4d6 sys/ztimer: add 'ztimer_no_periph_rtt'
This is a temporary fix for Issue #17060. It allows to disable
auto inclusion of `ztimer_periph_rtt` in cases where another
module or application requires direct access.

Limitations:
- as ifeq are involved order of inclusion matters, therefore
  these modules should be included early in the build at application
  level and not in modules `Makefile.dep`
- this does not disallow direct inclusions of `ztimer_periph_rtt`,
  since this only disables auto inclusion of these modules

This is a temporary solution since this is already possible with
Kconfig, but not in make.
2021-12-02 07:54:38 +01:00
Gunar Schorcht
3d93b2bcf0 drivers/periph/i2c: i2c_acquire() returns void
Since all implementations simply return 0 and most drivers do not check the return value, it is better to return void and use an assert to ensure that the given device identifier and given device parameters are correct.
2021-11-29 06:35:25 +01:00
Benjamin Valentin
1768e93710 drivers/periph: use uint_fast8_t as default type
The default driver type is just an index into a device array defined
by the board.

If a platform wants to encode additional information in the device type,
it can define a custom type.

This means we can just set the default type to whatever fits the target
CPU best.

On ARM this will still be a 32 bit word, but on AVR it will by a 8 bit byte.
2021-11-18 10:29:50 +01:00
597f1d19aa
usbdev: Refactor to xmit API
This API change refactors the usbdev API to supply buffers via the
usbdev_ep_xmit function. This changes from the usbdev_ep_ready call to allow
separate buffers per call. An usbdev_ep_buf_t pseudotype is available and must
be used when defining buffers used for endpoints to adhere to the DMA alignment
restrictions often required with usb peripherals.

Main advantage is that the usbdev peripherals no longer have to allocate
oversized buffers for the endpoint data, potentially saving multiple KiB
of unused buffer space. These allocations are now the responsibility of
the individual USB interfaces in the firmware
2021-11-16 11:21:07 +01:00
59e85cf921
usbdev: Refactor to xmit API
This API change refactors the usbdev API to supply buffers via the
usbdev_ep_xmit function. This changes from the usbdev_ep_ready call to allow
separate buffers per call. An usbdev_ep_buf_t pseudotype is available and must
be used when defining buffers used for endpoints to adhere to the DMA alignment
restrictions often required with usb peripherals.

Main advantage is that the usbdev peripherals no longer have to allocate
oversized buffers for the endpoint data, potentially saving multiple KiB
of unused buffer space. These allocations are now the responsibility of
the individual USB interfaces in the firmware
2021-11-16 11:21:00 +01:00
Benjamin Valentin
f89d0c7c25 drivers/periph/uart: add periph_uart_collision feature 2021-11-10 15:57:45 +01:00
benpicco
bfb8d1d3fd
Merge pull request #17014 from benpicco/periph/gpio-cb_not_NULL
drivers/periph/gpio: state that interrupt callback must not be NULL
2021-11-05 12:47:16 +01:00
Ollrogge
c6e94aa6be periph/flashpage.h: add comment about riotboot impact on flashpage layout 2021-10-26 14:35:33 +02:00
Francisco
7f3344870d
Merge pull request #16972 from Ollrogge/flashpage_pr
periph/flashpage: extend API
2021-10-26 12:51:05 +02:00
9f8aee4e95
usbdev: Deprecate USBDEV_EVENT_TR_FAIL 2021-10-24 19:33:29 +02:00
Ollrogge
72d47013dd periph/flashpage: extend API 2021-10-19 22:33:09 +02:00
Benjamin Valentin
f624eb473a drivers/periph/gpio: state that interrupt callback must not be NULL
This allows us to use `assert(cb != NULL)` inside `gpio_init_int()`
and save a few cycles of interrupt latency.
2021-10-19 21:26:50 +02:00
Benjamin Valentin
0ee0c5e40e drivers/periph: define periph_rtc_mem 2021-09-03 11:43:42 +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
Benjamin Valentin
f903ec90d4 drivers/flashpage: flashpage_page() takes a const argument
All addresses to flashpage_page() must be in flash. Flash memory is
`const`, therefore this function must also take `const` pointers.
2021-08-27 14:08:25 +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
Benjamin Valentin
75e2a65681 drivers/flashpage: add missing include 2021-08-24 14:30:23 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Marian Buschsieweke
9e5f7b6797
drivers/periph_spi: make spi_acquire() return void
There is no way to properly handle incorrect SPI parameters at run time, so
just having an assertion blow up is the better choice here.

As most instances of `spi_acquire()` don't check the return value anyway, this
will improve debugging experience quite a bit. Some implementation of
spi_acquire() don't even check parameters anyway.
2021-08-06 12:46:57 +02:00
benpicco
feac187d54
Merge pull request #16506 from benpicco/drivers/dose-rx_start
drivers/dose: make use of start condition received interrupt
2021-07-28 17:21:29 +02:00
Benjamin Valentin
9194440ead drivers/periph/uart: add periph_uart_rx_start feature 2021-07-27 16:29:30 +02:00
Marian Buschsieweke
e7cacf6f60
periph/uart: Fix doc, use errno for return values
Some terminology issues are fixed. (The speed of an UART interface is
the symbol rate. The unit it is measured in is baud, which is symbols
per second. There is no such thing as baudrate or even baud/s.)

The return codes are changed to use negative errno constants on error
to match the driver design rules. For backward compatibility, the
enum was updated to match the error codes. Unless an application
depends on the exact numerical value (which would be insane), this is
not breaking any code.
2021-07-09 17:06:01 +02:00
benpicco
619a444741
Merge pull request #16347 from benpicco/drivers/rtt_rtc-rtc_get_time_ms
drivers/rtt_rtc: implement rtc_get_time_ms()
2021-05-05 19:13:21 +02:00
Benjamin Valentin
dcebc7d480 drivers/rtt_rtc: implement rtc_get_time_ms()
RTC on RTT usually runs at a frequency greater than 1 Hz, so sub-second
precision is available.
Add a function to get the current RTC timestamp together with it's sub-second
component.
2021-05-03 00:09:18 +02:00
Benjamin Valentin
917cf85225 drivers/periph: flashpage: add common helper functions 2021-04-27 16:52:36 +02:00
Marian Buschsieweke
40859b61f0
drivers/periph_spi: fix Doxygen commands
use @retval to document individual return values rather than @return
2021-03-17 10:34:20 +01:00