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

6742 Commits

Author SHA1 Message Date
Hauke Petersen
d9229af9d9 sys/fmt: move _is_digit and _is_upper to public API 2019-12-05 14:10:49 +01:00
Leandro Lanzieri
0673fce3c4 usbus/cdc/acm: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
f48bd7f9f3 usbus: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
731f27378b usb: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
d835c52a4b usb: Fix VID/PID macros documentation 2019-12-04 20:08:02 +01:00
MichelRottleuthner
272079c89e
Merge pull request #11992 from JulianHolzwarth/pr/xtimer_mutex_lock_timeout/first_fix
sys/xtimer/xtimer.c: _mutex_timeout() bug fix for race condition
2019-12-04 10:43:20 +01:00
bd254dfc63
Merge pull request #10741 from basilfx/feature/stdio_null
sys: stdio_null: add null driver
2019-12-03 18:08:26 +01:00
cd25e1c011 usbus_fmt: assert descr len matches claimed len
This commit adds runtime assertions to validate that the total length of
the configuration descriptor as communicated to the host device matches the
generated length of the configuration descriptor.
2019-12-03 15:07:42 +01:00
Martine Lenders
09c46e273d
Merge pull request #12845 from miri64/gnrc_sixlowpan_frag_rb/fix/rm-by-datagram-pkt-release
gnrc_sixlowpan_frag_rb: fix memory-leak in _rm_by_datagram()
2019-12-02 19:20:55 +01:00
7e165678fe
Merge pull request #12851 from leandrolanzieri/remove-ubjson
sys/ubjson: Remove module
2019-12-02 18:45:35 +01:00
9f1b84b51d
sys/progress_bar: add module for configurable progress bars 2019-12-02 16:48:16 +01:00
benpicco
900c6994af
Merge pull request #12855 from miri64/gnrc_gomach/fix/i12853
gnrc_gomac: don't use constant as argument for RTT callback
2019-12-02 15:10:40 +01:00
Martine Lenders
e1f81f02fd gnrc_gomac: don't use constant as argument for RTT callback
The RTT callback for a super-frame cycle uses the `arg` pointer to set
the message value that then is handed to the GoMacH thread. However,
in both instances the timer is scheduled the constant
`GNRC_GOMACH_EVENT_RTT_NEW_CYCLE` is provided. This means the argument
is not really necessary.
2019-12-02 08:14:55 +01:00
Juan Carrano
bea30c3f89 sys/ubjson: remove module.
The ubjson module has a number of quality defects and is unsafe.
Considering CBOR is popular, standarized and supported in RIOT and that
the ubjson implementation is a home-grown one whose API will likely be
unfamiliar to new users, I propose to delete it.

This removal, of course, dows not have to be NOW. We can deprecate it for
one or two releases before.

What's wrong with this module?

- Unsafe: the parsing is done recursively. This is embedded in the API, so it
  is not possible to fix it without changing the API. A document with too much
  nesting can cause a stack overflow.
- Does not validate writing: it is possible to produce invalid output. From
  the docs:
  > The library won't complain if you write multiple values that are not
  > inside an array or object. The result will just not be properly serialized.
- Poorly tested. As shown by #11702, #11703 the tests were not even detecting
  that a False was stored as True.
- In line with the previous remark, see
  68dc5b0d6e/tests/unittests/tests-ubjson/tests-ubjson.c (L66-L77)
  Why is the following code in the unit tests??
  ```c
    irq_disable();
    sched_set_status(data->main_thread, STATUS_PENDING);
  ```
- #2175 is still unfixed after 3.5 years.
- Code quality. The code has multiline macros that assign variables and
  return. See c332514875/sys/ubjson/ubjson-write.c (L34-L41)

