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

7293 Commits

Author SHA1 Message Date
Martine S. Lenders
a349748354
gnrc_pktdump: reorder switch-cases in accordance with enum order 2020-05-05 21:05:00 +02:00
Martine S. Lenders
d43384d238
gnrc_pktdump: remove some duplicate calls to od_hex_dump()
`od_hex_dump()` is called if `hdr_len < pkt->size` to print the rest
after `hdr_len` of `pkt`. So if we just leave `hdr_len = 0` instead of
calling `od_hex_dump()` for every other NETTYPE, we achieve the same
effect.

As it is more effective (and already done in some cases) to re-set
`hdr_len` when the header was printed, we initialize `hdr_len` first
with 0 now.
2020-05-05 21:05:00 +02:00
Martine S. Lenders
5414164119
gnrc_pktdump: use gnrc_nettype_% module where appropriate 2020-05-05 21:05:00 +02:00
Leandro Lanzieri
34689a290c
Merge pull request #13994 from miri64/gnrc_nettype/enh/use-pseudomodules
gnrc_nettype: indirect NETTYPE definition via pseudo-modules
2020-05-05 20:59:44 +02:00
Martine S. Lenders
ae05e84a9b
gnrc_nettype: fix line-length for all to be <100 2020-05-05 19:16:06 +02:00
Martine S. Lenders
1c251beb03
gnrc_nettype: indirect NETTYPE definition via pseudo-modules
Instead of making a NETTYPE definition dependent on an implementation
module, this change makes it dependent on a pseudo-module for each
specific NETTYPE and makes the respective implementation modules
dependent on it.

This has two advantages:

- one does not need include the whole implementation module to
  subscribe to a NETTYPE for testing or to provide an alternative
  implementation
- A lot of circular dependencies related to GNRC could be untangled.
  E.g. the only reason `gnrc_icmpv6` needs the `gnrc_ipv6` is because it
  uses `GNRC_NETTYPE_IPV6` to search for the IPv6 header in an ICMPv6
  when demultiplexing an ICMPv6 header.

