8ac1909ea3
cpu: boards: stm32l0l1: use IS_ACTIVE where possible in stmclk
2020-09-22 22:30:19 +02:00
5e886a76c9
boards/stm32l0/l1: merge default clock configuration headers
2020-09-22 22:30:19 +02:00
4bdb3db0f9
boards/stm32l1: override default LSE in boards where needed
2020-09-22 22:30:19 +02:00
67a1c029b4
boards/stm32l0: set LSE to 0 default, override in boards
2020-09-22 22:30:19 +02:00
23117a844e
boards: cpu: stm32l0: rework clock configuration
2020-09-22 22:30:19 +02:00
4a5d9a30b1
boards/stm32l0*: rename shared clock config header
2020-09-22 22:30:08 +02:00
benpicco
4db66d1110
Merge pull request #15057 from maribu/kernel_defines_cast_align
...
core/include/kernel_defines.h: Fix container_of()
2020-09-22 21:41:13 +02:00
Martine Lenders
5e4c285323
Merge pull request #15056 from maribu/gnrc_pktbuf_static_alignment
...
sys/net/gnrc/pktbuf_static: Fix alignment
2020-09-22 17:07:07 +02:00
MrKevinWeiss
cc1c2ab811
drivers/periph: Remove unused timer enum from dev_enums
2020-09-22 16:26:01 +02:00
MrKevinWeiss
d95452b979
cpu/native: Remove unused TIMER_0_EN
2020-09-22 16:26:01 +02:00
MrKevinWeiss
a65ce2a058
cpu/ezr32wg: fix comment
2020-09-22 16:26:01 +02:00
MrKevinWeiss
263aea60cb
cpu/lpc1768: Cleanup timer to remove dev_enums
2020-09-22 16:26:01 +02:00
MrKevinWeiss
7c3082a7a3
cpu/lm4f120: Update timer macros to timer_config_t
2020-09-22 16:26:01 +02:00
Martine Lenders
db6355fb13
Merge pull request #15054 from haukepetersen/fix_emcute_msgupdate
...
net/emcute: fix buffer overflow in _willupd_msg()
2020-09-22 15:51:05 +02:00
Marian Buschsieweke
59321065db
core/thread.c: Silence -Wcast-align flase positives
...
Verified that each warning generated by -Wcast-align is indeed a false positive
and used an (intermediate) cast to `uintptr_t` to silence the warnings.
2020-09-22 15:15:28 +02:00
a3b0a17185
Merge pull request #15018 from maribu/doc_driver_guide
...
doc/driver-guide.md: Update doc on return value
2020-09-22 15:14:30 +02:00
Marian Buschsieweke
85e506e893
core/include/kernel_defines.h: Fix container_of()
...
container_of() is safe to use in regard to alignment requirements, when used
correctly. Using `uintptr_t` instead of `char *` for applying the offset results
in -Wcast-align not complaining.
2020-09-22 15:13:03 +02:00
Marian Buschsieweke
28d4bf7751
sys/net/gnrc/pktbuf_static: Fix alignment
...
The buffer _pktbuf was previously only aligned to a 1 byte boundary. This could
result in run time issues.
2020-09-22 15:04:56 +02:00
Francisco
f3a5ee69e0
Merge pull request #14936 from kaspar030/ztimer_sleep_adjust
...
sys/ztimer: allow compensation of ztimer_sleep() overhead
2020-09-22 14:56:56 +02:00
Marian Buschsieweke
4a016adebb
doc/driver-guide.md: Update doc on return value
...
Change driver guide to expect drivers to return negative errno codes instead of
enums for error codes. Those have the following advantages:
- More efficient implementation of POSIX compatibility wrappers:
- In case of error, just an `errno = -retval; return -1` is needed
- Better interoperability
- A lot of code within RIOT and in external code is doing so already.
Applying this consistently allows passing error codes through, rather
than translating between errno codes and custom enum values
- Not reinventing the wheel
- Defining and documenting custom error codes for each driver is unneeded
effort
- The error classes that device driver have to report are largely the same.
There is no reason to have dozens of error codes for an input/output
error, each with a unique spelling a programmer needs to memorize
2020-09-22 14:38:56 +02:00
Marian Buschsieweke
8a5d301caa
sys/net/gnrc/netif: Fix compilation on waspmote-pro
...
xtimer.h must not be included, when the xtimer module is not use. Otherwise
compilation on the waspmote-pro with https://github.com/RIOT-OS/RIOT/pull/14799
will not longer work. gnrc_netif_pktq includes xtimer.h and uses xtimer, but
gnrc_netif includes gnrc_netif_pktq.h regardless of whether gnrc_netif_pktq
is used. This makes sure that gnrc_netif_pktq.h is only included when actually
used.
2020-09-22 11:51:09 +02:00
Marian Buschsieweke
1d1b446d6b
sys/net/gnrc/netif: use IS_USED macro
2020-09-22 11:50:18 +02:00
ec65e8a776
tests/xtimer_usleep: fix test to allow zero (perfect) offset
2020-09-22 11:50:02 +02:00
86a045845e
tests/ztimer_overhead: update to clock->adjust_set
2020-09-22 11:50:02 +02:00
Hauke Petersen
3b424858de
net/emcute: fix buffer overflow in _willupd_msg()
2020-09-22 11:43:00 +02:00
Francisco
bcd2b3e369
Merge pull request #14030 from benpicco/cpu/sam0_common-rtc_tamper
...
cpu/sam0_common: GPIO: use tamper detection to wake from Deep Sleep
2020-09-22 11:41:48 +02:00
c270aadc00
Merge pull request #15049 from aabadie/pr/drivers/lsm303dlhc_enh_init
...
drivers/lsm303dlhc: slightly enhance the initialization code
2020-09-21 11:44:08 +02:00
99238370a2
drivers/lsm303dlhc: remove useless release/acquire sequence
2020-09-21 11:16:14 +02:00
55ef882860
drivers/lsm303dlhc: improve debug message during init
2020-09-21 11:16:13 +02:00
Francisco
11d51def4b
Merge pull request #14965 from haukepetersen/fix_nimnetif_deadlockonconndrop
...
pkt/nimble/netif: fix deadlock on connection loss
2020-09-21 10:18:42 +02:00
MichelRottleuthner
cdd1cd3ea2
Merge pull request #14978 from pokgak/xtimer/remove_set_absolute
...
xtimer: remove _xtimer_set_absolute
2020-09-21 10:03:25 +02:00
Francisco
64f6b7ffa4
Merge pull request #14702 from maribu/sched_active_thread
...
treewide: Fix direct access to scheduler internals
2020-09-21 09:09:59 +02:00
Marian Buschsieweke
7946eb766e
Merge pull request #15047 from kaspar030/fix_cdc_ecm_recv_return
...
sys/usb/usbus/cdc_ecm_netdev: fix _recv() return values
2020-09-18 22:45:13 +02:00
70d480c301
sys/usb/usbus/cdc_ecm_netdev: fix _recv() return values
...
Previously, the function would always return the max_len parameter.
This poses two issues:
1. the API requires to return the actual packet size
2. the API requires that if the packet is larger than max_len, the
packet is flushed and -ENOBUFS is returned
3. this basically bypasses the packet flushing, consequtive _recv()
would return the last packet again
This commit fixes those issues.
2020-09-18 21:04:15 +02:00
Benjamin Valentin
2e35eb9229
tests/periph_gpio: enable tamper wake
2020-09-17 18:47:10 +02:00
Benjamin Valentin
310eb4970c
cpu/sam0_common: GPIO: use tamper detection to wake from Deep Sleep
...
On samd5x only the RTC can wake the CPU from Deep Sleep (pm modes 0 & 1).
The external interrupt controller is disabled, but we can use the tamper
detection of the RTC.
If an gpio interrupt is configured on one of the five tamper detect pins,
those can be used to wake the CPU from Deep Sleep / Hibernate.
2020-09-17 18:46:25 +02:00
Benjamin Valentin
0499d016ad
cpu/sam0_common: implement RTC tamper detection
2020-09-17 18:45:50 +02:00
Juergen Fitschen
90e7879ef2
tests/evtimer_msg: use evtimer_now_msec() to get current time
2020-09-17 16:58:32 +02:00
Juergen Fitschen
0440d27d76
tests/evtimer_msg: require xtimer explicitly
2020-09-17 16:58:31 +02:00
benpicco
acf14f8a2b
Merge pull request #15035 from maribu/test_periph_timer_etc
...
tests/periph_timer_{periodic, short_relative_set}: Drop include of `xtimer.h`
2020-09-17 16:29:36 +02:00
benpicco
2e89cf3398
Merge pull request #15034 from maribu/xtimer_shift_fallback
...
tests/xtimer_{rmutex,mutex}_lock_timeout: Fix compilation
2020-09-17 16:29:13 +02:00
benpicco
0916d34365
Merge pull request #15033 from maribu/xtimer_includes
...
{drivers/apds99xx, sys/net/gnrc/netreg}: Drop xtimer includes
2020-09-17 10:37:09 +02:00
José Alamos
9c130cd2fd
Merge pull request #15032 from jia200x/pr/at86rf2xx/fix_overflow
...
drivers/at86rf2xx: fix at86rf2xx_set_rxsensitivity
2020-09-17 10:32:06 +02:00
Marian Buschsieweke
344407921f
Merge pull request #14807 from aabadie/pr/tests/periph_timer_typo
...
tests/periph_timer: fix typo for boards using 250kHz timer
2020-09-16 20:34:06 +02:00
Marian Buschsieweke
39ae9ec399
tests/periph_timer_periodic: Don't include xtimer.h
...
Including xtimer.h without using the xtimer module results in issues on the
waspmote-pro. Thus, drop the include.
2020-09-16 20:28:11 +02:00
Marian Buschsieweke
84f49bb4c8
tests/periph_timer_short_relative_set: Don't include xtimer.h
...
Including xtimer.h without using the xtimer module results in issues on the
waspmote-pro. Thus, drop the include.
2020-09-16 20:26:01 +02:00
Marian Buschsieweke
ca96ebc882
tests/xtimer_rmutex_lock_timeout: Fix compilation
...
Let XTIMER_SHIFT fall back to zero to allow compilation with the waspmote-pro
2020-09-16 20:09:50 +02:00
Marian Buschsieweke
4bb1e530bf
tests/xtimer_mutex_lock_timeout: Fix compilation
...
Let XTIMER_SHIFT fall back to zero to allow compilation with the waspmote-pro
2020-09-16 20:09:42 +02:00
Marian Buschsieweke
0cb274c1eb
sys/net/gnrc: Fix include of xtimer.h
...
Make sure xtimer.h is only included if the xtimer module is actually used, as
otherwise compilation for the waspmote-pro fails.
2020-09-16 19:55:43 +02:00
4d1ed718a1
tests/periph_timer: fix typo for boards using 250kHz timer
2020-09-16 19:55:33 +02:00