Can we mark it as deprecated this release and sweep it in the following one?
2019-12-01 23:44:39 +01:00
Martine S. Lenders
3fe1bf59a4
gnrc_sixlowpan_frag_rb: fix memory-leak in _rm_by_datagram()
This fits with the semantics of this function which doesn't provide or
uses any state of the reassembly buffer provided by the user, but finds
the entry itself and then removes it. This gives the user no chance to
remove the packet in the reassembly buffer entry, so
`gnrc_sixlowpan_frag_rb_rm_by_datagram()` has to release the packet
(other than `gnrc_sixlowpan_frag_rb_remove()` where not releasing the
packet is desired as it might be handed up to an upper layer).
2019-11-29 15:38:13 +01:00
Francisco
b88e2ecb6d
Merge pull request #12471 from aabadie/pr/sys/suit_shell
sys/suit: sys/shell: examples/suit_update: add shell command for triggering suit updates
2019-11-29 13:32:23 +01:00
Leandro Lanzieri
8aa66e94ea net/gnrc/netif: Remove 'if' prefix from interface names 2019-11-29 10:22:00 +01:00
Leandro Lanzieri
5481124d86 shell/gnrc_netif: Use netif API 2019-11-29 10:22:00 +01:00
Leandro Lanzieri
7746ee0aa1 net/netopt: Fix NETOPT_CHANNEL_PAGE documentation. 2019-11-29 09:34:38 +01:00
2ff3d4cd8d
sys/shell: add suit shell command
This command allows for triggering an update from the device itself
2019-11-28 19:15:34 +01:00
560ee3bac9
suit: add helper function for triggering updates 2019-11-28 19:08:28 +01:00
Hauke Petersen
3a7b60e4d4 net/cord_epsim: adapt to gcoap API changes 2019-11-28 12:50:24 +01:00
Hauke Petersen
7b1217a529 net/cord_ep: adapt to gcoap API changes 2019-11-28 12:50:24 +01:00
Hauke Petersen
3fd8357071 net/gcoap: allow to pass user context to requests 2019-11-28 12:50:24 +01:00
Hauke Petersen
383f395af3 net/gcoap: pass memo to resp_handler directly 2019-11-28 12:48:37 +01:00
7d046b6b8d
Merge pull request #12831 from fjmolinas/pr_fix_interactive_sync_shell
autoinit: interactive sync if no shell% in USEMODULE
2019-11-28 08:47:20 +01:00
Leandro Lanzieri
2733ef45d7
Merge pull request #12798 from kb2ma/gcoap/init_delay
net/gcoap: add macro to delay initialization of gcoap
2019-11-28 05:10:43 +01:00
Ken Bannister
e873e5814a net/gcoap: add macro to delay initialization of gcoap 2019-11-27 17:56:55 -05:00
Francisco Molina
817df972b5 autoinit: interactive sync if no shell% 2019-11-27 23:19:48 +01:00
Francisco Molina
838a88f122 sys/shell/commands: add interactive_sync commands 2019-11-27 15:07:42 +01:00
JulianHolzwarth
7cd3e8b73e xtimer/xtimer.c:_mutex_timeout() improved
no longer into the "if" when the mutex is free
2019-11-27 14:49:16 +01:00
Pieter Willemsen
f3b13cf90c xtimer: check in timeout callback if thread blocked on mutex
Prevent a possible race condition when _mutex_timeout fires just after the
mutex was locked but before the xtimer was removed

The flow

