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

21190 Commits

Author SHA1 Message Date
Yegor Yefremov
60f745a033 cpu/stm32_common: add support for uart_mode routine
Add support for specifying data bits, stop bits and parity at
runtime.

Introduce feature periph_uart_modecfg for uart_mode() till all
other CPUs implement it.

STM32 L1, F1, F2, F4 supports following modes:

* 7E1, 7E2
* 7O1, 7O2
* 8N1, 8N2
* 8E1, 8E2
* 8O1, 8O2

STM32 L0, L4, F0, F3, F7 supports following modes:

* 6E1, 6E2
* 6O1, 6O2
* 7E1, 7E2
* 7O1, 7O2
* 7N1, 7N2
* 8N1, 8N2
* 8E1, 8E2
* 8O1, 8O2

Use USART_CR1_M1 macro to detect 7-bit support because
even inside one family there could be devices that don't
support 7-bit mode. So just using a family macro is not
enough.

As stated in the datasheets for L0, L4, F0, F3, F7 devices,
data bits can only be changed when UART is disabled (UE=0).
Introduce uart_stop() routine to satisfy this requirement.

STM32 UART adds parity to the MSB of a byte to send. The same
also applies to the received bytes. As a result this bit must
be masked in order to get the pure data.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-01-31 14:15:20 +01:00
Yegor Yefremov
ddf19783d7 periph/uart: add support for enhanced serial settings
As suggested in PR#5899 add a routine uart_mode() that will
setup data bits, stop bits and parity at runtime.

uart.h provides a set of enums defining these settings and each
platform will override them to specify values corresponding to
its configuration registers.

