From fdda97a36b2f63d84eac45c181c8864206eef128 Mon Sep 17 00:00:00 2001 From: Raj Manvar Date: Wed, 17 Feb 2016 16:21:03 +0530 Subject: [PATCH] header file include guards repaired --- .gitignore | 7 + .travis.yml | 40 +-- boards/chronos/include/board.h | 6 +- boards/msb-430/include/board.h | 6 +- boards/msb-430h/include/board.h | 6 +- boards/telosb/include/board.h | 6 +- boards/wsn430-v1_3b/include/board.h | 6 +- boards/wsn430-v1_4/include/board.h | 6 +- boards/z1/include/board.h | 6 +- core/include/atomic.h | 6 +- core/include/attributes.h | 6 +- core/include/bitarithm.h | 6 +- core/include/byteorder.h | 6 +- core/include/irq.h | 6 +- core/include/kernel.h | 6 +- core/include/lifo.h | 6 +- core/include/lpm.h | 6 +- core/include/msg.h | 6 +- core/include/mutex.h | 6 +- core/include/tcb.h | 6 +- cpu/atmega2560/include/cpu_conf.h | 6 +- cpu/atmega_common/avr-libc-extra/errno.h | 4 +- cpu/atmega_common/include/cpu.h | 6 +- cpu/cc2538/include/cpu_conf.h | 6 +- cpu/cortexm_common/include/core_cm0.h | 6 +- cpu/cortexm_common/include/core_cm0plus.h | 6 +- cpu/cortexm_common/include/core_cm3.h | 6 +- cpu/cortexm_common/include/core_cm4.h | 6 +- cpu/cortexm_common/include/core_cm7.h | 6 +- cpu/cortexm_common/include/core_cmFunc.h | 6 +- cpu/cortexm_common/include/core_cmInstr.h | 6 +- cpu/cortexm_common/include/core_cmSimd.h | 6 +- cpu/ezr32wg/include/ezr32wg330f256r60.h | 6 +- cpu/k64f/include/cpu_conf.h | 6 +- cpu/kinetis_common/include/mcg.h | 6 +- cpu/kw2x/include/cpu_conf.h | 6 +- cpu/lpc11u34/include/LPC11Uxx.h | 6 +- cpu/lpc11u34/include/cpu_conf.h | 6 +- cpu/lpc1768/include/LPC17xx.h | 6 +- cpu/lpc1768/include/cpu_conf.h | 6 +- cpu/lpc2387/include/cpu.h | 6 +- cpu/lpc2387/include/i2c.h | 6 +- cpu/lpc2387/include/lpc2387.h | 6 +- cpu/native/include/clang_compat.h | 2 +- cpu/native/include/periph_conf.h | 8 + cpu/native/periph/timer.c | 10 +- cpu/nrf51/include/cpu_conf.h | 6 +- cpu/nrf51/include/nrf51_bitfields.h | 4 +- cpu/sam3/include/cpu_conf.h | 6 +- cpu/sam3/include/sam3x8e.h | 6 +- cpu/samd21/include/cpu_conf.h | 6 +- cpu/samd21/include/samd21.h | 4 +- cpu/saml21/include/atmel/saml21e15a.h | 4 +- cpu/saml21/include/atmel/saml21e16a.h | 4 +- cpu/saml21/include/atmel/saml21e17a.h | 4 +- cpu/saml21/include/atmel/saml21g16a.h | 4 +- cpu/saml21/include/atmel/saml21g17a.h | 4 +- cpu/saml21/include/atmel/saml21g18a.h | 4 +- cpu/saml21/include/atmel/saml21j16a.h | 4 +- cpu/saml21/include/atmel/saml21j17a.h | 4 +- cpu/saml21/include/atmel/saml21j18a.h | 4 +- cpu/saml21/include/cpu_conf.h | 6 +- cpu/stellaris_common/include/cortex-m4-def.h | 6 +- cpu/stellaris_common/include/hw_adc.h | 6 +- cpu/stellaris_common/include/hw_gpio.h | 6 +- cpu/stellaris_common/include/hw_hibernate.h | 6 +- cpu/stellaris_common/include/hw_i2c.h | 6 +- cpu/stellaris_common/include/hw_ints.h | 6 +- cpu/stellaris_common/include/hw_memmap.h | 6 +- cpu/stellaris_common/include/hw_nvic.h | 6 +- cpu/stellaris_common/include/hw_pwm.h | 6 +- cpu/stellaris_common/include/hw_ssi.h | 6 +- cpu/stellaris_common/include/hw_sysctl.h | 6 +- cpu/stellaris_common/include/hw_sysexc.h | 6 +- cpu/stellaris_common/include/hw_timer.h | 6 +- cpu/stellaris_common/include/hw_types.h | 6 +- cpu/stellaris_common/include/hw_uart.h | 6 +- cpu/stellaris_common/include/hw_watchdog.h | 6 +- .../include/stellaris_periph/adc.h | 6 +- .../include/stellaris_periph/comp.h | 6 +- .../include/stellaris_periph/cpu.h | 6 +- .../include/stellaris_periph/fpu.h | 6 +- .../include/stellaris_periph/gpio.h | 6 +- .../include/stellaris_periph/hibernate.h | 6 +- .../include/stellaris_periph/i2c.h | 6 +- .../include/stellaris_periph/interrupt.h | 6 +- .../include/stellaris_periph/pin_map.h | 6 +- .../include/stellaris_periph/pwm.h | 6 +- .../include/stellaris_periph/rom.h | 6 +- .../include/stellaris_periph/rom_map.h | 6 +- .../include/stellaris_periph/ssi.h | 6 +- .../include/stellaris_periph/sysctl.h | 6 +- .../include/stellaris_periph/sysexc.h | 6 +- .../include/stellaris_periph/systick.h | 6 +- .../include/stellaris_periph/timer.h | 6 +- .../include/stellaris_periph/uart.h | 6 +- .../include/stellaris_periph/watchdog.h | 6 +- cpu/stm32f0/include/cpu_conf.h | 6 +- cpu/stm32f0/include/stm32f051x8.h | 6 +- cpu/stm32f0/include/stm32f091xc.h | 6 +- cpu/stm32f1/include/cpu_conf.h | 6 +- cpu/stm32f1/include/stm32f10x.h | 6 +- cpu/stm32f3/include/cpu_conf.h | 6 +- cpu/stm32f3/include/stm32f303xc.h | 6 +- cpu/stm32f3/include/stm32f303xe.h | 6 +- cpu/stm32f3/include/stm32f334x8.h | 6 +- cpu/stm32f4/include/cpu_conf.h | 6 +- cpu/stm32f4/include/stm32f401xe.h | 6 +- cpu/stm32f4/include/stm32f407xx.h | 6 +- cpu/stm32f4/include/stm32f415xx.h | 6 +- cpu/stm32l1/include/stm32l1xx.h | 6 +- cpu/x86/include/x86_pci_init.h | 4 +- dist/tools/travis-scripts/build_and_test.sh | 2 +- drivers/kw2xrf/kw2xrf.c | 4 +- pkg/ccn-lite/Makefile | 4 +- pkg/oonf_api/Makefile | 33 +-- release-notes.txt | 227 ++++++++++++++++++ sys/include/net/gnrc/ipv6/netif.h | 2 + .../gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c | 7 + .../ipv6/netif/gnrc_ipv6_netif.c | 5 +- .../sixlowpan/nd/gnrc_sixlowpan_nd.c | 7 +- .../gnrc/pktbuf_static/gnrc_pktbuf_static.c | 6 +- sys/net/gnrc/routing/rpl/gnrc_rpl.c | 3 +- .../routing/rpl/gnrc_rpl_control_messages.c | 3 +- sys/net/network_layer/fib/fib.c | 19 ++ sys/posix/include/sys/socket.h | 2 +- sys/shell/commands/sc_fib.c | 10 + sys/shell/commands/sc_ipv6_nc.c | 2 +- tests/fault_handler/Makefile | 4 + tests/msg_send_receive/Makefile | 2 - tests/msg_send_receive/main.c | 6 +- tests/unittests/tests-pktbuf/tests-pktbuf.c | 22 ++ tests/vtimer_msg/Makefile | 6 - tests/vtimer_msg/main.c | 125 ---------- tests/vtimer_msg_diff/Makefile | 9 - tests/vtimer_msg_diff/main.c | 123 ---------- tests/xtimer_hang/main.c | 2 +- tests/xtimer_now64_continuity/Makefile | 8 + tests/xtimer_now64_continuity/README.md | 5 + tests/xtimer_now64_continuity/main.c | 49 ++++ 140 files changed, 742 insertions(+), 638 deletions(-) delete mode 100644 tests/vtimer_msg/Makefile delete mode 100644 tests/vtimer_msg/main.c delete mode 100644 tests/vtimer_msg_diff/Makefile delete mode 100644 tests/vtimer_msg_diff/main.c create mode 100644 tests/xtimer_now64_continuity/Makefile create mode 100644 tests/xtimer_now64_continuity/README.md create mode 100644 tests/xtimer_now64_continuity/main.c diff --git a/.gitignore b/.gitignore index 52e3545a550d5..31f7912bb8581 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ _sketches.cpp Makefile.local # downloaded package sources +pkg/ccn-lite/ccn-lite pkg/cmsis-dsp/cmsis-dsp pkg/libcoap/libcoap pkg/libfixmath/libfixmath @@ -52,3 +53,9 @@ pkg/wakaama/wakaama # Vagrant .vagrant + +# clang-complete command line argument lists (Vim: clang-complete, Atom: linter-clang, autocomplete-clang addons) +.clang_complete +# YouCompleteMe (https://github.com/Valloric/YouCompleteMe) +.ycm_extra_conf.py +.ycm_extra_conf.pyc diff --git a/.travis.yml b/.travis.yml index 6f6c8e290d205..01e57f2cdb6b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,35 +1,37 @@ -language: c +sudo: required +dist: trusty + +language: generic cache: apt env: - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=static-tests - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m4_2 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m4_1 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m0_2 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m0_1 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=x86 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m3_2 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m3_1 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=avr8 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=msp430 - - NPROC_MAX=8 BUILDTEST_MCU_GROUP=arm7 + global: + - NPROC_MAX=8 + matrix: + - BUILDTEST_MCU_GROUP=static-tests + - BUILDTEST_MCU_GROUP=cortex_m4_2 + - BUILDTEST_MCU_GROUP=cortex_m4_1 + - BUILDTEST_MCU_GROUP=cortex_m0_2 + - BUILDTEST_MCU_GROUP=cortex_m0_1 + - BUILDTEST_MCU_GROUP=x86 + - BUILDTEST_MCU_GROUP=cortex_m3_2 + - BUILDTEST_MCU_GROUP=cortex_m3_1 + - BUILDTEST_MCU_GROUP=avr8 + - BUILDTEST_MCU_GROUP=msp430 + - BUILDTEST_MCU_GROUP=arm7 before_install: - source ./dist/tools/pr_check/check_labels.sh - test -z "$TRAVIS_PULL_REQUEST" || test "$BUILDTEST_MCU_GROUP" = "static-tests" || check_gh_label "Ready for CI build" || exit 1 - - echo 'deb http://us.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse' | sudo tee /etc/apt/sources.list.d/trusty.list > /dev/null - - echo 'deb http://us.archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/trusty.list > /dev/null - - echo 'deb http://us.archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/trusty.list > /dev/null - - echo 'deb http://us.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/trusty.list > /dev/null - sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded - - sudo apt-get update + - sudo apt-get update -qq install: - - > - sudo apt-get install $(./dist/tools/travis-scripts/get-pkg-list.py) + - sudo apt-get -y install $(./dist/tools/travis-scripts/get-pkg-list.py) - git config --global user.email "travis@example.com" - git config --global user.name "Travis CI" + - test "$TRAVIS_BRANCH" = "master" || git fetch origin $TRAVIS_BRANCH:$TRAVIS_BRANCH script: - ./dist/tools/travis-scripts/build_and_test.sh diff --git a/boards/chronos/include/board.h b/boards/chronos/include/board.h index 81b26d7bb4ba4..76dc7cf618b23 100644 --- a/boards/chronos/include/board.h +++ b/boards/chronos/include/board.h @@ -18,8 +18,8 @@ * @author unknwon */ -#ifndef CHRONOS_BOARD_H_ -#define CHRONOS_BOARD_H_ +#ifndef CHRONOS_BOARD_H +#define CHRONOS_BOARD_H #include @@ -64,5 +64,5 @@ extern "C" { } #endif -#endif /* _CHRONOS_BOARD_H_ */ +#endif /* CHRONOS_BOARD_H */ /** @} */ diff --git a/boards/msb-430/include/board.h b/boards/msb-430/include/board.h index 1cdd97214315d..c42781d6f6d36 100644 --- a/boards/msb-430/include/board.h +++ b/boards/msb-430/include/board.h @@ -23,8 +23,8 @@ * @author Freie Universität Berlin, Computer Systems & Telematics, FeuerWhere project */ -#ifndef MSB_BOARD_H_ -#define MSB_BOARD_H_ +#ifndef MSB_BOARD_H +#define MSB_BOARD_H #include "board-conf.h" @@ -82,4 +82,4 @@ extern "C" { #include "board-conf.h" /** @} */ -#endif /* MSB_BOARD_H_ */ +#endif /* MSB_BOARD_H */ diff --git a/boards/msb-430h/include/board.h b/boards/msb-430h/include/board.h index db1bee86a62e6..7a440ca1bc953 100644 --- a/boards/msb-430h/include/board.h +++ b/boards/msb-430h/include/board.h @@ -19,8 +19,8 @@ * @author Hauke Petersen */ -#ifndef MSB_BOARD_H_ -#define MSB_BOARD_H_ +#ifndef MSB_BOARD_H +#define MSB_BOARD_H #ifdef __cplusplus extern "C" { @@ -76,4 +76,4 @@ extern "C" { #include "board-conf.h" /** @} */ -#endif /* MSB_BOARD_H_ */ +#endif /* MSB_BOARD_H */ diff --git a/boards/telosb/include/board.h b/boards/telosb/include/board.h index 208a3d3af8ac2..6f780734b151d 100644 --- a/boards/telosb/include/board.h +++ b/boards/telosb/include/board.h @@ -25,8 +25,8 @@ * @author Hauke Petersen */ -#ifndef TELOSB_BOARD_H_ -#define TELOSB_BOARD_H_ +#ifndef TELOSB_BOARD_H +#define TELOSB_BOARD_H #ifdef __cplusplus extern "C" { @@ -90,4 +90,4 @@ extern "C" { #include /** @} */ -#endif /* TELOSB_BOARD_H_ */ +#endif /* TELOSB_BOARD_H */ diff --git a/boards/wsn430-v1_3b/include/board.h b/boards/wsn430-v1_3b/include/board.h index 6c038c7f02282..662401d048db4 100644 --- a/boards/wsn430-v1_3b/include/board.h +++ b/boards/wsn430-v1_3b/include/board.h @@ -25,8 +25,8 @@ * @author Hauke Petersen */ -#ifndef WSN_BOARD_H_ -#define WSN_BOARD_H_ +#ifndef WSN_BOARD_H +#define WSN_BOARD_H #include "board-conf.h" @@ -92,4 +92,4 @@ extern "C" { #include /** @} */ -#endif /* WSN_BOARD_H_ */ +#endif /* WSN_BOARD_H */ diff --git a/boards/wsn430-v1_4/include/board.h b/boards/wsn430-v1_4/include/board.h index 04c04adf24563..bf6721830dd75 100644 --- a/boards/wsn430-v1_4/include/board.h +++ b/boards/wsn430-v1_4/include/board.h @@ -25,8 +25,8 @@ * @author Hauke Petersen */ -#ifndef WSN_BOARD_H_ -#define WSN_BOARD_H_ +#ifndef WSN_BOARD_H +#define WSN_BOARD_H #include "board-conf.h" @@ -92,4 +92,4 @@ extern "C" { #include /** @} */ -#endif /* WSN_BOARD_H_ */ +#endif /* WSN_BOARD_H */ diff --git a/boards/z1/include/board.h b/boards/z1/include/board.h index 9d6fa6964b5b9..f9050d437b83d 100644 --- a/boards/z1/include/board.h +++ b/boards/z1/include/board.h @@ -7,8 +7,8 @@ * directory for more details. */ -#ifndef Z1_BOARD_H_ -#define Z1_BOARD_H_ +#ifndef Z1_BOARD_H +#define Z1_BOARD_H /** * @defgroup boards_z1 Zolertia Z1 @@ -109,4 +109,4 @@ extern "C" { #endif /** @} */ -#endif /* Z1_BOARD_H_ */ +#endif /* Z1_BOARD_H */ diff --git a/core/include/atomic.h b/core/include/atomic.h index 5fb20fc1d0ada..aa56c4f9dc59a 100644 --- a/core/include/atomic.h +++ b/core/include/atomic.h @@ -18,8 +18,8 @@ * @author Joakim Nohlgård */ -#ifndef ATOMIC_H_ -#define ATOMIC_H_ +#ifndef ATOMIC_H +#define ATOMIC_H #ifdef __cplusplus extern "C" { @@ -146,5 +146,5 @@ static inline int atomic_set_to_zero(atomic_int_t *var) } #endif -#endif /* ATOMIC_H_ */ +#endif /* ATOMIC_H */ /** @} */ diff --git a/core/include/attributes.h b/core/include/attributes.h index 1de1cd2316b4c..fbdb4d8acd58b 100644 --- a/core/include/attributes.h +++ b/core/include/attributes.h @@ -16,8 +16,8 @@ * @author René Kijewski */ -#ifndef ATTRIBUTES_H_ -#define ATTRIBUTES_H_ +#ifndef ATTRIBUTES_H +#define ATTRIBUTES_H #include @@ -86,5 +86,5 @@ } #endif -#endif /* ATTRIBUTES_H_ */ +#endif /* ATTRIBUTES_H */ /** @} */ diff --git a/core/include/bitarithm.h b/core/include/bitarithm.h index 6a8521c0fb91a..bd2c6e5f14b40 100644 --- a/core/include/bitarithm.h +++ b/core/include/bitarithm.h @@ -17,8 +17,8 @@ * @author Martine Lenders */ -#ifndef BITARITHM_H_ -#define BITARITHM_H_ +#ifndef BITARITHM_H +#define BITARITHM_H #ifdef __cplusplus extern "C" { @@ -122,5 +122,5 @@ unsigned bitarithm_bits_set(unsigned v); } #endif -#endif /* BITARITHM_H_ */ +#endif /* BITARITHM_H */ /** @} */ diff --git a/core/include/byteorder.h b/core/include/byteorder.h index b081179472e7a..fc07c0e16cc99 100644 --- a/core/include/byteorder.h +++ b/core/include/byteorder.h @@ -16,8 +16,8 @@ * @author René Kijewski */ -#ifndef BYTEORDER_H_ -#define BYTEORDER_H_ +#ifndef BYTEORDER_H +#define BYTEORDER_H #include @@ -422,5 +422,5 @@ static inline uint64_t NTOHLL(uint64_t v) } #endif -#endif /* BYTEORDER_H_ */ +#endif /* BYTEORDER_H */ /** @} */ diff --git a/core/include/irq.h b/core/include/irq.h index facc04be0741f..7b6b53f23973c 100644 --- a/core/include/irq.h +++ b/core/include/irq.h @@ -18,8 +18,8 @@ * @author Freie Universität Berlin, Computer Systems & Telematics */ -#ifndef IRQ_H_ -#define IRQ_H_ +#ifndef IRQ_H +#define IRQ_H #include #include "arch/irq_arch.h" @@ -71,5 +71,5 @@ int inISR(void); } #endif -#endif /* IRQ_H_ */ +#endif /* IRQ_H */ /** @} */ diff --git a/core/include/kernel.h b/core/include/kernel.h index 4b22c397149b7..e9aa33beb9b14 100644 --- a/core/include/kernel.h +++ b/core/include/kernel.h @@ -19,8 +19,8 @@ * @author Kaspar Schleiser */ -#ifndef KERNEL_H_ -#define KERNEL_H_ +#ifndef KERNEL_H +#define KERNEL_H #include #include @@ -85,5 +85,5 @@ int reboot(int mode); } #endif -#endif /* KERNEL_H_ */ +#endif /* KERNEL_H */ /** @} */ diff --git a/core/include/lifo.h b/core/include/lifo.h index 93ba5411095e4..d6c9b8d9e3ca5 100644 --- a/core/include/lifo.h +++ b/core/include/lifo.h @@ -20,8 +20,8 @@ * If you insert a value twice the LIFO will break. */ -#ifndef LIFO_H_ -#define LIFO_H_ +#ifndef LIFO_H +#define LIFO_H #ifdef __cplusplus extern "C" { @@ -70,5 +70,5 @@ int lifo_get(int *array); } #endif -#endif /* LIFO_H_ */ +#endif /* LIFO_H */ /** @} */ diff --git a/core/include/lpm.h b/core/include/lpm.h index 24d7ee4d7f23d..055f93c6d821e 100644 --- a/core/include/lpm.h +++ b/core/include/lpm.h @@ -20,8 +20,8 @@ * @author Freie Universität Berlin, Computer Systems & Telematics */ -#ifndef LPM_H_ -#define LPM_H_ +#ifndef LPM_H +#define LPM_H #include "arch/lpm_arch.h" @@ -68,5 +68,5 @@ enum lpm_mode lpm_get(void); } #endif -#endif /* __LPM_H_ */ +#endif /* LPM_H */ /** @} */ diff --git a/core/include/msg.h b/core/include/msg.h index 274b0f427066a..7d41ce37a2c35 100644 --- a/core/include/msg.h +++ b/core/include/msg.h @@ -162,8 +162,8 @@ * @author Kévin Roussel */ -#ifndef MSG_H_ -#define MSG_H_ +#ifndef MSG_H +#define MSG_H #include #include @@ -379,5 +379,5 @@ int msg_init_queue(msg_t *array, int num); } #endif -#endif /* MSG_H_ */ +#endif /* MSG_H */ /** @} */ diff --git a/core/include/mutex.h b/core/include/mutex.h index 0e516bb0da4a0..f58a579beb897 100644 --- a/core/include/mutex.h +++ b/core/include/mutex.h @@ -18,8 +18,8 @@ * @author Kaspar Schleiser */ -#ifndef MUTEX_H_ -#define MUTEX_H_ +#ifndef MUTEX_H +#define MUTEX_H #include "priority_queue.h" #include "atomic.h" @@ -101,5 +101,5 @@ void mutex_unlock_and_sleep(mutex_t *mutex); } #endif -#endif /* MUTEX_H_ */ +#endif /* MUTEX_H */ /** @} */ diff --git a/core/include/tcb.h b/core/include/tcb.h index 41a803c5bf8a6..1b181929190fe 100644 --- a/core/include/tcb.h +++ b/core/include/tcb.h @@ -17,8 +17,8 @@ * @author Kaspar Schleiser */ -#ifndef TCB_H_ -#define TCB_H_ +#ifndef TCB_H +#define TCB_H #include #include "priority_queue.h" @@ -87,5 +87,5 @@ typedef struct tcb_t { } #endif -#endif /* TCB_H_ */ +#endif /* TCB_H */ /** @} */ diff --git a/cpu/atmega2560/include/cpu_conf.h b/cpu/atmega2560/include/cpu_conf.h index 0cdbd3005828a..1ef6bf9841ddc 100644 --- a/cpu/atmega2560/include/cpu_conf.h +++ b/cpu/atmega2560/include/cpu_conf.h @@ -16,8 +16,8 @@ * @author Hinnerk van Bruinehsen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #ifdef __cplusplus @@ -44,5 +44,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/atmega_common/avr-libc-extra/errno.h b/cpu/atmega_common/avr-libc-extra/errno.h index 01d40ee7740c5..a27fe7be8ea7a 100644 --- a/cpu/atmega_common/avr-libc-extra/errno.h +++ b/cpu/atmega_common/avr-libc-extra/errno.h @@ -29,8 +29,8 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __ERRNO_H_ -#define __ERRNO_H_ 1 +#ifndef ERRNO_H +#define ERRNO_H 1 /** * @addtogroup cpu_atmega_common diff --git a/cpu/atmega_common/include/cpu.h b/cpu/atmega_common/include/cpu.h index b7c7d83d2ff38..4be4234a4bcee 100644 --- a/cpu/atmega_common/include/cpu.h +++ b/cpu/atmega_common/include/cpu.h @@ -24,8 +24,8 @@ * @author Kaspar Schleiser */ -#ifndef __ATMEGA_COMMON_H -#define __ATMEGA_COMMON_H +#ifndef ATMEGA_COMMON_H +#define ATMEGA_COMMON_H #include #include @@ -83,5 +83,5 @@ static inline void cpu_print_last_instruction(void) } #endif -#endif /* __ATMEGA_COMMON_H */ +#endif /* ATMEGA_COMMON_H */ /** @} */ diff --git a/cpu/cc2538/include/cpu_conf.h b/cpu/cc2538/include/cpu_conf.h index 7b5a98532acb5..a0f158d606638 100644 --- a/cpu/cc2538/include/cpu_conf.h +++ b/cpu/cc2538/include/cpu_conf.h @@ -16,8 +16,8 @@ * @author Ian Martin */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "cc2538.h" #include "cc2538-gpio.h" @@ -52,5 +52,5 @@ extern "C" { } /* end extern "C" */ #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/cortexm_common/include/core_cm0.h b/cpu/cortexm_common/include/core_cm0.h index a78a2c3f6a865..92e38f3e64628 100644 --- a/cpu/cortexm_common/include/core_cm0.h +++ b/cpu/cortexm_common/include/core_cm0.h @@ -39,8 +39,8 @@ #pragma system_include /* treat file as system include file for MISRA check */ #endif -#ifndef __CORE_CM0_H_GENERIC -#define __CORE_CM0_H_GENERIC +#ifndef CORE_CM0_H_GENERIC +#define CORE_CM0_H_GENERIC #ifdef __cplusplus extern "C" { @@ -735,6 +735,6 @@ __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) } #endif -#endif /* __CORE_CM0_H_DEPENDANT */ +#endif /* CORE_CM0_H_DEPENDANT */ #endif /* __CMSIS_GENERIC */ diff --git a/cpu/cortexm_common/include/core_cm0plus.h b/cpu/cortexm_common/include/core_cm0plus.h index 1677999ccd16a..b1989742bbdda 100644 --- a/cpu/cortexm_common/include/core_cm0plus.h +++ b/cpu/cortexm_common/include/core_cm0plus.h @@ -39,8 +39,8 @@ #pragma system_include /* treat file as system include file for MISRA check */ #endif -#ifndef __CORE_CM0PLUS_H_GENERIC -#define __CORE_CM0PLUS_H_GENERIC +#ifndef CORE_CM0PLUS_H_GENERIC +#define CORE_CM0PLUS_H_GENERIC #ifdef __cplusplus extern "C" { @@ -849,6 +849,6 @@ __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) } #endif -#endif /* __CORE_CM0PLUS_H_DEPENDANT */ +#endif /* CORE_CM0PLUS_H_DEPENDANT */ #endif /* __CMSIS_GENERIC */ diff --git a/cpu/cortexm_common/include/core_cm3.h b/cpu/cortexm_common/include/core_cm3.h index 5b0fa193a2a0e..f2ed782b9cc7c 100644 --- a/cpu/cortexm_common/include/core_cm3.h +++ b/cpu/cortexm_common/include/core_cm3.h @@ -39,8 +39,8 @@ #pragma system_include /* treat file as system include file for MISRA check */ #endif -#ifndef __CORE_CM3_H_GENERIC -#define __CORE_CM3_H_GENERIC +#ifndef CORE_CM3_H_GENERIC +#define CORE_CM3_H_GENERIC #ifdef __cplusplus extern "C" { @@ -1688,6 +1688,6 @@ __STATIC_INLINE int32_t ITM_CheckChar (void) { } #endif -#endif /* __CORE_CM3_H_DEPENDANT */ +#endif /* CORE_CM3_H_DEPENDANT */ #endif /* __CMSIS_GENERIC */ diff --git a/cpu/cortexm_common/include/core_cm4.h b/cpu/cortexm_common/include/core_cm4.h index c15421cf17ec3..8d398eaa52755 100644 --- a/cpu/cortexm_common/include/core_cm4.h +++ b/cpu/cortexm_common/include/core_cm4.h @@ -39,8 +39,8 @@ #pragma system_include /* treat file as system include file for MISRA check */ #endif -#ifndef __CORE_CM4_H_GENERIC -#define __CORE_CM4_H_GENERIC +#ifndef CORE_CM4_H_GENERIC +#define CORE_CM4_H_GENERIC #ifdef __cplusplus extern "C" { @@ -1853,6 +1853,6 @@ __STATIC_INLINE int32_t ITM_CheckChar (void) { } #endif -#endif /* __CORE_CM4_H_DEPENDANT */ +#endif /* CORE_CM4_H_DEPENDANT */ #endif /* __CMSIS_GENERIC */ diff --git a/cpu/cortexm_common/include/core_cm7.h b/cpu/cortexm_common/include/core_cm7.h index 7adb52b94f1da..b674fa8bfa797 100644 --- a/cpu/cortexm_common/include/core_cm7.h +++ b/cpu/cortexm_common/include/core_cm7.h @@ -39,8 +39,8 @@ #pragma system_include /* treat file as system include file for MISRA check */ #endif -#ifndef __CORE_CM7_H_GENERIC -#define __CORE_CM7_H_GENERIC +#ifndef CORE_CM7_H_GENERIC +#define CORE_CM7_H_GENERIC #ifdef __cplusplus extern "C" { @@ -2392,6 +2392,6 @@ __STATIC_INLINE int32_t ITM_CheckChar (void) { } #endif -#endif /* __CORE_CM7_H_DEPENDANT */ +#endif /* CORE_CM7_H_DEPENDANT */ #endif /* __CMSIS_GENERIC */ diff --git a/cpu/cortexm_common/include/core_cmFunc.h b/cpu/cortexm_common/include/core_cmFunc.h index 749a7a7a3537e..2fab5e192c74c 100644 --- a/cpu/cortexm_common/include/core_cmFunc.h +++ b/cpu/cortexm_common/include/core_cmFunc.h @@ -35,8 +35,8 @@ ---------------------------------------------------------------------------*/ -#ifndef __CORE_CMFUNC_H -#define __CORE_CMFUNC_H +#ifndef CORE_CMFUNC_H +#define CORE_CMFUNC_H #ifdef __cplusplus extern "C" { @@ -675,4 +675,4 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fps } #endif -#endif /* __CORE_CMFUNC_H */ +#endif /* CORE_CMFUNC_H */ diff --git a/cpu/cortexm_common/include/core_cmInstr.h b/cpu/cortexm_common/include/core_cmInstr.h index ed8a6f3cc531f..6e701513ee24b 100644 --- a/cpu/cortexm_common/include/core_cmInstr.h +++ b/cpu/cortexm_common/include/core_cmInstr.h @@ -35,8 +35,8 @@ ---------------------------------------------------------------------------*/ -#ifndef __CORE_CMINSTR_H -#define __CORE_CMINSTR_H +#ifndef CORE_CMINSTR_H +#define CORE_CMINSTR_H #ifdef __cplusplus extern "C" { @@ -920,4 +920,4 @@ __attribute__((always_inline)) __STATIC_INLINE void __STRT(uint32_t value, volat } #endif -#endif /* __CORE_CMINSTR_H */ +#endif /* CORE_CMINSTR_H */ diff --git a/cpu/cortexm_common/include/core_cmSimd.h b/cpu/cortexm_common/include/core_cmSimd.h index 7b8e37fff6019..6616fea35f85e 100644 --- a/cpu/cortexm_common/include/core_cmSimd.h +++ b/cpu/cortexm_common/include/core_cmSimd.h @@ -39,8 +39,8 @@ #pragma system_include /* treat file as system include file for MISRA check */ #endif -#ifndef __CORE_CMSIMD_H -#define __CORE_CMSIMD_H +#ifndef CORE_CMSIMD_H +#define CORE_CMSIMD_H #ifdef __cplusplus extern "C" { @@ -694,4 +694,4 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMMLA (int32_t op1 } #endif -#endif /* __CORE_CMSIMD_H */ +#endif /* CORE_CMSIMD_H */ diff --git a/cpu/ezr32wg/include/ezr32wg330f256r60.h b/cpu/ezr32wg/include/ezr32wg330f256r60.h index e9754760db783..6b913b8d9c7d7 100644 --- a/cpu/ezr32wg/include/ezr32wg330f256r60.h +++ b/cpu/ezr32wg/include/ezr32wg330f256r60.h @@ -31,8 +31,8 @@ * *****************************************************************************/ -#ifndef __SILICON_LABS_EZR32WG330F256R60_H__ -#define __SILICON_LABS_EZR32WG330F256R60_H__ +#ifndef SILICON_LABS_EZR32WG330F256R60_H +#define SILICON_LABS_EZR32WG330F256R60_H #ifdef __cplusplus extern "C" { @@ -492,4 +492,4 @@ typedef enum IRQn #ifdef __cplusplus } #endif -#endif /* __SILICON_LABS_EZR32WG330F256R60_H__ */ +#endif /* SILICON_LABS_EZR32WG330F256R60_H */ diff --git a/cpu/k64f/include/cpu_conf.h b/cpu/k64f/include/cpu_conf.h index 49c11ed11643c..29b8c532b2789 100644 --- a/cpu/k64f/include/cpu_conf.h +++ b/cpu/k64f/include/cpu_conf.h @@ -21,8 +21,8 @@ * @author Johann Fischer */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #ifdef CPU_MODEL_MK64FN1M0VLL12 #include "MK64F12.h" @@ -94,5 +94,5 @@ extern "C" } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/kinetis_common/include/mcg.h b/cpu/kinetis_common/include/mcg.h index 7f32e952d44f0..05b84404a08ca 100644 --- a/cpu/kinetis_common/include/mcg.h +++ b/cpu/kinetis_common/include/mcg.h @@ -97,8 +97,8 @@ * @author Johann Fischer */ -#ifndef __MCG_CPU_H -#define __MCG_CPU_H +#ifndef MCG_CPU_H +#define MCG_CPU_H #include "cpu_conf.h" #include "periph_conf.h" @@ -131,7 +131,7 @@ int kinetis_mcg_set_mode(kinetis_mcg_mode_t mode); } #endif -#endif /* __MCG_CPU_H */ +#endif /* MCG_CPU_H */ /** @} */ #endif /* KINETIS_CPU_USE_MCG */ diff --git a/cpu/kw2x/include/cpu_conf.h b/cpu/kw2x/include/cpu_conf.h index a16f6f55dc47a..5e2ec661d5c37 100644 --- a/cpu/kw2x/include/cpu_conf.h +++ b/cpu/kw2x/include/cpu_conf.h @@ -22,8 +22,8 @@ * @author Johann Fischer */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #ifdef CPU_MODEL_KW21D256 #include "MKW22D5.h" @@ -125,5 +125,5 @@ extern "C" } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/lpc11u34/include/LPC11Uxx.h b/cpu/lpc11u34/include/LPC11Uxx.h index 35afda35118fc..fec3bc3f395dc 100644 --- a/cpu/lpc11u34/include/LPC11Uxx.h +++ b/cpu/lpc11u34/include/LPC11Uxx.h @@ -25,8 +25,8 @@ * */ -#ifndef __LPC11UXX_H__ -#define __LPC11UXX_H__ +#ifndef LPC11UXX_H +#define LPC11UXX_H #ifdef __cplusplus extern "C" { @@ -662,5 +662,5 @@ typedef struct { #endif -#endif // __LPC11UXX_H__ +#endif // LPC11UXX_H /** @} */ diff --git a/cpu/lpc11u34/include/cpu_conf.h b/cpu/lpc11u34/include/cpu_conf.h index f5d9fbeae1970..c4d3045097f2b 100644 --- a/cpu/lpc11u34/include/cpu_conf.h +++ b/cpu/lpc11u34/include/cpu_conf.h @@ -18,8 +18,8 @@ * @author Paul RATHGEB */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "LPC11Uxx.h" @@ -47,5 +47,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/lpc1768/include/LPC17xx.h b/cpu/lpc1768/include/LPC17xx.h index 952cb73c66c09..bc3f0c1a44886 100644 --- a/cpu/lpc1768/include/LPC17xx.h +++ b/cpu/lpc1768/include/LPC17xx.h @@ -23,8 +23,8 @@ ******************************************************************************/ -#ifndef __LPC17xx_H__ -#define __LPC17xx_H__ +#ifndef LPC17xx_H +#define LPC17xx_H #ifdef __cplusplus extern "C" { @@ -1044,4 +1044,4 @@ typedef struct } #endif -#endif // __LPC17xx_H__ +#endif // LPC17xx_H diff --git a/cpu/lpc1768/include/cpu_conf.h b/cpu/lpc1768/include/cpu_conf.h index 813f901731167..f3b26a579765c 100644 --- a/cpu/lpc1768/include/cpu_conf.h +++ b/cpu/lpc1768/include/cpu_conf.h @@ -18,8 +18,8 @@ * @author Hauke Petersen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "LPC17xx.h" @@ -40,5 +40,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/lpc2387/include/cpu.h b/cpu/lpc2387/include/cpu.h index fc8f179c4fe65..fddb45b025e6a 100644 --- a/cpu/lpc2387/include/cpu.h +++ b/cpu/lpc2387/include/cpu.h @@ -6,8 +6,8 @@ * directory for more details. */ -#ifndef __CPU_H -#define __CPU_H +#ifndef CPU_H +#define CPU_H /** * @defgroup lpc2387 NXP LPC2387 @@ -58,4 +58,4 @@ static inline void cpu_print_last_instruction(void) #endif /** @} */ -#endif /* __CPU_H */ +#endif /* CPU_H */ diff --git a/cpu/lpc2387/include/i2c.h b/cpu/lpc2387/include/i2c.h index c7e4aaaa65fcc..d8c8105d9576f 100644 --- a/cpu/lpc2387/include/i2c.h +++ b/cpu/lpc2387/include/i2c.h @@ -28,8 +28,8 @@ * @note $Id: i2c.h 3857 2013-09-02 18:11:27 kasmi $ */ -#ifndef __I2C_H -#define __I2C_H +#ifndef I2C_H +#define I2C_H #include #include @@ -334,4 +334,4 @@ void i2c_disable_pull_up_resistor(uint8_t i2c_interface); } #endif -#endif /* end __I2C_H */ +#endif /* end I2C_H */ diff --git a/cpu/lpc2387/include/lpc2387.h b/cpu/lpc2387/include/lpc2387.h index b2036bd0a57a9..a53863cfcbaec 100644 --- a/cpu/lpc2387/include/lpc2387.h +++ b/cpu/lpc2387/include/lpc2387.h @@ -8,8 +8,8 @@ * Parts taken from FeuerWhere-Project, lpc2387.h. */ -#ifndef __LPC2387_H -#define __LPC2387_H +#ifndef LPC2387_H +#define LPC2387_H #include "lpc23xx.h" #include "arm7_common.h" @@ -152,4 +152,4 @@ extern "C" { } #endif -#endif // __LPC2387_H +#endif // LPC2387_H diff --git a/cpu/native/include/clang_compat.h b/cpu/native/include/clang_compat.h index 1459d3a16b44d..3e16634c2a512 100644 --- a/cpu/native/include/clang_compat.h +++ b/cpu/native/include/clang_compat.h @@ -8,7 +8,7 @@ * directory for more details. */ -#ifndef __CLANG_COMPAT_H +#ifndef CLANG_COMPAT_H #ifdef __cplusplus extern "C" { diff --git a/cpu/native/include/periph_conf.h b/cpu/native/include/periph_conf.h index 9954cffbd0c16..55fb32f781829 100644 --- a/cpu/native/include/periph_conf.h +++ b/cpu/native/include/periph_conf.h @@ -54,6 +54,14 @@ */ #define XTIMER_OVERHEAD 14 #define XTIMER_USLEEP_UNTIL_OVERHEAD 1 + +/* timer_set_absolute() has a high margin for possible underflow if set with + * value not far in the future. To prevent this, we set high backoff values + * here. + */ +#define XTIMER_BACKOFF 200 +#define XTIMER_ISR_BACKOFF 200 + /** @} */ #ifdef __cplusplus diff --git a/cpu/native/periph/timer.c b/cpu/native/periph/timer.c index 3ce06baa74b59..c31ae52243443 100644 --- a/cpu/native/periph/timer.c +++ b/cpu/native/periph/timer.c @@ -135,15 +135,7 @@ int timer_set(tim_t dev, int channel, unsigned int offset) int timer_set_absolute(tim_t dev, int channel, unsigned int value) { uint32_t now = timer_read(dev); - int64_t target = (int32_t)(value - now); - - DEBUG("timer_set_absolute(): delta=%lli\n", target); - if (target < 0 && target > -NATIVE_TIMER_MIN_RES) { - DEBUG("timer_set_absolute(): preventing underflow.\n"); - target = NATIVE_TIMER_MIN_RES; - } - - return timer_set(dev, channel, target); + return timer_set(dev, channel, value - now); } int timer_clear(tim_t dev, int channel) diff --git a/cpu/nrf51/include/cpu_conf.h b/cpu/nrf51/include/cpu_conf.h index 6ac737870de2b..ea13378d0797d 100644 --- a/cpu/nrf51/include/cpu_conf.h +++ b/cpu/nrf51/include/cpu_conf.h @@ -16,8 +16,8 @@ * @author Hauke Petersen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "nrf51.h" #include "nrf51_bitfields.h" @@ -43,5 +43,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/nrf51/include/nrf51_bitfields.h b/cpu/nrf51/include/nrf51_bitfields.h index 1bcdb7269c194..55c76c5c7d168 100644 --- a/cpu/nrf51/include/nrf51_bitfields.h +++ b/cpu/nrf51/include/nrf51_bitfields.h @@ -27,8 +27,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -#ifndef __NRF51_BITS_H -#define __NRF51_BITS_H +#ifndef NRF51_BITS_H +#define NRF51_BITS_H #ifdef __cplusplus extern "C" { diff --git a/cpu/sam3/include/cpu_conf.h b/cpu/sam3/include/cpu_conf.h index 276fee53cc432..1ccfa9849e7df 100644 --- a/cpu/sam3/include/cpu_conf.h +++ b/cpu/sam3/include/cpu_conf.h @@ -18,8 +18,8 @@ * @author Hauke Petersen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "sam3x8e.h" @@ -45,5 +45,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/sam3/include/sam3x8e.h b/cpu/sam3/include/sam3x8e.h index 0df01ab684007..22e626b9a6783 100644 --- a/cpu/sam3/include/sam3x8e.h +++ b/cpu/sam3/include/sam3x8e.h @@ -27,8 +27,8 @@ * ---------------------------------------------------------------------------- */ -#ifndef _SAM3X8E_ -#define _SAM3X8E_ +#ifndef SAM3X8E_H +#define SAM3X8E_H /** \addtogroup cpu_sam3x8e_definitions SAM3X8E definitions This file defines all structures and symbols for SAM3X8E: @@ -579,4 +579,4 @@ void WDT_Handler ( void ); /*@}*/ -#endif /* _SAM3X8E_ */ +#endif /* SAM3X8E_H */ diff --git a/cpu/samd21/include/cpu_conf.h b/cpu/samd21/include/cpu_conf.h index edece7b3b55b7..ccf273d6e0c25 100644 --- a/cpu/samd21/include/cpu_conf.h +++ b/cpu/samd21/include/cpu_conf.h @@ -15,8 +15,8 @@ * @author Thomas Eichinger */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "samd21.h" @@ -42,5 +42,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/samd21/include/samd21.h b/cpu/samd21/include/samd21.h index 805b01e76efe2..2fbee93514e0d 100644 --- a/cpu/samd21/include/samd21.h +++ b/cpu/samd21/include/samd21.h @@ -41,8 +41,8 @@ * */ -#ifndef _SAMR21G18A_ -#define _SAMR21G18A_ +#ifndef SAMR21G18A_H +#define SAMR21G18A_H /** * \ingroup cpu_specific_SAMR21_definitions diff --git a/cpu/saml21/include/atmel/saml21e15a.h b/cpu/saml21/include/atmel/saml21e15a.h index 9b502c16354a5..383ab2ee6d893 100644 --- a/cpu/saml21/include/atmel/saml21e15a.h +++ b/cpu/saml21/include/atmel/saml21e15a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21E15A_ -#define _SAML21E15A_ +#ifndef SAML21E15A_H +#define SAML21E15A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21e16a.h b/cpu/saml21/include/atmel/saml21e16a.h index 488b73331bda9..07a881e981409 100644 --- a/cpu/saml21/include/atmel/saml21e16a.h +++ b/cpu/saml21/include/atmel/saml21e16a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21E16A_ -#define _SAML21E16A_ +#ifndef SAML21E16A_H +#define SAML21E16A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21e17a.h b/cpu/saml21/include/atmel/saml21e17a.h index f1251e0753ba3..32b005b772682 100644 --- a/cpu/saml21/include/atmel/saml21e17a.h +++ b/cpu/saml21/include/atmel/saml21e17a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21E17A_ -#define _SAML21E17A_ +#ifndef SAML21E17A_H +#define SAML21E17A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21g16a.h b/cpu/saml21/include/atmel/saml21g16a.h index a6dcda6888d65..3667e2e5d8541 100644 --- a/cpu/saml21/include/atmel/saml21g16a.h +++ b/cpu/saml21/include/atmel/saml21g16a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21G16A_ -#define _SAML21G16A_ +#ifndef SAML21G16A_H +#define SAML21G16A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21g17a.h b/cpu/saml21/include/atmel/saml21g17a.h index 1cb991433be49..17e671de812c8 100644 --- a/cpu/saml21/include/atmel/saml21g17a.h +++ b/cpu/saml21/include/atmel/saml21g17a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21G17A_ -#define _SAML21G17A_ +#ifndef SAML21G17A_H +#define SAML21G17A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21g18a.h b/cpu/saml21/include/atmel/saml21g18a.h index 884e97c5ce1b2..14530b3f85b0e 100644 --- a/cpu/saml21/include/atmel/saml21g18a.h +++ b/cpu/saml21/include/atmel/saml21g18a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21G18A_ -#define _SAML21G18A_ +#ifndef SAML21G18A_H +#define SAML21G18A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21j16a.h b/cpu/saml21/include/atmel/saml21j16a.h index 2f036b5e98deb..39866b7567351 100644 --- a/cpu/saml21/include/atmel/saml21j16a.h +++ b/cpu/saml21/include/atmel/saml21j16a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21J16A_ -#define _SAML21J16A_ +#ifndef SAML21J16A_H +#define SAML21J16A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21j17a.h b/cpu/saml21/include/atmel/saml21j17a.h index c53599cd6f456..1a868987597a0 100644 --- a/cpu/saml21/include/atmel/saml21j17a.h +++ b/cpu/saml21/include/atmel/saml21j17a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21J17A_ -#define _SAML21J17A_ +#ifndef SAML21J17A_H +#define SAML21J17A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/atmel/saml21j18a.h b/cpu/saml21/include/atmel/saml21j18a.h index fc8eb48b72ca4..e10415b072095 100644 --- a/cpu/saml21/include/atmel/saml21j18a.h +++ b/cpu/saml21/include/atmel/saml21j18a.h @@ -44,8 +44,8 @@ * Support and FAQ: visit Atmel Support */ -#ifndef _SAML21J18A_ -#define _SAML21J18A_ +#ifndef SAML21J18A_H +#define SAML21J18A_H /** * \ingroup SAML21_definitions diff --git a/cpu/saml21/include/cpu_conf.h b/cpu/saml21/include/cpu_conf.h index e35eac3d42b10..500d29d7fe3d8 100644 --- a/cpu/saml21/include/cpu_conf.h +++ b/cpu/saml21/include/cpu_conf.h @@ -15,8 +15,8 @@ * @author Thomas Eichinger */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "atmel/saml21.h" @@ -42,5 +42,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/stellaris_common/include/cortex-m4-def.h b/cpu/stellaris_common/include/cortex-m4-def.h index e269aa12726ce..b02fbde330673 100644 --- a/cpu/stellaris_common/include/cortex-m4-def.h +++ b/cpu/stellaris_common/include/cortex-m4-def.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __CORTEX_M4_DEF_H__ -#define __CORTEX_M4_DEF_H__ +#ifndef CORTEX_M4_DEF_H +#define CORTEX_M4_DEF_H #ifdef __cplusplus extern "C" { @@ -10031,4 +10031,4 @@ extern "C" { } #endif -#endif // __LM4F120H5QR_H__ +#endif // LM4F120H5QR_H diff --git a/cpu/stellaris_common/include/hw_adc.h b/cpu/stellaris_common/include/hw_adc.h index 7d742cdce0173..6031ecbe78fc4 100644 --- a/cpu/stellaris_common/include/hw_adc.h +++ b/cpu/stellaris_common/include/hw_adc.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_ADC_H__ -#define __HW_ADC_H__ +#ifndef HW_ADC_H +#define HW_ADC_H #ifdef __cplusplus extern "C" { @@ -1357,4 +1357,4 @@ extern "C" { } #endif -#endif // __HW_ADC_H__ +#endif // HW_ADC_H diff --git a/cpu/stellaris_common/include/hw_gpio.h b/cpu/stellaris_common/include/hw_gpio.h index 96f96c8a6b369..61eebafc95137 100644 --- a/cpu/stellaris_common/include/hw_gpio.h +++ b/cpu/stellaris_common/include/hw_gpio.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_GPIO_H__ -#define __HW_GPIO_H__ +#ifndef HW_GPIO_H +#define HW_GPIO_H #ifdef __cplusplus extern "C" { @@ -197,4 +197,4 @@ extern "C" { } #endif -#endif // __HW_GPIO_H__ +#endif // HW_GPIO_H diff --git a/cpu/stellaris_common/include/hw_hibernate.h b/cpu/stellaris_common/include/hw_hibernate.h index b8c36a3942ef2..578ee8bf27ea6 100644 --- a/cpu/stellaris_common/include/hw_hibernate.h +++ b/cpu/stellaris_common/include/hw_hibernate.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_HIBERNATE_H__ -#define __HW_HIBERNATE_H__ +#ifndef HW_HIBERNATE_H +#define HW_HIBERNATE_H #ifdef __cplusplus extern "C" { @@ -291,4 +291,4 @@ extern "C" { } #endif -#endif // __HW_HIBERNATE_H__ +#endif // HW_HIBERNATE_H diff --git a/cpu/stellaris_common/include/hw_i2c.h b/cpu/stellaris_common/include/hw_i2c.h index 359bbaee47b81..90be7d93ac4d7 100644 --- a/cpu/stellaris_common/include/hw_i2c.h +++ b/cpu/stellaris_common/include/hw_i2c.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_I2C_H__ -#define __HW_I2C_H__ +#ifndef HW_I2C_H +#define HW_I2C_H #ifdef __cplusplus extern "C" { @@ -494,4 +494,4 @@ extern "C" { } #endif -#endif // __HW_I2C_H__ +#endif // HW_I2C_H diff --git a/cpu/stellaris_common/include/hw_ints.h b/cpu/stellaris_common/include/hw_ints.h index 96200bccd4404..2a9a238e504fd 100644 --- a/cpu/stellaris_common/include/hw_ints.h +++ b/cpu/stellaris_common/include/hw_ints.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_INTS_H__ -#define __HW_INTS_H__ +#ifndef HW_INTS_H +#define HW_INTS_H #ifdef __cplusplus extern "C" { @@ -222,4 +222,4 @@ extern "C" { } #endif -#endif // __HW_INTS_H__ +#endif // HW_INTS_H diff --git a/cpu/stellaris_common/include/hw_memmap.h b/cpu/stellaris_common/include/hw_memmap.h index 4ad3b93d7025d..500c0694d345e 100644 --- a/cpu/stellaris_common/include/hw_memmap.h +++ b/cpu/stellaris_common/include/hw_memmap.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_MEMMAP_H__ -#define __HW_MEMMAP_H__ +#ifndef HW_MEMMAP_H +#define HW_MEMMAP_H #ifdef __cplusplus extern "C" { @@ -169,4 +169,4 @@ extern "C" { } #endif -#endif // __HW_MEMMAP_H__ +#endif // HW_MEMMAP_H diff --git a/cpu/stellaris_common/include/hw_nvic.h b/cpu/stellaris_common/include/hw_nvic.h index 8273103108191..c2f85c075a37a 100644 --- a/cpu/stellaris_common/include/hw_nvic.h +++ b/cpu/stellaris_common/include/hw_nvic.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_NVIC_H__ -#define __HW_NVIC_H__ +#ifndef HW_NVIC_H +#define HW_NVIC_H #ifdef __cplusplus extern "C" { @@ -1722,4 +1722,4 @@ extern "C" { } #endif -#endif // __HW_NVIC_H__ +#endif // HW_NVIC_H diff --git a/cpu/stellaris_common/include/hw_pwm.h b/cpu/stellaris_common/include/hw_pwm.h index d780480dad23d..885fd90eba52b 100644 --- a/cpu/stellaris_common/include/hw_pwm.h +++ b/cpu/stellaris_common/include/hw_pwm.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_PWM_H__ -#define __HW_PWM_H__ +#ifndef HW_PWM_H +#define HW_PWM_H #ifdef __cplusplus extern "C" { @@ -2025,4 +2025,4 @@ extern "C" { } #endif -#endif // __HW_PWM_H__ +#endif // HW_PWM_H diff --git a/cpu/stellaris_common/include/hw_ssi.h b/cpu/stellaris_common/include/hw_ssi.h index ac3b67a182402..c6b40a42018cd 100644 --- a/cpu/stellaris_common/include/hw_ssi.h +++ b/cpu/stellaris_common/include/hw_ssi.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_SSI_H__ -#define __HW_SSI_H__ +#ifndef HW_SSI_H +#define HW_SSI_H #ifdef __cplusplus extern "C" { @@ -249,4 +249,4 @@ extern "C" { } #endif -#endif // __HW_SSI_H__ +#endif // HW_SSI_H diff --git a/cpu/stellaris_common/include/hw_sysctl.h b/cpu/stellaris_common/include/hw_sysctl.h index cff565e62f0dd..6ecf47287ec54 100644 --- a/cpu/stellaris_common/include/hw_sysctl.h +++ b/cpu/stellaris_common/include/hw_sysctl.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_SYSCTL_H__ -#define __HW_SYSCTL_H__ +#ifndef HW_SYSCTL_H +#define HW_SYSCTL_H #ifdef __cplusplus extern "C" { @@ -3681,4 +3681,4 @@ extern "C" { } #endif -#endif // __HW_SYSCTL_H__ +#endif // HW_SYSCTL_H diff --git a/cpu/stellaris_common/include/hw_sysexc.h b/cpu/stellaris_common/include/hw_sysexc.h index 325b5c953fc21..0b8774ad100d5 100644 --- a/cpu/stellaris_common/include/hw_sysexc.h +++ b/cpu/stellaris_common/include/hw_sysexc.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_SYSEXC_H__ -#define __HW_SYSEXC_H__ +#ifndef HW_SYSEXC_H +#define HW_SYSEXC_H #ifdef __cplusplus extern "C" { @@ -136,4 +136,4 @@ extern "C" { } #endif -#endif // __HW_SYSEXC_H__ +#endif // HW_SYSEXC_H diff --git a/cpu/stellaris_common/include/hw_timer.h b/cpu/stellaris_common/include/hw_timer.h index 544f338606cd7..7a0b21d55cfb5 100644 --- a/cpu/stellaris_common/include/hw_timer.h +++ b/cpu/stellaris_common/include/hw_timer.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_TIMER_H__ -#define __HW_TIMER_H__ +#ifndef HW_TIMER_H +#define HW_TIMER_H #ifdef __cplusplus extern "C" { @@ -764,4 +764,4 @@ extern "C" { } #endif -#endif // __HW_TIMER_H__ +#endif // HW_TIMER_H diff --git a/cpu/stellaris_common/include/hw_types.h b/cpu/stellaris_common/include/hw_types.h index c3cf5c35b0e06..c7f412512fda6 100644 --- a/cpu/stellaris_common/include/hw_types.h +++ b/cpu/stellaris_common/include/hw_types.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_TYPES_H__ -#define __HW_TYPES_H__ +#ifndef HW_TYPES_H +#define HW_TYPES_H #ifdef __cplusplus extern "C" { @@ -223,4 +223,4 @@ typedef unsigned char tBoolean; } #endif -#endif // __HW_TYPES_H__ +#endif // HW_TYPES_H diff --git a/cpu/stellaris_common/include/hw_uart.h b/cpu/stellaris_common/include/hw_uart.h index eb985338e1a3f..b9fd25dd32c60 100644 --- a/cpu/stellaris_common/include/hw_uart.h +++ b/cpu/stellaris_common/include/hw_uart.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_UART_H__ -#define __HW_UART_H__ +#ifndef HW_UART_H +#define HW_UART_H #ifdef __cplusplus extern "C" { @@ -527,4 +527,4 @@ extern "C" { } #endif -#endif // __HW_UART_H__ +#endif // HW_UART_H diff --git a/cpu/stellaris_common/include/hw_watchdog.h b/cpu/stellaris_common/include/hw_watchdog.h index a712adaf1f9d9..552646c499905 100644 --- a/cpu/stellaris_common/include/hw_watchdog.h +++ b/cpu/stellaris_common/include/hw_watchdog.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HW_WATCHDOG_H__ -#define __HW_WATCHDOG_H__ +#ifndef HW_WATCHDOG_H +#define HW_WATCHDOG_H #ifdef __cplusplus extern "C" { @@ -196,4 +196,4 @@ extern "C" { } #endif -#endif // __HW_WATCHDOG_H__ +#endif // HW_WATCHDOG_H diff --git a/cpu/stellaris_common/include/stellaris_periph/adc.h b/cpu/stellaris_common/include/stellaris_periph/adc.h index 47f82f9c4a059..d9a95e5acc71e 100644 --- a/cpu/stellaris_common/include/stellaris_periph/adc.h +++ b/cpu/stellaris_common/include/stellaris_periph/adc.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __ADC_H__ -#define __ADC_H__ +#ifndef ADC_H +#define ADC_H //***************************************************************************** // @@ -308,4 +308,4 @@ extern unsigned long ADCPhaseDelayGet(unsigned long ulBase); } #endif -#endif // __ADC_H__ +#endif // ADC_H diff --git a/cpu/stellaris_common/include/stellaris_periph/comp.h b/cpu/stellaris_common/include/stellaris_periph/comp.h index 43f12eff5d86b..345f4c78cacc1 100644 --- a/cpu/stellaris_common/include/stellaris_periph/comp.h +++ b/cpu/stellaris_common/include/stellaris_periph/comp.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __COMP_H__ -#define __COMP_H__ +#ifndef COMP_H +#define COMP_H //***************************************************************************** // @@ -142,4 +142,4 @@ extern void ComparatorIntClear(unsigned long ulBase, unsigned long ulComp); } #endif -#endif // __COMP_H__ +#endif // COMP_H diff --git a/cpu/stellaris_common/include/stellaris_periph/cpu.h b/cpu/stellaris_common/include/stellaris_periph/cpu.h index ca093d1e1a984..8193437d20904 100644 --- a/cpu/stellaris_common/include/stellaris_periph/cpu.h +++ b/cpu/stellaris_common/include/stellaris_periph/cpu.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __CPU_H__ -#define __CPU_H__ +#ifndef CPU_H +#define CPU_H //***************************************************************************** // @@ -72,4 +72,4 @@ extern void CPUbasepriSet(unsigned long ulNewBasepri); } #endif -#endif // __CPU_H__ +#endif // CPU_H diff --git a/cpu/stellaris_common/include/stellaris_periph/fpu.h b/cpu/stellaris_common/include/stellaris_periph/fpu.h index cd7ab72010237..d58d266f33575 100644 --- a/cpu/stellaris_common/include/stellaris_periph/fpu.h +++ b/cpu/stellaris_common/include/stellaris_periph/fpu.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __FPU_H__ -#define __FPU_H__ +#ifndef FPU_H +#define FPU_H //***************************************************************************** // @@ -109,4 +109,4 @@ extern void FPURoundingModeSet(unsigned long ulMode); } #endif -#endif // __FPU_H__ +#endif // FPU_H diff --git a/cpu/stellaris_common/include/stellaris_periph/gpio.h b/cpu/stellaris_common/include/stellaris_periph/gpio.h index f8740eaac0270..b2b74e46d10b0 100644 --- a/cpu/stellaris_common/include/stellaris_periph/gpio.h +++ b/cpu/stellaris_common/include/stellaris_periph/gpio.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __GPIO_H__ -#define __GPIO_H__ +#ifndef GPIO_H +#define GPIO_H //***************************************************************************** // @@ -196,4 +196,4 @@ extern void GPIOADCTriggerDisable(unsigned long ulPort, unsigned char ucPins); } #endif -#endif // __GPIO_H__ +#endif // GPIO_H diff --git a/cpu/stellaris_common/include/stellaris_periph/hibernate.h b/cpu/stellaris_common/include/stellaris_periph/hibernate.h index d698ed86dd5c9..f1a4cad99518d 100644 --- a/cpu/stellaris_common/include/stellaris_periph/hibernate.h +++ b/cpu/stellaris_common/include/stellaris_periph/hibernate.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __HIBERNATE_H__ -#define __HIBERNATE_H__ +#ifndef HIBERNATE_H +#define HIBERNATE_H //***************************************************************************** // @@ -164,4 +164,4 @@ extern unsigned long HibernateBatCheckDone(void); } #endif -#endif // __HIBERNATE_H__ +#endif // HIBERNATE_H diff --git a/cpu/stellaris_common/include/stellaris_periph/i2c.h b/cpu/stellaris_common/include/stellaris_periph/i2c.h index eebbacc90e48b..db24cc6dfd8da 100644 --- a/cpu/stellaris_common/include/stellaris_periph/i2c.h +++ b/cpu/stellaris_common/include/stellaris_periph/i2c.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __I2C_H__ -#define __I2C_H__ +#ifndef I2C_H +#define I2C_H //***************************************************************************** // @@ -221,4 +221,4 @@ extern unsigned long I2CSlaveStatus(unsigned long ulBase); } #endif -#endif // __I2C_H__ +#endif // I2C_H diff --git a/cpu/stellaris_common/include/stellaris_periph/interrupt.h b/cpu/stellaris_common/include/stellaris_periph/interrupt.h index 5afed45808fc7..f4e4b373f82a8 100644 --- a/cpu/stellaris_common/include/stellaris_periph/interrupt.h +++ b/cpu/stellaris_common/include/stellaris_periph/interrupt.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __INTERRUPT_H__ -#define __INTERRUPT_H__ +#ifndef INTERRUPT_H +#define INTERRUPT_H //***************************************************************************** // @@ -90,4 +90,4 @@ extern unsigned long IntPriorityMaskGet(void); } #endif -#endif // __INTERRUPT_H__ +#endif // INTERRUPT_H diff --git a/cpu/stellaris_common/include/stellaris_periph/pin_map.h b/cpu/stellaris_common/include/stellaris_periph/pin_map.h index d36a0bbc650d2..cf99f0be91918 100644 --- a/cpu/stellaris_common/include/stellaris_periph/pin_map.h +++ b/cpu/stellaris_common/include/stellaris_periph/pin_map.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __PIN_MAP_H__ -#define __PIN_MAP_H__ +#ifndef PIN_MAP_H +#define PIN_MAP_H #ifdef __cplusplus extern "C" { @@ -454,4 +454,4 @@ extern "C" { } #endif -#endif // __PIN_MAP_H__ +#endif // PIN_MAP_H diff --git a/cpu/stellaris_common/include/stellaris_periph/pwm.h b/cpu/stellaris_common/include/stellaris_periph/pwm.h index db9d9654d2b61..90dc47dc9e7a0 100644 --- a/cpu/stellaris_common/include/stellaris_periph/pwm.h +++ b/cpu/stellaris_common/include/stellaris_periph/pwm.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __PWM_H__ -#define __PWM_H__ +#ifndef PWM_H +#define PWM_H //***************************************************************************** // @@ -295,4 +295,4 @@ extern void PWMGenFaultClear(unsigned long ulBase, unsigned long ulGen, } #endif -#endif // __PWM_H__ +#endif // PWM_H diff --git a/cpu/stellaris_common/include/stellaris_periph/rom.h b/cpu/stellaris_common/include/stellaris_periph/rom.h index 870e2aa24f93e..a25dc71775f0f 100644 --- a/cpu/stellaris_common/include/stellaris_periph/rom.h +++ b/cpu/stellaris_common/include/stellaris_periph/rom.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __ROM_H__ -#define __ROM_H__ +#ifndef ROM_H +#define ROM_H #ifdef __cplusplus extern "C" { @@ -6749,4 +6749,4 @@ extern "C" { } #endif -#endif // __ROM_H__ +#endif // ROM_H diff --git a/cpu/stellaris_common/include/stellaris_periph/rom_map.h b/cpu/stellaris_common/include/stellaris_periph/rom_map.h index 976da29c6a004..40986ec7ac1e4 100644 --- a/cpu/stellaris_common/include/stellaris_periph/rom_map.h +++ b/cpu/stellaris_common/include/stellaris_periph/rom_map.h @@ -38,8 +38,8 @@ // //***************************************************************************** -#ifndef __ROM_MAP_H__ -#define __ROM_MAP_H__ +#ifndef ROM_MAP_H +#define ROM_MAP_H #ifdef __cplusplus extern "C" { @@ -5080,4 +5080,4 @@ extern "C" { } #endif -#endif // __ROM_MAP_H__ +#endif // ROM_MAP_H diff --git a/cpu/stellaris_common/include/stellaris_periph/ssi.h b/cpu/stellaris_common/include/stellaris_periph/ssi.h index 20af87e7f3b77..6afef2e6c685e 100644 --- a/cpu/stellaris_common/include/stellaris_periph/ssi.h +++ b/cpu/stellaris_common/include/stellaris_periph/ssi.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __SSI_H__ -#define __SSI_H__ +#ifndef SSI_H +#define SSI_H //***************************************************************************** // @@ -148,4 +148,4 @@ extern unsigned long SSIClockSourceGet(unsigned long ulBase); } #endif -#endif // __SSI_H__ +#endif // SSI_H diff --git a/cpu/stellaris_common/include/stellaris_periph/sysctl.h b/cpu/stellaris_common/include/stellaris_periph/sysctl.h index c7c5748a40ee4..35b3b75ae715c 100644 --- a/cpu/stellaris_common/include/stellaris_periph/sysctl.h +++ b/cpu/stellaris_common/include/stellaris_periph/sysctl.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __SYSCTL_H__ -#define __SYSCTL_H__ +#ifndef SYSCTL_H +#define SYSCTL_H //***************************************************************************** // @@ -639,4 +639,4 @@ extern unsigned long SysCtlI2SMClkSet(unsigned long ulInputClock, } #endif -#endif // __SYSCTL_H__ +#endif // SYSCTL_H diff --git a/cpu/stellaris_common/include/stellaris_periph/sysexc.h b/cpu/stellaris_common/include/stellaris_periph/sysexc.h index 1389b62d5351e..66b51bcc64ea3 100644 --- a/cpu/stellaris_common/include/stellaris_periph/sysexc.h +++ b/cpu/stellaris_common/include/stellaris_periph/sysexc.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __SYSEXC_H__ -#define __SYSEXC_H__ +#ifndef SYSEXC_H +#define SYSEXC_H //***************************************************************************** // @@ -86,4 +86,4 @@ extern void SysExcIntClear(unsigned long ulIntFlags); } #endif -#endif // __SYSEXC_H__ +#endif // SYSEXC_H diff --git a/cpu/stellaris_common/include/stellaris_periph/systick.h b/cpu/stellaris_common/include/stellaris_periph/systick.h index ba1c927da8074..362f2d28c85f5 100644 --- a/cpu/stellaris_common/include/stellaris_periph/systick.h +++ b/cpu/stellaris_common/include/stellaris_periph/systick.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __SYSTICK_H__ -#define __SYSTICK_H__ +#ifndef SYSTICK_H +#define SYSTICK_H //***************************************************************************** // @@ -75,4 +75,4 @@ extern unsigned long SysTickValueGet(void); } #endif -#endif // __SYSTICK_H__ +#endif // SYSTICK_H diff --git a/cpu/stellaris_common/include/stellaris_periph/timer.h b/cpu/stellaris_common/include/stellaris_periph/timer.h index 7df7de8b828d0..25bd8c6167517 100644 --- a/cpu/stellaris_common/include/stellaris_periph/timer.h +++ b/cpu/stellaris_common/include/stellaris_periph/timer.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __TIMER_H__ -#define __TIMER_H__ +#ifndef TIMER_H +#define TIMER_H //***************************************************************************** // @@ -233,4 +233,4 @@ extern void TimerQuiesce(unsigned long ulBase); } #endif -#endif // __TIMER_H__ +#endif // TIMER_H diff --git a/cpu/stellaris_common/include/stellaris_periph/uart.h b/cpu/stellaris_common/include/stellaris_periph/uart.h index fe95b2d883891..895c955b7c413 100644 --- a/cpu/stellaris_common/include/stellaris_periph/uart.h +++ b/cpu/stellaris_common/include/stellaris_periph/uart.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __UART_H__ -#define __UART_H__ +#ifndef UART_H +#define UART_H //***************************************************************************** // @@ -272,4 +272,4 @@ extern void UART9BitAddrSend(unsigned long ulBase, unsigned char ucAddr); } #endif -#endif // __UART_H__ +#endif // UART_H diff --git a/cpu/stellaris_common/include/stellaris_periph/watchdog.h b/cpu/stellaris_common/include/stellaris_periph/watchdog.h index 97dee207d57f5..9243cfff32e97 100644 --- a/cpu/stellaris_common/include/stellaris_periph/watchdog.h +++ b/cpu/stellaris_common/include/stellaris_periph/watchdog.h @@ -37,8 +37,8 @@ // //***************************************************************************** -#ifndef __WATCHDOG_H__ -#define __WATCHDOG_H__ +#ifndef WATCHDOG_H +#define WATCHDOG_H //***************************************************************************** // @@ -92,4 +92,4 @@ extern void WatchdogStallDisable(unsigned long ulBase); } #endif -#endif // __WATCHDOG_H__ +#endif // WATCHDOG_H diff --git a/cpu/stm32f0/include/cpu_conf.h b/cpu/stm32f0/include/cpu_conf.h index 1f6309761bdfa..f19b76d63cd17 100644 --- a/cpu/stm32f0/include/cpu_conf.h +++ b/cpu/stm32f0/include/cpu_conf.h @@ -18,8 +18,8 @@ * @author Hauke Petersen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #ifdef CPU_MODEL_STM32F051R8 #include "stm32f051x8.h" @@ -49,5 +49,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/stm32f0/include/stm32f051x8.h b/cpu/stm32f0/include/stm32f051x8.h index 9be486842b150..ed3cda5056a7d 100644 --- a/cpu/stm32f0/include/stm32f051x8.h +++ b/cpu/stm32f0/include/stm32f051x8.h @@ -50,8 +50,8 @@ * @{ */ -#ifndef __STM32F051x8_H -#define __STM32F051x8_H +#ifndef STM32F051x8_H +#define STM32F051x8_H #ifdef __cplusplus extern "C" { @@ -3828,7 +3828,7 @@ typedef struct } #endif /* __cplusplus */ -#endif /* __STM32F051x8_H */ +#endif /* STM32F051x8_H */ /** * @} diff --git a/cpu/stm32f0/include/stm32f091xc.h b/cpu/stm32f0/include/stm32f091xc.h index cae413858677a..89765440c1685 100644 --- a/cpu/stm32f0/include/stm32f091xc.h +++ b/cpu/stm32f0/include/stm32f091xc.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F091xC_H -#define __STM32F091xC_H +#ifndef STM32F091xC_H +#define STM32F091xC_H #ifdef __cplusplus extern "C" { @@ -5696,7 +5696,7 @@ typedef struct } #endif /* __cplusplus */ -#endif /* __STM32F091xC_H */ +#endif /* STM32F091xC_H */ /** * @} diff --git a/cpu/stm32f1/include/cpu_conf.h b/cpu/stm32f1/include/cpu_conf.h index 9e7aa19325504..4d33355111421 100644 --- a/cpu/stm32f1/include/cpu_conf.h +++ b/cpu/stm32f1/include/cpu_conf.h @@ -20,8 +20,8 @@ * @author Hauke Petersen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #include "stm32f10x.h" @@ -56,5 +56,5 @@ void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale); } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/stm32f1/include/stm32f10x.h b/cpu/stm32f1/include/stm32f10x.h index 2dbec5d441b0c..ce529b098b808 100644 --- a/cpu/stm32f1/include/stm32f10x.h +++ b/cpu/stm32f1/include/stm32f10x.h @@ -47,8 +47,8 @@ * @{ */ -#ifndef __STM32F10x_H -#define __STM32F10x_H +#ifndef STM32F10x_H +#define STM32F10x_H #ifdef __cplusplus extern "C" { @@ -8287,7 +8287,7 @@ extern "C" { } #endif -#endif /* __STM32F10x_H */ +#endif /* STM32F10x_H */ /** * @} diff --git a/cpu/stm32f3/include/cpu_conf.h b/cpu/stm32f3/include/cpu_conf.h index 1a87ba968c54c..b564029f752e8 100644 --- a/cpu/stm32f3/include/cpu_conf.h +++ b/cpu/stm32f3/include/cpu_conf.h @@ -19,8 +19,8 @@ * @author Katja Kirstein */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #ifdef CPU_MODEL_STM32F303VC #include "stm32f303xc.h" @@ -55,5 +55,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/stm32f3/include/stm32f303xc.h b/cpu/stm32f3/include/stm32f303xc.h index f49742e6ccb35..2a63eec22f66b 100644 --- a/cpu/stm32f3/include/stm32f303xc.h +++ b/cpu/stm32f3/include/stm32f303xc.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F303xC_H -#define __STM32F303xC_H +#ifndef STM32F303xC_H +#define STM32F303xC_H #ifdef __cplusplus extern "C" { @@ -6977,7 +6977,7 @@ typedef struct } #endif /* __cplusplus */ -#endif /* __STM32F303xC_H */ +#endif /* STM32F303xC_H */ /** * @} diff --git a/cpu/stm32f3/include/stm32f303xe.h b/cpu/stm32f3/include/stm32f303xe.h index 10b3e2a86e58d..8ca99f50fa772 100644 --- a/cpu/stm32f3/include/stm32f303xe.h +++ b/cpu/stm32f3/include/stm32f303xe.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F303xE_H -#define __STM32F303xE_H +#ifndef STM32F303xE_H +#define STM32F303xE_H #ifdef __cplusplus extern "C" { @@ -8198,7 +8198,7 @@ typedef struct } #endif /* __cplusplus */ -#endif /* __STM32F303xE_H */ +#endif /* STM32F303xE_H */ /** * @} diff --git a/cpu/stm32f3/include/stm32f334x8.h b/cpu/stm32f3/include/stm32f334x8.h index 7e0f40d6dddcd..26348529f1639 100644 --- a/cpu/stm32f3/include/stm32f334x8.h +++ b/cpu/stm32f3/include/stm32f334x8.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F334x8_H -#define __STM32F334x8_H +#ifndef STM32F334x8_H +#define STM32F334x8_H #ifdef __cplusplus extern "C" { @@ -7590,7 +7590,7 @@ typedef struct } #endif /* __cplusplus */ -#endif /* __STM32F334x8_H */ +#endif /* STM32F334x8_H */ /** * @} diff --git a/cpu/stm32f4/include/cpu_conf.h b/cpu/stm32f4/include/cpu_conf.h index 25d0cf2d72781..9df7ad6e508ec 100644 --- a/cpu/stm32f4/include/cpu_conf.h +++ b/cpu/stm32f4/include/cpu_conf.h @@ -18,8 +18,8 @@ * @author Hauke Petersen */ -#ifndef __CPU_CONF_H -#define __CPU_CONF_H +#ifndef CPU_CONF_H +#define CPU_CONF_H #if defined(CPU_MODEL_STM32F401RE) #include "stm32f401xe.h" @@ -51,5 +51,5 @@ extern "C" { } #endif -#endif /* __CPU_CONF_H */ +#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/stm32f4/include/stm32f401xe.h b/cpu/stm32f4/include/stm32f401xe.h index 5aee1435652df..37285418ab79f 100644 --- a/cpu/stm32f4/include/stm32f401xe.h +++ b/cpu/stm32f4/include/stm32f401xe.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F401xE_H -#define __STM32F401xE_H +#ifndef STM32F401xE_H +#define STM32F401xE_H #ifdef __cplusplus extern "C" { @@ -4764,7 +4764,7 @@ USB_OTG_HostChannelTypeDef; } #endif /* __cplusplus */ -#endif /* __STM32F401xE_H */ +#endif /* STM32F401xE_H */ diff --git a/cpu/stm32f4/include/stm32f407xx.h b/cpu/stm32f4/include/stm32f407xx.h index 56080944d24e8..af53f573b8f9c 100644 --- a/cpu/stm32f4/include/stm32f407xx.h +++ b/cpu/stm32f4/include/stm32f407xx.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F407xx_H -#define __STM32F407xx_H +#ifndef STM32F407xx_H +#define STM32F407xx_H #ifdef __cplusplus extern "C" { @@ -7943,7 +7943,7 @@ USB_OTG_HostChannelTypeDef; } #endif /* __cplusplus */ -#endif /* __STM32F407xx_H */ +#endif /* STM32F407xx_H */ diff --git a/cpu/stm32f4/include/stm32f415xx.h b/cpu/stm32f4/include/stm32f415xx.h index badc36e10ed0b..c5b2bf4ca6093 100644 --- a/cpu/stm32f4/include/stm32f415xx.h +++ b/cpu/stm32f4/include/stm32f415xx.h @@ -49,8 +49,8 @@ * @{ */ -#ifndef __STM32F415xx_H -#define __STM32F415xx_H +#ifndef STM32F415xx_H +#define STM32F415xx_H #ifdef __cplusplus extern "C" { @@ -7518,7 +7518,7 @@ USB_OTG_HostChannelTypeDef; } #endif /* __cplusplus */ -#endif /* __STM32F415xx_H */ +#endif /* STM32F415xx_H */ diff --git a/cpu/stm32l1/include/stm32l1xx.h b/cpu/stm32l1/include/stm32l1xx.h index 0f6d9e3834b2d..9e168897481f9 100644 --- a/cpu/stm32l1/include/stm32l1xx.h +++ b/cpu/stm32l1/include/stm32l1xx.h @@ -51,8 +51,8 @@ * @{ */ -#ifndef __STM32L1XX_H -#define __STM32L1XX_H +#ifndef STM32L1XX_H +#define STM32L1XX_H #ifdef __cplusplus extern "C" { @@ -6661,7 +6661,7 @@ typedef struct } #endif -#endif /* __STM32L1XX_H */ +#endif /* STM32L1XX_H */ /** * @} diff --git a/cpu/x86/include/x86_pci_init.h b/cpu/x86/include/x86_pci_init.h index 71ce5af20ecaf..67e504b23a3ff 100644 --- a/cpu/x86/include/x86_pci_init.h +++ b/cpu/x86/include/x86_pci_init.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __X86__PCI_INIT__H -#define __X86__PCI_INIT__H +#ifndef X86_PCI_INIT_H +#define X86_PCI_INIT_H #ifdef __cplusplus extern "C" { diff --git a/dist/tools/travis-scripts/build_and_test.sh b/dist/tools/travis-scripts/build_and_test.sh index b060480dc2abf..475ad9f1af8e8 100755 --- a/dist/tools/travis-scripts/build_and_test.sh +++ b/dist/tools/travis-scripts/build_and_test.sh @@ -70,5 +70,5 @@ then # resolved: # - make -C ./tests/unittests all test BOARD=qemu-i386 || exit fi - ./dist/tools/compile_test/compile_test.py master + ./dist/tools/compile_test/compile_test.py $TRAVIS_BRANCH fi diff --git a/drivers/kw2xrf/kw2xrf.c b/drivers/kw2xrf/kw2xrf.c index 49c7d28bb63b6..e4c0038e00fc0 100644 --- a/drivers/kw2xrf/kw2xrf.c +++ b/drivers/kw2xrf/kw2xrf.c @@ -40,6 +40,8 @@ #define MKW2XDRF_PA_RANGE_MAX 31 /**< Maximum value of PA Power Control Register */ #define MKW2XDRF_PA_RANGE_MIN 3 /**< Minimum value of PA Power Control Register */ +#define _MAX_MHR_OVERHEAD (25) + /* PLL integer lookup table */ static const uint8_t pll_int_lt[16] = { 11, 11, 11, 11, @@ -642,7 +644,7 @@ int kw2xrf_get(gnrc_netdev_t *netdev, netopt_t opt, void *value, size_t max_len) return -EOVERFLOW; } - *((uint16_t *)value) = KW2XRF_MAX_PKT_LENGTH; + *((uint16_t *)value) = KW2XRF_MAX_PKT_LENGTH - _MAX_MHR_OVERHEAD; return sizeof(uint16_t); case NETOPT_PRELOADING: diff --git a/pkg/ccn-lite/Makefile b/pkg/ccn-lite/Makefile index dfafdd5aaa890..d419f98e5dfe6 100644 --- a/pkg/ccn-lite/Makefile +++ b/pkg/ccn-lite/Makefile @@ -12,8 +12,8 @@ endif export RIOT_CFLAGS = ${CFLAGS} ${INCLUDES} all: $(PKG_DIR)/Makefile - "$(MAKE)" -C $(PKG_DIR)/src lib-ccn-lite.a - "$(MAKE)" -C $(PKG_DIR)/src lib-ccn-lite-utils.a + "$(MAKE)" -BC $(PKG_DIR)/src lib-ccn-lite.a + "$(MAKE)" -BC $(PKG_DIR)/src lib-ccn-lite-utils.a cp $(PKG_DIR)/src/lib-ccn-lite.a ${BINDIR}/ccn-lite.a cp $(PKG_DIR)/src/lib-ccn-lite-utils.a ${BINDIR}/ccn-lite-utils.a diff --git a/pkg/oonf_api/Makefile b/pkg/oonf_api/Makefile index b357ec1f7d03a..7828eefa40980 100644 --- a/pkg/oonf_api/Makefile +++ b/pkg/oonf_api/Makefile @@ -1,6 +1,7 @@ PKG_NAME=oonf_api -PKG_URL=git://olsr.org/oonf.git +PKG_URL=http://olsr.org/git/oonf.git PKG_VERSION=v0.3.0 +PKG_DIR=$(CURDIR)/$(PKG_NAME) ifneq ($(RIOTBOARD),) include $(RIOTBOARD)/$(BOARD)/Makefile.include @@ -16,27 +17,31 @@ MODULE:=$(shell basename $(CURDIR)) .PHONY: all clean patch reset all: patch - make -C $(CURDIR)/$(PKG_NAME) - make $(BINDIR)$(MODULE).a + "$(MAKE)" -C $(PKG_DIR) + "$(MAKE)" $(BINDIR)$(MODULE).a -patch: $(CURDIR)/$(PKG_NAME)/Makefile +patch: $(PKG_DIR)/Makefile -$(CURDIR)/$(PKG_NAME)/Makefile: $(CURDIR)/$(PKG_NAME) - $(foreach patch,$(shell ls [0-9][0-9][0-9][0-9]*.patch),cd "$<" && git am "../$(patch)" || { git am --abort; exit 1; };) +$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config + cd "$(PKG_DIR)" && git am --ignore-whitespace "$(CURDIR)"/*.patch -$(CURDIR)/$(PKG_NAME): - test -d oonf_api || \ - git clone $(PKG_URL) $@ && \ - cd $@ && git reset --hard $(PKG_VERSION) +$(PKG_DIR)/.git/config: + test -d "$(PKG_DIR)" || git clone "$(PKG_URL)" "$(PKG_DIR)"; \ + cd "$(PKG_DIR)" && git checkout -f "$(PKG_VERSION)" clean:: - # Reset package to checkout state. - cd $(CURDIR)/$(PKG_NAME) || true && \ + @echo "Cleaning up oonf_api package..." + @cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \ git clean -x -f && \ - git reset --hard $(PKG_VERSION) + git am --abort && \ + git reset --hard "$(PKG_VERSION)" && \ + $(MAKE) patch || true distclean:: - rm -rf $(CURDIR)/$(PKG_NAME) + rm -rf $(PKG_DIR) $(BINDIR)$(MODULE).a: $(BINDIR)oonf_*.a mkdir -p $(BINDIR)$(MODULE); cd $(BINDIR)$(MODULE); for var in $?; do ar -x $$var; done; ar -r -c -s $(BINDIR)$(MODULE).a *.o + +Makefile.include: + @true diff --git a/release-notes.txt b/release-notes.txt index db30b56f3f8f4..fa209807159e6 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -1,3 +1,230 @@ +RIOT-2015.12 - Release Notes +============================ +RIOT is a real-time multi-threading operating system that supports a range of +devices that are typically found in the Internet of Things: 8-bit +microcontrollers, 16-bit microcontrollers and light-weight 32-bit processors. + +RIOT is based on the following design principles: energy-efficiency, real-time +capabilities, small memory footprint, modularity, and uniform API access, +independent of the underlying hardware (this API offers partial POSIX +compliance). + +RIOT is developed by an international open source community which is +independent of specific vendors (e.g. similarly to the Linux community). + +About this release: +=================== +This release is mostly a clean-up and bug-fixing release. Besides that, it introduces SAUL, +the [S]ensor [A]ctuator [U]ber [L]ayer, which offers a unified API to interact with all +different types of sensors and actuators on RIOT supported hardware. Furthermore, it re-enables +the support for ICN by integrating CCN-Lite as a package. A lot of new overall documentation was +added and existing documentation was improved (http://riot-os.org/api/). In addition, +a Vagrant (https://www.vagrantup.com/) configuration file was added to the RIOT repository in +order to create reproducible and portable environments that contain all necessary toolchains. + +About 222 pull requests with about 631 commits have been merged since the last release and 48 +additional issues have been solved. 37 people contributed code in 102 days. 980 files have been +touched with ~59779 insertions and ~12115 deletions. + +Notations used below: +===================== ++ means new feature/item +* means modified feature/item +- means removed feature/item + + +New features and changes +======================== + +General +------- + +Device support +-------------- ++ SAUL [S]ensor [A]ctuator [U]ber [L]ayer + +Core +---- +* replaced deprecated dINT()/eINT() calls by up-to-date disableIRQ()/enableIRQ()/restoreIRQ() + calls throughout the whole core + +Network Stack +------------- ++ TFTP support ++ 6LoWPAN: Next Header Compression ++ leaf mode for RPL nodes +* RPL: refactoring of instances and dodags (saved 1kB ROM and 0,5kB RAM) +* FIB: initial source route support +* change to non-blocking 6LoWPAN fragmentation +* POSIX sockets: various fixes +* periodic stats printing for ping6 command +* convert all vtimer into xtimer calls +* send router advertisements without PIOs + +Packages +-------- ++ CCN-Lite as a ICN network stack ++ RELIC: efficient cryptography library +* fix TLSF to compile with -pedantic + +Supported platforms +------------------- +Additional support for the following boards: ++ weio board with NXP LPC11U34 (ARM Cortex-M0) ++ Silicon Labs Wireless Eval Kit SLWSTK6220A (Wonder Gecko) ++ STM32 Nucleo-F401 + +Drivers +------- ++ Arduino-mega2560 GPIO ++ Arduino pin mapping for Mega2560 and Due + +Network drivers +--------------- ++ enc28j60 Ethernet chip ++ at86rf2xx: Add support for channel page +* at86rf2xx: fix LQI reading +* implement sleep mode for at86rf2xx + +Sensors drivers +--------------- ++ AT30TSE75x temperature sensor ++ TCS3772 Color Light-to-Digital converter + +System libraries +---------------- ++ partial support for the Arduino API ++ lightweight semaphores ++ fmt: simple string formatting library ++ xtimer: 32-bit version of msg_recv_timeout +* implicit socket binding for POSIX connect() and sendto() +* posix_semaphore: make API POSIX compliant + +Examples +-------- ++ microcoap/conn example ++ minimal GNRC networking example + +Build System +------------ +* split the Cortex-M0 buildtest group to avoid timeout issues with Travis +* split the Cortex-M4 buildtest group to avoid timeout issues with Travis + +Other +----- ++ vagrant configuration ++ documentation: various high-level descriptions of crucial features ++ IoT-LAB: create and connect to debug server +* pyterm: fix problems with German umlauts as input + +Fixed Issues from the last release +================================== + +#2724: Add support for serial number passing to CMSIS boards, document it + Documentation about how to discover and set the serial number of CMSIS-DAP chips is missing +#3201: Odd length packet snips cause invalid check sum + If an odd length packet snip occurs in a packet and is not the last snip + (in the order the packet is supposed to be, not in the list's order) + in a packet it will generate a wrong check sum. + +Known Issues +============ + +network related issues +---------------------- +#3075: nhdp: unnecessary microsecond precision + NHDP works with timer values of microsecond precision which is not required. Changing + to lower precision would save some memory. +#3086: Max. packet length for AT86RF2XX + The size of the link-layer header is not dynamically calculated, but instead the maximum + size is always assumed. +#3970: RPL: Advertise DODAG only over the assigned interface + gnrc_rpl seems to multicast DIOs over all interfaces, though gnrc_rpl_init expects an + interface as parameter and sets the RPL-nodes multicast address only for that interface. +#4048: potential racey memory leak + According to the packet buffer stats, flood-pinging a multicast destination may lead to a + memory leak due to a race condition. However, it seems to be a rare case and a + completely filled up packet buffer was not observed. +#4462: IPHC/NHC broken between Linux and a RIOT node with a RIOT-based border router in between. + +native related issues +--------------------- +#495: native not float safe + When the FPU is used when an asynchronous context switch occurs, either the + stack gets corrupted or a floating point exception occurs. +#534: native debugging on osx fails + Using valgrind or gdb with a nativenet target in OSX leads to "the network" + being stuck (gdb) or the whole process being stuck (valgrind). +#3341 and #3824: nativenet crashes when hammered + Flood-pinging a native instance from more than one host (either multiple threads on the + host system or multiple other native instances), leads to a SEGFAULT. +#4608: tests/xtimer_usleep_until: unstable behaviour + The test starts to output "too large difference" and fails after a random period of time. + +other platform related issues +----------------------------- +#4560: make: clang is more pedantic than gcc + oonf_api is not building with clang. +#4583: cpp11: clang doesn't allow `mutex_t` to be used with `constexpr` + All cpp11-* tests fail with clang. + +other issues +------------ +#2761: core: define default flags + If a thread is created without the corresponding flag (CREATE_STACKTEST), + the ps command will yield wrong numbers for the stack usage +#2927: core: Automatically select the lowest possible LPM mode + Not all available low power modes (LPMs) are implemented for each platform and the + concept of how the LPM is chosen needs some reconsideration +#2967: Makefile.features: location is not relevant for all features + Provided features for the build system should be split up into a board and cpu specific + part +#3109: periph/random: random_read should return unsigned int + The documentation of this function does not match corresponding implementation. +#4488: Making the newlib thread-safe + When calling puts/printf after thread_create(), the CPU hangs for DMA enabled uart drivers. + +Special Thanks +-------------- +We like to give our special thanks to all the companies that provided us with their hardware +for porting and testing, namely the people from (in alphabetical order): +Atmel, Freescale, Limifrog, Phytec, SiLabs, and Zolertia; and also companies that directly +sponsored development time: +Cisco Systems, Google, Eistec, Ell-i, Engineering Spirit, FreshTemp LLC, and Phytec. + +More information +================ +http://www.riot-os.org + +Mailing lists +------------- +* RIOT OS kernel developers list + * devel@riot-os.org (http://lists.riot-os.org/mailman/listinfo/devel) +* RIOT OS users list + * users@riot-os.org (http://lists.riot-os.org/mailman/listinfo/users) +* RIOT commits + * commits@riot-os.org (http://lists.riot-os.org/mailman/listinfo/commits) +* Github notifications + * notifications@riot-os.org (http://lists.riot-os.org/mailman/listinfo/notifications) + +IRC +----- +* Join the RIOT IRC channel at: irc.freenode.net, #riot-os + +License +======= + +* Most of the code developed by the RIOT community is licensed under the + GNU Lesser General Public License (LGPL) version 2.1 as published by the Free Software Foundation. +* Some external sources are published under a separate, LGPL compatible license + (e.g. some files developed by SICS). + +All code files contain licensing information. + + + + + RIOT-2015.09 - Release Notes ============================ RIOT is a real-time multi-threading operating system that supports a range of diff --git a/sys/include/net/gnrc/ipv6/netif.h b/sys/include/net/gnrc/ipv6/netif.h index 3385003f90a57..637a563dd469a 100644 --- a/sys/include/net/gnrc/ipv6/netif.h +++ b/sys/include/net/gnrc/ipv6/netif.h @@ -484,6 +484,8 @@ ipv6_addr_t *gnrc_ipv6_netif_find_addr(kernel_pid_t pid, const ipv6_addr_t *addr * * @param[in] prefix The prefix you want to search for. * + * @pre @p out must not be NULL. + * * @return The PID to the interface the address is registered to. * @return KERNEL_PID_UNDEF, if no matching address can not be found on any * interface. diff --git a/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c b/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c index 590c34616480b..8357b9924bc49 100644 --- a/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c +++ b/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c @@ -163,6 +163,13 @@ void gnrc_ipv6_nc_remove(kernel_pid_t iface, const ipv6_addr_t *ipv6_addr) #endif #ifdef MODULE_GNRC_SIXLOWPAN_ND_ROUTER xtimer_remove(&entry->type_timeout); + + gnrc_ipv6_netif_t *if_entry = gnrc_ipv6_netif_get(iface); + + if ((if_entry != NULL) && (if_entry->rtr_adv_msg.content.ptr == (char *) entry)) { + /* cancel timer set by gnrc_ndp_rtr_sol_handle */ + xtimer_remove(&if_entry->rtr_adv_timer); + } #endif #if defined(MODULE_GNRC_NDP_ROUTER) || defined(MODULE_GNRC_SIXLOWPAN_ND_BORDER_ROUTER) xtimer_remove(&entry->rtr_adv_timer); diff --git a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c index 1fbcc47e8c3ed..e927b21a448a7 100644 --- a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c +++ b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c @@ -502,10 +502,7 @@ kernel_pid_t gnrc_ipv6_netif_find_by_prefix(ipv6_addr_t **out, const ipv6_addr_t match = _find_by_prefix_unsafe(&tmp_res, ipv6_ifs + i, prefix, NULL); if (match > best_match) { - if (out != NULL) { - *out = tmp_res; - } - + *out = tmp_res; res = ipv6_ifs[i].pid; best_match = match; } diff --git a/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c b/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c index 90b2bbd9c082e..ebd9cfcd5e830 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c +++ b/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c @@ -154,10 +154,11 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_ if (nc_entry != NULL) { gnrc_ipv6_netif_t *ipv6_if = gnrc_ipv6_netif_get(nc_entry->iface); /* and interface is not 6LoWPAN */ - if (!(ipv6_if->flags & GNRC_IPV6_NETIF_FLAGS_SIXLOWPAN) || + if (!((ipv6_if == NULL) || + (ipv6_if->flags & GNRC_IPV6_NETIF_FLAGS_SIXLOWPAN)) || /* or entry is registered */ - (gnrc_ipv6_nc_get_type(nc_entry) == GNRC_IPV6_NC_TYPE_REGISTERED)) { - next_hop = dst; + (gnrc_ipv6_nc_get_type(nc_entry) == GNRC_IPV6_NC_TYPE_REGISTERED)) { + next_hop = dst; } } #endif diff --git a/sys/net/gnrc/pktbuf_static/gnrc_pktbuf_static.c b/sys/net/gnrc/pktbuf_static/gnrc_pktbuf_static.c index 653abbd77966f..edc2858157651 100644 --- a/sys/net/gnrc/pktbuf_static/gnrc_pktbuf_static.c +++ b/sys/net/gnrc/pktbuf_static/gnrc_pktbuf_static.c @@ -179,8 +179,10 @@ int gnrc_pktbuf_realloc_data(gnrc_pktsnip_t *pkt, size_t size) pkt->data = new_data; } else { - _pktbuf_free(((uint8_t *)pkt->data) + aligned_size, - pkt->size - aligned_size); + if (_align(pkt->size) > aligned_size) { + _pktbuf_free(((uint8_t *)pkt->data) + aligned_size, + pkt->size - aligned_size); + } } pkt->size = size; mutex_unlock(&_mutex); diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl.c b/sys/net/gnrc/routing/rpl/gnrc_rpl.c index beeba451038ab..0a90ecfba431f 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl.c @@ -195,9 +195,10 @@ static void *_event_loop(void *args) _receive((gnrc_pktsnip_t *)msg.content.ptr); break; case GNRC_NETAPI_MSG_TYPE_SND: + break; case GNRC_NETAPI_MSG_TYPE_GET: case GNRC_NETAPI_MSG_TYPE_SET: - DEBUG("RPL: reply to unsupported recv/get/set\n"); + DEBUG("RPL: reply to unsupported get/set\n"); reply.content.value = -ENOTSUP; msg_reply(&msg, &reply); break; diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c index 297ec132c92e6..39eefa25be555 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c @@ -430,7 +430,8 @@ bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt_t *opt case (GNRC_RPL_OPT_TARGET): DEBUG("RPL: RPL TARGET DAO option parsed\n"); *included_opts |= ((uint32_t) 1) << GNRC_RPL_OPT_TARGET; - if_id = gnrc_ipv6_netif_find_by_prefix(NULL, &dodag->dodag_id); + ipv6_addr_t *prefix = NULL; + if_id = gnrc_ipv6_netif_find_by_prefix(&prefix, &dodag->dodag_id); if (if_id == KERNEL_PID_UNDEF) { DEBUG("RPL: no interface found for the configured DODAG id\n"); return false; diff --git a/sys/net/network_layer/fib/fib.c b/sys/net/network_layer/fib/fib.c index bc6533ac9c765..b9cf05ce55989 100644 --- a/sys/net/network_layer/fib/fib.c +++ b/sys/net/network_layer/fib/fib.c @@ -88,6 +88,14 @@ static int fib_find_entry(fib_table_t *table, uint8_t *dst, size_t dst_size, int ret = -EHOSTUNREACH; bool is_all_zeros_addr = true; +#if ENABLE_DEBUG + DEBUG("[fib_find_entry] dst ="); + for (size_t i = 0; i < dst_size; i++) { + DEBUG(" %02x", dst[i]); + } + DEBUG("\n"); +#endif + for (size_t i = 0; i < dst_size; ++i) { if (dst[i] != 0) { is_all_zeros_addr = false; @@ -125,6 +133,7 @@ static int fib_find_entry(fib_table_t *table, uint8_t *dst, size_t dst_size, int ret_comp = universal_address_compare(table->data.entries[i].global, dst, &match_size); /* If we found an exact match */ if (ret_comp == 0 || (is_all_zeros_addr && match_size == 0)) { + DEBUG("[fib_find_entry] found an exact match"); entry_arr[0] = &(table->data.entries[i]); *entry_arr_size = 1; /* we will not find a better one so we return */ @@ -148,6 +157,16 @@ static int fib_find_entry(fib_table_t *table, uint8_t *dst, size_t dst_size, } } +#if ENABLE_DEBUG + if (count > 0) { + DEBUG("[fib_find_entry] found prefix on interface %d:", entry_arr[0]->iface_id); + for (size_t i = 0; i < entry_arr[0]->global->address_size; i++) { + DEBUG(" %02x", entry_arr[0]->global->address[i]); + } + DEBUG("\n"); + } +#endif + *entry_arr_size = count; return ret; } diff --git a/sys/posix/include/sys/socket.h b/sys/posix/include/sys/socket.h index 52fcd6d4bb685..ecadc5197ffe9 100644 --- a/sys/posix/include/sys/socket.h +++ b/sys/posix/include/sys/socket.h @@ -94,7 +94,7 @@ extern "C" { #define SO_TYPE (15) /**< Socket type. */ /** @} */ -typedef unsigned int sa_family_t; /**< address family type */ +typedef unsigned short sa_family_t; /**< address family type */ /** * @brief Used to define the socket address. diff --git a/sys/shell/commands/sc_fib.c b/sys/shell/commands/sc_fib.c index 492941a1b421a..f96017a817549 100644 --- a/sys/shell/commands/sc_fib.c +++ b/sys/shell/commands/sc_fib.c @@ -101,6 +101,16 @@ static void _fib_add(const char *dest, const char *next, kernel_pid_t pid, uint3 nxt_size = INADDRSZ; } + /* Set the prefix flag for a network */ + dst_flags |= FIB_FLAG_NET_PREFIX; + for (size_t i = 0; i < dst_size; ++i) { + if (dst[i] != 0) { + /* and clear the bit if its not the default route */ + dst_flags = (dst_flags & ~FIB_FLAG_NET_PREFIX); + break; + } + } + fib_add_entry(&gnrc_ipv6_fib_table, pid, dst, dst_size, dst_flags, nxt, nxt_size, nxt_flags, lifetime); } diff --git a/sys/shell/commands/sc_ipv6_nc.c b/sys/shell/commands/sc_ipv6_nc.c index d4b2ced582c6b..a4dcc166dd225 100644 --- a/sys/shell/commands/sc_ipv6_nc.c +++ b/sys/shell/commands/sc_ipv6_nc.c @@ -179,7 +179,7 @@ static int _ipv6_nc_add(int argc, char **argv) } if ((l2_addr_str != NULL) && (l2_addr_len = gnrc_netif_addr_from_str(l2_addr, sizeof(l2_addr), - argv[1])) == 0) { + l2_addr_str)) == 0) { puts("error: unable to parse link-layer address."); return 1; } diff --git a/tests/fault_handler/Makefile b/tests/fault_handler/Makefile index 40ff4849ad2e0..e340ac5eb768c 100644 --- a/tests/fault_handler/Makefile +++ b/tests/fault_handler/Makefile @@ -12,6 +12,10 @@ QUIET ?= 1 CFLAGS += -DDEVELHELP=1 +ifeq ($(shell uname),Darwin) +CFLAGS += -Wno-language-extension-token +endif + USEMODULE += xtimer include $(RIOTBASE)/Makefile.include diff --git a/tests/msg_send_receive/Makefile b/tests/msg_send_receive/Makefile index 4e742a0d890d1..93b32e37b92c9 100644 --- a/tests/msg_send_receive/Makefile +++ b/tests/msg_send_receive/Makefile @@ -1,8 +1,6 @@ # name of your application APPLICATION = msg_send_receive -USEMODULE += xtimer - include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/msg_send_receive/main.c b/tests/msg_send_receive/main.c index 0c4be39ea295b..81be76a7de7d1 100644 --- a/tests/msg_send_receive/main.c +++ b/tests/msg_send_receive/main.c @@ -24,7 +24,6 @@ #include "cpu_conf.h" #include "thread.h" -#include "xtimer.h" #define THREAD1_STACKSIZE (THREAD_STACKSIZE_MAIN) #define THREAD2_STACKSIZE (THREAD_STACKSIZE_MAIN) @@ -58,7 +57,6 @@ static void *thread1(void *args) success = 0; break; } - xtimer_usleep(200); } if (success) { @@ -96,9 +94,9 @@ static void *thread2(void *args) int main(void) { - thread2_pid = thread_create(thread2_stack, THREAD2_STACKSIZE, THREAD_PRIORITY_MAIN - 1, + thread2_pid = thread_create(thread2_stack, THREAD2_STACKSIZE, THREAD_PRIORITY_MAIN - 2, 0, thread2, NULL, "thread2"); - thread1_pid = thread_create(thread1_stack, THREAD1_STACKSIZE, THREAD_PRIORITY_MAIN - 2, + thread1_pid = thread_create(thread1_stack, THREAD1_STACKSIZE, THREAD_PRIORITY_MAIN - 1, 0, thread1, NULL, "thread1"); return 0; } diff --git a/tests/unittests/tests-pktbuf/tests-pktbuf.c b/tests/unittests/tests-pktbuf/tests-pktbuf.c index 1fab33ec3a571..db4042bf89558 100644 --- a/tests/unittests/tests-pktbuf/tests-pktbuf.c +++ b/tests/unittests/tests-pktbuf/tests-pktbuf.c @@ -502,6 +502,27 @@ static void test_pktbuf_realloc_data__nomemenough(void) TEST_ASSERT_EQUAL_INT(1, pkt1->users); } +static void test_pktbuf_realloc_data__alignment(void) +{ + gnrc_pktsnip_t *pkt1, *pkt2, *pkt3; + + /* see: https://github.com/RIOT-OS/RIOT/pull/4602 */ + pkt1 = gnrc_pktbuf_add(NULL, TEST_STRING8, sizeof(TEST_STRING8), GNRC_NETTYPE_TEST); + pkt2 = gnrc_pktbuf_add(NULL, NULL, 23, GNRC_NETTYPE_TEST); + pkt3 = gnrc_pktbuf_add(NULL, TEST_STRING16, sizeof(TEST_STRING16), GNRC_NETTYPE_UNDEF); + + TEST_ASSERT_NOT_NULL(pkt1); + TEST_ASSERT_NOT_NULL(pkt2); + TEST_ASSERT_NOT_NULL(pkt3); + + TEST_ASSERT_EQUAL_INT(0, gnrc_pktbuf_realloc_data(pkt2, 21)); + + gnrc_pktbuf_release(pkt1); + gnrc_pktbuf_release(pkt2); + gnrc_pktbuf_release(pkt3); + TEST_ASSERT(gnrc_pktbuf_is_empty()); +} + static void test_pktbuf_realloc_data__success(void) { char exp_data[] = TEST_STRING16; @@ -731,6 +752,7 @@ Test *tests_pktbuf_tests(void) new_TestFixture(test_pktbuf_realloc_data__nomemenough), new_TestFixture(test_pktbuf_realloc_data__shrink), new_TestFixture(test_pktbuf_realloc_data__memenough), + new_TestFixture(test_pktbuf_realloc_data__alignment), new_TestFixture(test_pktbuf_realloc_data__success), new_TestFixture(test_pktbuf_realloc_data__success2), new_TestFixture(test_pktbuf_hold__pkt_null), diff --git a/tests/vtimer_msg/Makefile b/tests/vtimer_msg/Makefile deleted file mode 100644 index 1a3314e19bd5a..0000000000000 --- a/tests/vtimer_msg/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -APPLICATION = vtimer_msg -include ../Makefile.tests_common - -USEMODULE += vtimer - -include $(RIOTBASE)/Makefile.include diff --git a/tests/vtimer_msg/main.c b/tests/vtimer_msg/main.c deleted file mode 100644 index 1199e2b509077..0000000000000 --- a/tests/vtimer_msg/main.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2013 INRIA - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup tests - * @{ - * - * @file - * @brief Thread test application - * - * @author Oliver Hahm - * @author Christian Mehlis - * - * @} - */ - -#include -#include -#include - -#include "vtimer.h" -#include "thread.h" -#include "msg.h" - -#define MSG_QUEUE_SIZE 1 - -char timer_stack[THREAD_STACKSIZE_MAIN]; -char timer_stack_local[THREAD_STACKSIZE_MAIN]; - -struct timer_msg { - vtimer_t timer; - timex_t interval; - char *msg; -}; - -timex_t now; - -struct timer_msg msg_a = { .interval = { .seconds = 2, .microseconds = 0}, .msg = "Hello World" }; -struct timer_msg msg_b = { .interval = { .seconds = 5, .microseconds = 0}, .msg = "This is a Test" }; - -void *timer_thread(void *arg) -{ - (void) arg; - - printf("This is thread %" PRIkernel_pid "\n", thread_getpid()); - - /* we need a queue if the second message arrives while the first is still processed */ - /* without a queue, the message would get lost */ - /* because of the way this timer works, there can be max 1 queued message */ - msg_t msgq[MSG_QUEUE_SIZE]; - msg_init_queue(msgq, MSG_QUEUE_SIZE); - - while (1) { - msg_t m; - msg_receive(&m); - struct timer_msg *tmsg = (struct timer_msg *) m.content.ptr; - vtimer_now(&now); - printf("now=%" PRIu32 ":%" PRIu32 " -> every %" PRIu32 ".%" PRIu32 "s: %s\n", - now.seconds, - now.microseconds, - tmsg->interval.seconds, - tmsg->interval.microseconds, - tmsg->msg); - - vtimer_set_msg(&tmsg->timer, tmsg->interval, thread_getpid(), MSG_TIMER, tmsg); - } -} - -void *timer_thread_local(void *arg) -{ - (void) arg; - - printf("This is thread %" PRIkernel_pid "\n", thread_getpid()); - - while (1) { - msg_t m; - msg_receive(&m); - - struct tm t; - vtimer_get_localtime(&t); - printf("sec=%d min=%d hour=%d\n", t.tm_sec, t.tm_min, t.tm_hour); - } -} - -int main(void) -{ - msg_t m; - kernel_pid_t pid = thread_create( - timer_stack, - sizeof(timer_stack), - THREAD_PRIORITY_MAIN - 1, - THREAD_CREATE_STACKTEST, - timer_thread, - NULL, - "timer"); - - puts("sending 1st msg"); - m.content.ptr = (char *) &msg_a; - msg_try_send(&m, pid); - - puts("sending 2nd msg"); - m.content.ptr = (char *) &msg_b; - msg_try_send(&m, pid); - - kernel_pid_t pid2 = thread_create( - timer_stack_local, - sizeof(timer_stack_local), - THREAD_PRIORITY_MAIN - 1, - THREAD_CREATE_STACKTEST, - timer_thread_local, - NULL, - "timer local"); - - timex_t sleep = timex_set(1, 0); - - while (1) { - vtimer_sleep(sleep); - msg_try_send(&m, pid2); - } -} diff --git a/tests/vtimer_msg_diff/Makefile b/tests/vtimer_msg_diff/Makefile deleted file mode 100644 index b3025c8ffdd4f..0000000000000 --- a/tests/vtimer_msg_diff/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -APPLICATION = vtimer_msg_diff -include ../Makefile.tests_common - -BOARD_INSUFFICIENT_MEMORY := mbed_lpc1768 stm32f0discovery nrf6310 pca10000 pca10005 \ - weio - -USEMODULE += vtimer - -include $(RIOTBASE)/Makefile.include diff --git a/tests/vtimer_msg_diff/main.c b/tests/vtimer_msg_diff/main.c deleted file mode 100644 index 3723be63cc28f..0000000000000 --- a/tests/vtimer_msg_diff/main.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (C) 2013 INRIA - * Copyright (C) 2014 Kaspar Schleiser - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup tests - * @{ - * - * @file - * @brief Thread test application - * - * @author Oliver Hahm - * @author Christian Mehlis - * @author Kaspar Schleiser - * - * @} - */ - -#include -#include -#include - -#include "vtimer.h" -#include "thread.h" -#include "msg.h" - -#define MAXCOUNT 100 -#define MAXDIFF 10000 - -#define MSG_QUEUE_SIZE 16 - -char timer_stack[THREAD_STACKSIZE_MAIN*4]; - -struct timer_msg { - vtimer_t timer; - timex_t interval; - char *msg; - timex_t start; - int count; -}; - -timex_t now; - -struct timer_msg timer_msgs[] = { { .interval = { .seconds = 0, .microseconds = 100000}, .msg = "T1", .start={0}, .count=0 }, - { .interval = { .seconds = 0, .microseconds = 200000}, .msg = "T2", .start={0}, .count=0 }, - { .interval = { .seconds = 0, .microseconds = 300000}, .msg = "T3", .start={0}, .count=0 }, - { .interval = { .seconds = 0, .microseconds = 500000}, .msg = "T4", .start={0}, .count=0 }, - { .interval = { .seconds = 0, .microseconds = 700000}, .msg = "T5", .start={0}, .count=0 }, - { .interval = { .seconds = 1, .microseconds = 100000}, .msg = "T6", .start={0}, .count=0 }, -}; - -void *timer_thread(void *arg) -{ - (void) arg; - printf("This is thread %" PRIkernel_pid "\n", thread_getpid()); - - msg_t msgq[MSG_QUEUE_SIZE]; - msg_init_queue(msgq, MSG_QUEUE_SIZE); - - while (1) { - msg_t m; - msg_receive(&m); - struct timer_msg *tmsg = (struct timer_msg *) m.content.ptr; - - vtimer_now(&now); - - if (tmsg->start.seconds==0 && tmsg->start.microseconds == 0) { - printf("Initializing \"%s\".\n", tmsg->msg); - tmsg->start = now; - } else { - tmsg->count++; - } - - uint64_t should = timex_uint64(tmsg->interval)*tmsg->count+timex_uint64(tmsg->start); - int64_t diff = should - timex_uint64(now); - - printf("now=%02" PRIu32 ":%02" PRIu32 " -> every %" PRIu32 ".%" PRIu32 "s: %s diff=%" PRId64 "\n", - now.seconds, - now.microseconds, - tmsg->interval.seconds, - tmsg->interval.microseconds, - tmsg->msg, diff); - - if (diff > MAXDIFF || diff < -MAXDIFF) { - printf("WARNING: timer difference %" PRId64 "us exceeds MAXDIFF(%d)!\n", diff, MAXDIFF); - } - - vtimer_set_msg(&tmsg->timer, tmsg->interval, thread_getpid(), MSG_TIMER, tmsg); - - if (tmsg->count >= MAXCOUNT) { - printf("Maximum count reached. (%d) Exiting.\n", MAXCOUNT); - break; - } - } - - return NULL; -} - -int main(void) -{ - msg_t m; - kernel_pid_t pid = thread_create( - timer_stack, - sizeof(timer_stack), - THREAD_PRIORITY_MAIN - 1, - THREAD_CREATE_STACKTEST, - timer_thread, - NULL, - "timer"); - - for (unsigned i = 0; i < sizeof(timer_msgs)/sizeof(struct timer_msg); i++) { - printf("Sending timer msg %u...\n", i); - m.content.ptr = (char *) &timer_msgs[i]; - msg_try_send(&m, pid); - } - - return 0; -} diff --git a/tests/xtimer_hang/main.c b/tests/xtimer_hang/main.c index 8faaf50c65ed0..d9589410cdd37 100644 --- a/tests/xtimer_hang/main.c +++ b/tests/xtimer_hang/main.c @@ -28,7 +28,7 @@ #define TEST_SECONDS (10U) #define TEST_TIME (TEST_SECONDS * SEC_IN_USEC) -#define STACKSIZE_TIMER (1024) +#define STACKSIZE_TIMER (THREAD_STACKSIZE_DEFAULT) char stack_timer1[STACKSIZE_TIMER]; char stack_timer2[STACKSIZE_TIMER]; diff --git a/tests/xtimer_now64_continuity/Makefile b/tests/xtimer_now64_continuity/Makefile new file mode 100644 index 0000000000000..0796faef1d4a4 --- /dev/null +++ b/tests/xtimer_now64_continuity/Makefile @@ -0,0 +1,8 @@ +export APPLICATION = xtimer_now64_continuity +include ../Makefile.tests_common + +FEATURES_REQUIRED = periph_timer + +USEMODULE += xtimer + +include $(RIOTBASE)/Makefile.include diff --git a/tests/xtimer_now64_continuity/README.md b/tests/xtimer_now64_continuity/README.md new file mode 100644 index 0000000000000..bc72736d9cac6 --- /dev/null +++ b/tests/xtimer_now64_continuity/README.md @@ -0,0 +1,5 @@ +Description +=========== + +This test measures the difference of two consecutive calls to xtimer_now64() 10k times. +Should the difference be larger then 1000us, the test fails, otherwise it succeeds. diff --git a/tests/xtimer_now64_continuity/main.c b/tests/xtimer_now64_continuity/main.c new file mode 100644 index 0000000000000..c6bf74145481e --- /dev/null +++ b/tests/xtimer_now64_continuity/main.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2015 Kaspar Schleiser + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup tests + * @{ + * + * @file + * @brief xtimer_now64 continuity test application + * + * @author Kaspar Schleiser + * + * @} + */ + +#include +#include + +#include "xtimer.h" + +#define ITERATIONS (100000LU) +#define MAXDIFF 1000 + +int main(void) +{ + uint32_t n = ITERATIONS; + uint64_t now; + uint64_t before = xtimer_now64(); + + while(--n) { + now = xtimer_now64(); + if ((now-before) > MAXDIFF) { + puts("TEST FAILED."); + break; + } + before = now; + } + + if (!n) { + puts("TEST SUCCESSFUL."); + } + + return 0; +}