int xtimer_mutex_lock_timeout(mutex_t *mutex, uint64_t timeout) {
   ...
    mutex_lock(mutex);
    /* mutex locked */
    /* _mutex_timeout fires and tries to remove thread from mutex queue */
    /* DEBUG: simulate callback call between lock and remove */
    xtimer_spin(xtimer_ticks_from_usec(timeout*2));
    xtimer_remove(&t);
    ...
}
2019-11-27 14:48:51 +01:00
MichelRottleuthner
bf676d4728
Merge pull request #11022 from jia200x/pr/gnrc_lorawan
gnrc_lorawan: add support for GNRC based LoRaWAN stack
2019-11-27 09:25:20 +01:00
Jose Alamos
43b7164796 gnrc_pktdump: add NETTYPE_LORAWAN 2019-11-26 21:52:06 +01:00
Jose Alamos
b3593e58cb sc_netif: add lorawan config commands to shell 2019-11-26 21:52:06 +01:00
Jose Alamos
d3777d8ed8 auto_init/netif: add gnrc_lorawan startup routine 2019-11-26 21:52:06 +01:00
Jose Alamos
2edaead13e gnrc_netif: add gnrc_lorawan adaption layer 2019-11-26 21:52:06 +01:00
Jose Alamos
39951b8f70 gnrc_lorawan: add initial support for LoRaWAN stack 2019-11-26 21:52:06 +01:00
Jose Alamos
e03f7278bc gnrc_netif.h: add lorawan component 2019-11-26 21:52:05 +01:00
Jose Alamos
a70b1858c4 netopt: add NETOPTs required for gnrc_lorawan 2019-11-26 21:52:05 +01:00
Jose Alamos
e8bf26f7f3 gnrc_nettype: add GNRC_NETTYPE_LORAWAN type 2019-11-26 21:52:05 +01:00
Jose Alamos
845944e092 gnrc_netif_lorawan: add headers 2019-11-26 21:52:05 +01:00
Jose Alamos
4192cd5578 gnrc_lorawan: add public headers 2019-11-26 21:52:05 +01:00
Bas Stottelaar
810a06903a sys: stdio_null: add null driver 2019-11-26 21:12:41 +01:00
Hauke Petersen
17b1b19fda net/gcoap: do not allocate RX buf on stack 2019-11-26 15:00:03 +01:00
46c3964ee8 sys/clif: use ARRAY_SIZE 2019-11-23 22:39:40 +01:00
2ea1b24eae sys/xtimer: fix typos 2019-11-23 22:39:38 +01:00
149a98a9aa sys/universal_address: fix typos 2019-11-23 22:39:38 +01:00
82a937a994 sys/ubjson: fix typos 2019-11-23 22:39:38 +01:00
42aad0d1ad sys/shell: fix typos 2019-11-23 22:39:38 +01:00
84f73274c0 sys/schedstatistics: fix typos 2019-11-23 22:39:38 +01:00
4763235ddb sys/puf_sram: fix typos 2019-11-23 22:39:38 +01:00
09748efc11 sys/posix: fix typos 2019-11-23 22:39:38 +01:00
a49acc9b3e sys/oneway-malloc: fix typos 2019-11-23 22:39:38 +01:00
d4f3747705 sys/net: fix typos 2019-11-23 22:39:38 +01:00
769f2b8363 sys/irq_handler: fix typos 2019-11-23 22:39:38 +01:00
61db4d9724 sys/include: fix typos 2019-11-23 22:39:37 +01:00
ec8a4ba3c2 sys/hashes: fix typos 2019-11-23 22:39:37 +01:00
caa3f9cf0d sys/evtimer: fix typos 2019-11-23 22:39:37 +01:00
b53a5d86da sys/embunit: fix typos 2019-11-23 22:39:37 +01:00
5afc15a701 sys/ecc: fix typos 2019-11-23 22:39:37 +01:00
3475542650 sys/crypto: fix typos 2019-11-23 22:39:37 +01:00
2127b94a7b sys/cpp11-compat: fix typos 2019-11-23 22:39:37 +01:00
2a27ef5d8f sys/clif: fix typos 2019-11-23 22:39:37 +01:00
c8b43b8ca4 sys/arduino: fix typos 2019-11-23 22:39:37 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
1f55cffcee
Merge pull request #12645 from aabadie/pr/tests/sys_crypto_remove_board_blacklist
tests/sys_crypto: remove use of BOARD_BLACKLIST variable
2019-11-23 06:48:29 +01:00
Marian Buschsieweke
16ee7aed32
Merge pull request #11350 from maribu/ina2xx
drivers/ina220: Changed to comply with RIOT's driver design goals & SAUL adaption
2019-11-22 23:36:50 +01:00
benpicco
d86ca37ed9
Merge pull request #12759 from miri64/bitfield/fix/bitorder
bitfield: unify order
2019-11-22 22:37:39 +01:00
Marian Buschsieweke
0a0c1697d7
drivers/ina2xx: Added SAUL integration 2019-11-22 20:29:53 +01:00
607aa6fbcd
sys/crypto/ocb: fix max data condition 2019-11-22 19:21:06 +01:00
Marian Buschsieweke
16ef0a7f30
Merge pull request #8383 from haukepetersen/opt_driver_bmx280spi
drivers/bmx280: reworked driver and added SPI mode
2019-11-22 17:06:12 +01:00
Hauke Petersen
b7f33bd84f drivers/bmx280: significant driver rework
bugs fixed:
- move global variables into device descriptor
- guard bus access (use acquire and release)

added functionality:
- enable SPI mode

structural improvements:
- reduce stack usage
- simplify the driver's structure
- centralize bus access code
- use assertions
- cleanup includes
- use shortcuts for bus access

style changes:
- fix line length
- cleanup and improve doxygen
- unify pointer notation (char *var over char* var)
- unify (error) return messages
- use `#ifdef MODULE_BME280` instead of `#if defined(BME..)`
- unify debug messages -> using `[bmx28] x: msg` scheme
2019-11-22 14:04:37 +01:00
Gunar Schorcht
4b92ce289b sys/arduino: compilation of Arduino libraries
To make it possible to use an Arduino library, a new pseudomodule arduino_lib is introduced. This pseudomodule enables implicitly module arduino but avoids that a sketch is required or generated and compiled. Thus, it is possible to compile and use a package or directory with some source files from an Arduino library in RIOT applications.
2019-11-21 19:13:14 +01:00
Gunar Schorcht
e942338f78 sys/arduino: add type definitions often used
boolean and byte are data types defined in Arduino.h and very often used in Arduino code.
2019-11-21 17:22:38 +01:00
4d84c4c495
Merge pull request #12764 from fjmolinas/pr_cpp_check_fix
dist/tools/cppcheck: fix all Cppcheck 1.82 errors
2019-11-21 16:25:10 +01:00
Gunar Schorcht
a05027cdba
Merge pull request #12523 from aabadie/pr/sys/arduino_pwm
sys/arduino: add implementation for analogWrite
2019-11-21 15:08:10 +01:00
Francisco Molina
fe180daa3b sys/include/net/gnrc/gomach.h: fix cpp preprocessorErrorDirective
Preprocesor fails to evaluate the if condicion on L91-92 because
RTT_FREQUENCY is not defined, and therefore a division by 0 occurs.
TO avoid this replicate the RTT_FREQUENCY undefined warning.
2019-11-21 11:58:07 +01:00
Francisco Molina
cc2c3a0163 pkg/ucglib/src/csrc/ucg_riotos.c: fix cpp.check shiftTooManyBitsSigned 2019-11-21 11:58:07 +01:00
Francisco Molina
cf3d584678 sys/cb_mux/cb_mux.c: fix cpp.check shiftTooManyBitsSigned 2019-11-21 11:58:07 +01:00
Francisco Molina
254b54847f shell/commands/sc_gnrc_rpl.c: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
Francisco Molina
ab16222c8b sys/net/routing/nhdp: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
Francisco Molina
bf3c722abc sys/net/network_layer: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
Francisco Molina
2c9abf0832 sys/cb_mux/cb_mux.c: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
Martine Lenders
a6623f834f bitfield: unify order
Currently the bitfield type mixes up the order of bits: While the byte
order is big-endian (most significant byte first), the bit order of each
single byte within the bitfield is little-endian (most significant bit
last). While this isn't a problem for most applications of the bitfield
type it becomes one when sending the bitfield over the network (as done
e.g. in the [ACKs of Selective Fragment Recovery][SFR-ACKs]).