The idea behind the enums is to specify default settings i.e. 8N1
through the 0 value item. Invoking uart_mode(uart, 0, 0, 0) will
setup 8N1 mode.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-01-31 14:15:11 +01:00
782b181b63
Merge pull request #10887 from aabadie/pr/make/distclean_cleanup
tests: remove leftover test targets in test application makefiles
2019-01-28 16:25:02 +01:00
Martine Lenders
caa1d0b8e5
Merge pull request #10755 from maribu/ltc4150-new
drivers/ltc4150: (Re-)implemented driver for the LTC4150 coulomb counter
2019-01-28 15:05:53 +01:00
Marian Buschsieweke
075ad47bb3
tests/driver_ltc4150: BOARD_INSUFFICIENT_MEMORY 2019-01-28 13:53:47 +01:00
Marian Buschsieweke
2ba57ac00c
tests/driver_ltc4150: Workarround for msp430
The msp430 toolchain is missing an `fputs()` implementation. This commit makes
them use the `printf("%s", str);` instead of `fputs(str, stdout);`, which is
semantically equivalent (but has more overhead).
2019-01-28 13:53:38 +01:00
Marian Buschsieweke
618e2e58d5
tests: Added test for ltc4150 driver 2019-01-28 13:50:42 +01:00
Marian Buschsieweke
db0c66e07f
drivers/ltc4150: Allow tracking last minute charge
Implemented an example `ltc4150_recorder_t` implementation as a proof of concept
for the recorder API.
2019-01-28 13:45:45 +01:00
Marian Buschsieweke
fa0d08a08b
boards/msba2: Added ltc4150 to saul_default 2019-01-28 13:45:08 +01:00
Marian Buschsieweke
c434c5cd3a
drivers/saul: Integrated ltc4150 2019-01-28 13:44:45 +01:00
Marian Buschsieweke
c00886ac39
drivers/ltc4150: (Re-)implemented LTC4150 driver
The LTC4150 is a coulomb counter (a.k.a. battery sensor or bidirectional
current sensor) that is used in the MSBA2 board and available for little money
as easy to use break out board.
2019-01-28 13:44:16 +01:00
Marian Buschsieweke
5acd87bf6f
tests/saul: Updated BOARD_INSUFFICIENT_MEMORY 2019-01-28 13:33:27 +01:00
Marian Buschsieweke
ac98c98a0d
drivers/saul: Added coulomb counter & ammeter 2019-01-28 13:33:18 +01:00
Marian Buschsieweke
cc0e6dc779
sys/phydat: Added unit Coulomb 2019-01-28 13:33:16 +01:00
Marian Buschsieweke
d180339e5a
sys/shell: Removed fragments of old driver
The shell handlers of the old, depreciated and removed LTC4150 driver are still
in place. This commit removes them
2019-01-28 13:33:14 +01:00
9bf82ecd16
tests/pkg_cmsis-dsp: remove useless test target 2019-01-28 10:26:36 +01:00
3ef9707e40
tests/cond_order: remove useless test target 2019-01-28 10:26:20 +01:00
Martine Lenders
579925b81d
Merge pull request #10879 from miri64/shell_commands/fix/nib-check-iface
sc_gnrc_ipv6_nib: check interface existence
2019-01-28 09:46:28 +01:00
Peter Kietzmann
7cd93e766b
Merge pull request #10885 from MrKevinWeiss/pr/copywrite
doc: Update copywrites it include HAW
2019-01-28 09:39:17 +01:00
Martine Lenders
28204e0a4f sc_gnrc_ipv6_nib: check interface existence
Currently an interface's existence is not checked when it is supplied
by the user with the `nib` command. This can lead to assertion errors
as soon as the generated entry tries to resolve an address or route
generated with that command and the network interface not being found.
2019-01-28 09:16:51 +01:00
MrKevinWeiss
957cc83cc6 doc: Update copywrites it include HAW 2019-01-28 09:08:50 +01:00
eb79ba0400
tests/pkg_lora-serialization: remove useless test target 2019-01-27 19:39:26 +01:00
Martine Lenders
bdd2d52fd5
Merge pull request #10797 from kaspar030/add_unaligned
sys: add unaligned.h (header for alignment safe value-from-pointer functions)
2019-01-26 13:09:20 +01:00
6cd81dbc87
Merge pull request #10865 from kaspar030/uncrustify_change_disable_hint
uncrustify: change en/disable markers
2019-01-25 22:40:02 +01:00
344af9c479 sys/checksum/fletcher32: make use of unaligned.h 2019-01-25 22:22:45 +01:00
c85d33f305 sys/include/unaligned: initial commit 2019-01-25 22:22:45 +01:00
Martine Lenders
c8dd8d114d
Merge pull request #10819 from miri64/doc/enh/paper
doc: add reference to RIOT paper
2019-01-25 21:33:47 +01:00
Martine Lenders
92b5ef594c doc: add reference to RIOT paper 2019-01-25 20:33:14 +01:00
Gaëtan Harter
6075727667
Merge pull request #10863 from aabadie/pr/gitignore_results
.gitignore: exclude results directory
2019-01-25 18:54:22 +01:00
Martine Lenders
2d54069f59
Merge pull request #10869 from gschorcht/gnrc_icmpv6_echo_fix
gnrc_icmpv6_echo: avoid crashing when pktbuf full
2019-01-25 18:33:07 +01:00
c55f7162f1
.gitignore: exclude results directory
This directory is created by the compile_and_test_for_board script when ran from RIOTBASE and no custom value is specified
2019-01-25 18:07:09 +01:00
b8565e492d
Merge pull request #10851 from miri64/tests/feat/gnrc_sixlowpan_frag-tests
tests: provide unittests for gnrc_sixlowpan_frag/rbuf
2019-01-25 17:55:28 +01:00
Martine Lenders
0941f7b23d
Merge pull request #9833 from aabadie/nrf52840-mdk
boards/nrf52840-mdk: initial support
2019-01-25 17:22:27 +01:00
674128ea27 boards/hifive1: adapt to RIOT uncrustify markers 2019-01-25 17:21:14 +01:00
99d7996982 uncrustify: change en/disable markers 2019-01-25 17:21:14 +01:00
Gunar Schorcht
c88838f391 gnrc_icmpv6_echo: avoid crashing when pktbuf full
Once the packet buffer is full on heavy network load, gnrc_netif_hdr_build may return NULL. In that case, the following unchecked access to hdr->data leads to a crash.
2019-01-25 17:10:57 +01:00
Marian Buschsieweke
370f33ab1f
Merge pull request #9806 from gschorcht/enc82j60_fix_9784
drivers/enc28j60: fix of #9784
2019-01-25 17:01:22 +01:00
Martine Lenders
7d9ef9f78c gnrc_sixlowpan_frag/rbuf: add offset assertion to rbuf_add()
`gnrc_sixlowpan_frag` internally derives the offset value directly
from the fragment header, so for normal usage within GNRC this
assertion is redundant, but to make the tests of `rbuf_add` 100%
water-tide I added it.
2019-01-25 16:57:09 +01:00
Martine Lenders
6ff06d3f41 tests: provide unittests for gnrc_sixlowpan_frag/rbuf
The reason I put these unittests into their own application is that I
intentionally wanted to test this module very isolated.
2019-01-25 16:57:09 +01:00
a12b61e9af
boards/nrf52840-mdk: initial support 2019-01-25 16:29:10 +01:00
Hauke Petersen
250b7cbbbf
Merge pull request #10621 from aabadie/pr/cpu/nrf_uart_rework
cpu/nrf5x: rework periph_uart driver to allow use of multiple UARTs with nrf52840
2019-01-25 16:27:06 +01:00
cee830bd97
Merge pull request #10868 from jia200x/pr/pkg_loramac_calibration
pkg/semtech-loramac: add timer calibration
2019-01-25 15:55:03 +01:00
Hauke Petersen
93e7d88f75
cpu/nrf5x: reworked and fixed UART driver 2019-01-25 15:52:25 +01:00
72f3f7d4f1
boards/nrf52840dk: add second UART interface
This commit also change the STDIO UART to use the UARTE device type (with EasyDMA)
2019-01-25 15:52:25 +01:00
cb8c2b759e
cpu/nrf52: use UARTE device type for nrf52840
This requires to implement the use of EasyDMA for this kind of peripheral
2019-01-25 15:52:25 +01:00
190d48c5d3
boards/nrf52840dk: configure uart flow control pins 2019-01-25 15:51:50 +01:00
336851e3bc
cpu/nrf52: add uart flow control on nrf52840 2019-01-25 15:51:50 +01:00
1be60741e3
boards/nrf52xxxdk: refactor UART config 2019-01-25 15:51:50 +01:00
8e8f48f75e
cpu/nrf52: add multi UART support for nrf52840 2019-01-25 15:51:49 +01:00
Martine Lenders
892c7a5430
Merge pull request #10866 from miri64/gnrc_sixlowpan/fix/type-finding-loop
gnrc_sixlowpan: stop type-finding loop when type is found
2019-01-25 14:38:34 +01:00