This change does not resolve these dependencies or include usages where
needed. The only dependency change is the addition of the
pseudo-modules to the implementation modules.
2020-05-05 19:16:06 +02:00
benpicco
775b43fbd4
Merge pull request #13967 from fjmolinas/pr_ztimer_rtt_auto_init
sys/ztimer/auto_init: fix rtt auto_init
2020-05-05 14:34:48 +02:00
benpicco
96eadc00ad
Merge pull request #13987 from fjmolinas/pr_ztimer_xtimer_include_board.h
sys/include/xtimer.h: include board.h with ztimer
2020-05-05 14:21:43 +02:00
Leandro Lanzieri
8c88e4710a
Merge pull request #14020 from miri64/gnrc_netif/fix/doc-define
gnrc_netif: doxygen does not process IS_ACTIVE()
2020-05-05 13:38:31 +02:00
MichelRottleuthner
50c7b1be8b
Merge pull request #11977 from JulianHolzwarth/pr/xtimer_rmutex_lock_timeout
xtimer/xtimer.c: xtimer_rmutex_lock_timeout
2020-05-05 11:54:03 +02:00
Martine S. Lenders
d141d0b13d
gnrc_netif: doxygen does not process IS_ACTIVE() 2020-05-05 10:17:30 +02:00
JulianHolzwarth
6c8b1f10b5 sys/include/c11_atomics_compat.hpp: fix for esp32
Fixes a problem with redefining ATOMIC_VAR_INIT for esp32
2020-05-04 17:56:09 +02:00
JulianHolzwarth
8ef9f0fc6e sys/include/vfs.h: use c11_atomics_compat.hpp header wrapper
to solve a problem with c and c++ atomic
2020-05-04 17:56:09 +02:00
JulianHolzwarth
67e83c1e3e sys/include/xtimer.h: new function xtimer_rmutex_lock_timeout() 2020-05-04 17:46:31 +02:00
JulianHolzwarth
6d6b93afdc sys/xtimer/xtimer.c: new function xtimer_rmutex_lock_timeout()
function tries to acquire a mutex within a timeout
2020-05-04 17:46:31 +02:00
fc68d9c3a3 sys/ztimer: properly initialize intermediate extension callback 2020-05-04 17:25:27 +02:00
Ken Bannister
595e8c631f
Merge pull request #13726 from benpicco/nanocoap-payload_helper
nanocoap: add payload helper functions
2020-05-03 08:56:30 -04:00
benpicco
261ff8acb5
Merge pull request #14005 from francois-berder/fix-pm-args
sys/shell: commands: Check argc in _pm_handler
2020-05-03 14:10:26 +02:00
079df5a79b
Merge pull request #13992 from PeterKietzmann/pr_fix_minstd_sign
sys/random/minstd: fix signedness
2020-05-02 22:34:08 +02:00
Francois Berder
31cdcdd0a4 sys/shell: commands: Check argc in _pm_handler
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-05-02 20:55:28 +01:00
PeterKietzmann
9c5759112e sys/random/minstd: remove vague description 2020-05-01 17:30:36 +02:00
PeterKietzmann
090efc10de sys/random/minstd: fix signedness 2020-05-01 17:30:36 +02:00
benpicco
f42b4b4d2f
Merge pull request #13722 from jue89/feature/ztimer_pm-layered
sys/ztimer: add power management for ztimer clocks
2020-05-01 14:12:45 +02:00
benpicco
ee7ec7e3ac
Merge pull request #13978 from maribu/fix_pm_off
sys/pm: Fix behavior of fallback pm_off() implementation
2020-05-01 14:09:48 +02:00
Benjamin Valentin
e5c20b143d nanocoap: add coap_payload_put_char() 2020-05-01 13:58:22 +02:00
Benjamin Valentin
2751708341 nanocoap: add payload helper functions
This adds two functions `coap_payload_add()` and `coap_payload_advance()`.

 - `coap_payload_add()` will add n bytes to the payload buffer and advance
    payload pointer accordingly.

    const char hello[] = "Hello CoAP!";
    coap_payload_add(pkt, hello, sizeof(hello));

 - `coap_payload_advance()` will advance the payload buffer after data
    has been added to it.

    int len = snprintf(pkt->payload, pkt->payload_len, "%s %s!", "Hello", "CoAP");
    coap_payload_advance(pkt, len);

I considered adding an additional parameter to keep track of the total request size
(returned size from coap_opt_finish() incremented by each added payload fragment),
but decided against it to keep consistency with the existing API.
2020-05-01 13:58:22 +02:00
Francisco Molina
46a2d9b9ab
sys/include/xtimer.h: include board.h with ztimer 2020-04-30 11:46:11 +02:00
Francisco
80b300289d
Merge pull request #13912 from benpicco/at86rf215-mr-qpsk
drivers/at86rf215: implement MR-O-QPSK
2020-04-29 12:44:00 +02:00
Marian Buschsieweke
a3e7abc2e2
sys/pm: Fix behavior of fallback pm_off() implementation
- pm_off() should prevent other threads from getting executed after it is
  called, as it should turn off the MCU completely according to its doc
    - Previously, the fallback implementation would still allow other threads
      to continue working
    - Simply disabling IRQs and never enabling them again should make sure
      the MCU behaves like it would be completely off
- pm_off() should reduce the power consumption as much as possible
    - Previously, when IRQs came after the call to pm_set_lowest() in the
      fallback implementation of pm_off(), `while(1) {}` got executed at full
      power consumption
    - Just calling `pm_set(0);` in a loop while make sure that lowest power mode
      is restored if the MCU wakes up again.
    - The check if the lowest power mode is available is skipped, as no code
      gets executed afterwards anyway
