cc2538: uart: Fix crippled output occurring upon lpm_enter()

lpm_enter() must not enter LPM1+ if the UART TX FIFO is not empty. Otherwise,
the UART clock gets disabled, and its TX is broken.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: spi: Do not call SPI_WAITFOREORx() at end of init

If the SSI has never been used and spi_init() is called, then the SSI receive
FIFO is empty and remains so, so calling SPI_WAITFOREORx() at the end of
spi_init() waits endlessly for SSI_SR.RNE to be set. Hence, this call must be
removed in order to avoid a deadlock.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: spi: Include spi-arch.h before dev/spi.h

spi-arch.h configures dev/spi.h, so it must be #included first. Luckily, this
mistake did not have any consequence here, but fix it in order to avoid possible
future issues.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: spi: Add format configuration options

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: sys_ctrl: Make it possible to use the 32-kHz crystal

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: Add adc driver and example

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: Add crypto drivers and examples for AES-CCM and SHA-256

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: Generate .hex output

ELF files generated by GCC make SmartRF Flash Programmer 2 crash (only the TI
format is supported by this tool for ELFs), and binary files are not very
appropriate because they are gapless, so generate Intel HEX files since these
are very well supported by most programming tools while still flexible.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538: Make it possible to use a custom linker script

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
cc2538dk: Make it possible to override UIP_CONF_TCP_MSS

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
csma: Initialize sequence number with random value

According to IEEE 802.15.4 (§5.1.6.1, §6.4.2), the MAC sequence numbers should
be initialized to random values. This was already the case in
framer-802154.c:create(), but not in csma.c:send_packet(), sometime causing
false detections of duplicate MAC-layer packets in other devices when a device
was restarted too quickly. This patch decreases the probability of such an
event.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rdc: duplicate packets: Keep only the last sequence number for each address

According to IEEE 802.15.4e (§6.4.3.9), in order to detect duplicate received
MAC-layer frames, only the most recently received frame's sequence number needs
to be stored for each unique device address. Doing so limits the possible false
duplicate packet detections to a single sequence number. This also allows to
keep the last sequence number of more device addresses for the same value of
MAX_SEQNOS.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Merge branch 'mist' into qidevices

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>