This change unifies byte order and bit order to both be most
significant bX first.

[SFR-ACKs]: https://tools.ietf.org/html/draft-ietf-6lo-fragment-recovery-07
2019-11-20 18:53:11 +01:00
61c6b071b2
Merge pull request #12699 from basilfx/feature/netdev_tap_stack
netdev_tap: don't allocate DEBUG_EXTRA_STACKSIZE twice
2019-11-16 23:16:00 +01:00
0845cac3b8
sys/arduino: provide implementation for analogWrite 2019-11-15 17:51:45 +01:00
Leandro Lanzieri
39984b1f51 shell/gnrc_netif: Use ipv6_addr_split_int for prefix 2019-11-15 14:35:30 +01:00
Leandro Lanzieri
1d0f92203b shell/sntp: Adapt to change in ipv6_addr_split_iface 2019-11-15 14:09:32 +01:00
Leandro Lanzieri
edae993f63 shell/gnrc_icmpv6_echo: Adapt to change in ipv6_addr_split_iface 2019-11-15 14:02:50 +01:00
Leandro Lanzieri
3c89597c83 net/gnrc/tcp: Adapt to change in ipv6_addr_split_iface 2019-11-15 14:02:50 +01:00
Leandro Lanzieri
4d4f6ae1d6 net/ipv6: Return string pointer when splitting IPv6 interface.
Right now 'ipv6_addr_split_iface' assumes that the interface specifier
will always be a number (based on GNRC way of identifying interfaces),
but this may not be always the case.In order to be able to use the
Network Interface API, interfaces should be referred by their name.

This changes 'ipv6_addr_split_iface' so it returns a pointer to the
string that specifies the interface.
2019-11-15 14:02:50 +01:00
Francisco
2adc5a23c2
Merge pull request #12361 from haukepetersen/add_nimble_autoconn
pkg/nimble: add simple BLE connection manager: autoconn
2019-11-14 14:02:24 +01:00
Hauke Petersen
38d2690a37 shell/sc_nimble_netif: restrict when using autoconn 2019-11-13 12:59:35 +01:00
Hauke Petersen
b75418fff4 sys/auto_init: map SAUL init for qmc5883l 2019-11-13 12:56:26 +01:00
Hauke Petersen
a7d951a0d7 net/ble.h: add custom NDN support service UUID 2019-11-13 11:28:01 +01:00
Bas Stottelaar
229a01b60b netdev: don't allocate DEBUG_EXTRA_STACKSIZE twice 2019-11-12 20:00:05 +01:00
Martine Lenders
d33548243a
Merge pull request #12698 from miri64/gnrc_sixlowpan_frag_vrb/fix/empty-with-frag
gnrc_sixlowpan_frag_vrb: set src_len to 0 on remove
2019-11-12 18:42:10 +01:00
Martine Lenders
02295ce5c7
Merge pull request #12593 from miri64/gnrc_sixlowpan_frag_rb/enh/deletion-timer
gnrc_sixlowpan_frag_rb: allow for deletion timer after completion
2019-11-12 17:54:15 +01:00
Martine S. Lenders
e4d95c568b gnrc_sixlowpan_frag_vrb: set src_len to 0 on remove
45f7966 made the `src_len` field the "emptiness signifier" for the VRB.
However, when `gnrc_sixlowpan_frag` is compiled in, the remove function
`gnrc_sixlowpan_frag_vrb_rm()` does not set the `src_len` to zero,
resulting in already deleted entry to be recognized as non-empty.
2019-11-12 17:13:45 +01:00