2020-04-29 12:08:12 +02:00
Marian Buschsieweke
f6873dbac3
sys/pm: Add pm_get_blocker()
Provide access to pm_blocker via a well-defined API rather than hacks.
2020-04-29 11:21:03 +02:00
Juergen Fitschen
73e22612e2 sys/ztimer: add power management for ztimer clocks 2020-04-29 10:55:10 +02:00
Benjamin Valentin
6ce0092982 shell/sc_gnrc_netif: fix vera++ errors 2020-04-29 10:41:37 +02:00
Benjamin Valentin
504d02038d gnrc_netif: update PDU after changing PHY mode 2020-04-29 10:41:37 +02:00
Benjamin Valentin
c77119957f shell/sc_gnrc_netif: fix space after NID
All option have a space behind them. This fixes the formatting of the
NID parameter if there are options after it.
2020-04-29 10:41:37 +02:00
Benjamin Valentin
fac35644d0 ieee802154: add definitions & config options for MR-O-QPSK
Define options for IEEE 802.15.4g MR-O-QPSK as well as shell commands
to set them via ifconfig.
2020-04-29 10:41:37 +02:00
Thomas Stilwell
325ab426d4
sys/shell/commands: pm: add set mode block mode unblock mode 2020-04-28 16:56:34 +02:00
Thomas Stilwell
7c82ac6838
sys/shell/commands: add pm show command to view current blockers 2020-04-28 16:51:23 +02:00
Martine Lenders
633d0f486d
Merge pull request #13669 from bergzand/pr/netif/async_events
gnrc_netif: Add support for internal event loop
2020-04-28 13:03:39 +02:00
943450a567
Merge pull request #13959 from leandrolanzieri/pr/nanocoap/kconfig/add_type
nanocoap/kconfig: Explicitly define type of MODULE_NANOCOAP
2020-04-28 12:48:47 +02:00
Francisco Molina
da7e14dc66
sys/ztimer/auto_init: fix rtt auto_init 2020-04-28 09:11:44 +02:00
Leandro Lanzieri
b91c8502dc
net/nanocoap/kconfig: Explicitly define type of MODULE_NANOCOAP 2020-04-27 10:06:01 +02:00
Martine S. Lenders
cb8a6c36b0
gnrc_ipv6_nib: 6ln: use interface-specific DR for address registration
With multiple 6LoWPAN interfaces the router for the given interface
—the one the triggering RA came over—should be used to register the
address with.

Co-Authored-By: Benjamin Valentin <benpicco@googlemail.com>
2020-04-25 01:20:55 +02:00
Martine S. Lenders
245c04f368
gnrc_ipv6_nib: internal: add capability to search DR by interface
Co-Authored-By: Benjamin Valentin <benpicco@googlemail.com>
2020-04-24 17:57:09 +02:00
Leandro Lanzieri
eeea9b7dae
net/coap: Expose configurations to Kconfig 2020-04-24 10:06:45 +02:00
Leandro Lanzieri
9e427e1584
net/coap: Move COAP_MAX_RETRANSMIT to 'CONFIG' namespace
COAP_MAX_RETRANSMIT is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:43 +02:00
Leandro Lanzieri
afe4244ac9
net/coap: Move COAP_RANDOM_FACTOR_1000 to 'CONFIG' namespace
COAP_RANDOM_FACTOR_1000 is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:43 +02:00
Leandro Lanzieri
072a0d8563
net/coap: Move COAP_ACK_TIMEOUT to 'CONFIG' namespace
COAP_ACK_TIMEOUT is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:40 +02:00
5e5ed8233d
Merge pull request #13922 from kaspar030/ztimer_rtt_maxval_fix
ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored
2020-04-23 18:42:00 +02:00
d8c129fc47 ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored
Previously, ztimer would happily set an absolute RTT alarm value that exceeds
RTT's maximum value (though not a longer interval), as the `val` was
simply added to `rtt_get_counter()`.
This commit ensures that the target value wraps around RTT_MAX_VALUE.

Fixes #13920.
2020-04-23 16:19:25 +02:00
Cenk Gündoğan
ea616abfda nanocoap: allow coap_opt_add_string() for zero-terminated strings 2020-04-22 12:28:48 +02:00