diff --git a/demos/various/RT-ARMCM4-MAKELIB/dummy/_header.h b/demos/various/RT-ARMCM4-MAKELIB/dummy/_header.h
index b38d0d3bd..e0fa1e827 100644
--- a/demos/various/RT-ARMCM4-MAKELIB/dummy/_header.h
+++ b/demos/various/RT-ARMCM4-MAKELIB/dummy/_header.h
@@ -1,25 +1,25 @@
-/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-#include
-#include
-#include
-
-#include "cmparams.h"
-
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include
+#include
+#include
+
+#include "cmparams.h"
+
diff --git a/demos/various/RT-ARMCM4-USELIB/rt/ch.h b/demos/various/RT-ARMCM4-USELIB/rt/ch.h
index 044cdb262..019197b07 100644
--- a/demos/various/RT-ARMCM4-USELIB/rt/ch.h
+++ b/demos/various/RT-ARMCM4-USELIB/rt/ch.h
@@ -1,1629 +1,1629 @@
-/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-#include
-#include
-#include
-
-#include "cmparams.h"
-
-#define CH_H
-#define _CHIBIOS_RT_
-#define CH_KERNEL_STABLE 0
-#define CH_KERNEL_VERSION "6.0.0"
-#define CH_KERNEL_MAJOR 6
-#define CH_KERNEL_MINOR 0
-#define CH_KERNEL_PATCH 0
-#define FALSE 0
-#define TRUE 1
-#define CHCONF_H
-#define _CHIBIOS_RT_CONF_
-#define _CHIBIOS_RT_CONF_VER_6_0_
-#define CH_CFG_ST_RESOLUTION 32
-#define CH_CFG_ST_FREQUENCY 1000
-#define CH_CFG_INTERVALS_SIZE 32
-#define CH_CFG_TIME_TYPES_SIZE 32
-#define CH_CFG_ST_TIMEDELTA 0
-#define CH_CFG_TIME_QUANTUM 0
-#define CH_CFG_MEMCORE_SIZE 0
-#define CH_CFG_NO_IDLE_THREAD FALSE
-#define CH_CFG_OPTIMIZE_SPEED TRUE
-#define CH_CFG_USE_TM TRUE
-#define CH_CFG_USE_REGISTRY TRUE
-#define CH_CFG_USE_WAITEXIT TRUE
-#define CH_CFG_USE_SEMAPHORES TRUE
-#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
-#define CH_CFG_USE_MUTEXES TRUE
-#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
-#define CH_CFG_USE_CONDVARS TRUE
-#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
-#define CH_CFG_USE_EVENTS TRUE
-#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
-#define CH_CFG_USE_MESSAGES TRUE
-#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
-#define CH_CFG_USE_MAILBOXES TRUE
-#define CH_CFG_USE_MEMCORE TRUE
-#define CH_CFG_USE_HEAP TRUE
-#define CH_CFG_USE_MEMPOOLS TRUE
-#define CH_CFG_USE_OBJ_FIFOS TRUE
-#define CH_CFG_USE_PIPES TRUE
-#define CH_CFG_USE_DYNAMIC TRUE
-#define CH_CFG_USE_FACTORY TRUE
-#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
-#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
-#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
-#define CH_CFG_FACTORY_SEMAPHORES TRUE
-#define CH_CFG_FACTORY_MAILBOXES TRUE
-#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
-#define CH_CFG_FACTORY_PIPES TRUE
-#define CH_DBG_STATISTICS FALSE
-#define CH_DBG_SYSTEM_STATE_CHECK FALSE
-#define CH_DBG_ENABLE_CHECKS FALSE
-#define CH_DBG_ENABLE_ASSERTS FALSE
-#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
-#define CH_DBG_TRACE_BUFFER_SIZE 128
-#define CH_DBG_ENABLE_STACK_CHECK FALSE
-#define CH_DBG_FILL_THREADS FALSE
-#define CH_DBG_THREADS_PROFILING FALSE
-#define CH_CFG_SYSTEM_EXTRA_FIELDS
-#define CH_CFG_SYSTEM_INIT_HOOK() { }
-#define CH_CFG_THREAD_EXTRA_FIELDS
-#define CH_CFG_THREAD_INIT_HOOK(tp) { }
-#define CH_CFG_THREAD_EXIT_HOOK(tp) { }
-#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp,otp) { }
-#define CH_CFG_IRQ_PROLOGUE_HOOK() { }
-#define CH_CFG_IRQ_EPILOGUE_HOOK() { }
-#define CH_CFG_IDLE_ENTER_HOOK() { }
-#define CH_CFG_IDLE_LEAVE_HOOK() { }
-#define CH_CFG_IDLE_LOOP_HOOK() { }
-#define CH_CFG_SYSTEM_TICK_HOOK() { }
-#define CH_CFG_SYSTEM_HALT_HOOK(reason) { }
-#define CH_CFG_TRACE_HOOK(tep) { }
-#define CHCHECKS_H
-#define CHLICENSE_H
-#define CH_FEATURES_BASIC 0
-#define CH_FEATURES_INTERMEDIATE 1
-#define CH_FEATURES_FULL 2
-#define CH_DEPLOY_UNLIMITED -1
-#define CH_DEPLOY_NONE 0
-#define CH_LICENSE_GPL 0
-#define CH_LICENSE_GPL_EXCEPTION 1
-#define CH_LICENSE_COMMERCIAL_FREE 2
-#define CH_LICENSE_COMMERCIAL_DEV_1000 3
-#define CH_LICENSE_COMMERCIAL_DEV_5000 4
-#define CH_LICENSE_COMMERCIAL_FULL 5
-#define CH_LICENSE_COMMERCIAL_RUNTIME 6
-#define CH_LICENSE_PARTNER 7
-#define CHCUSTOMER_H
-#define CH_CUSTOMER_ID_STRING "Santa, North Pole"
-#define CH_CUSTOMER_ID_CODE "xxxx-yyyy"
-#define CH_LICENSE CH_LICENSE_GPL
-#define CH_CUSTOMER_LIC_RT TRUE
-#define CH_CUSTOMER_LIC_NIL TRUE
-#define CH_CUSTOMER_LIC_OSLIB TRUE
-#define CH_CUSTOMER_LIC_EX TRUE
-#define CH_CUSTOMER_LIC_PORT_CM0 TRUE
-#define CH_CUSTOMER_LIC_PORT_CM3 TRUE
-#define CH_CUSTOMER_LIC_PORT_CM4 TRUE
-#define CH_CUSTOMER_LIC_PORT_CM7 TRUE
-#define CH_CUSTOMER_LIC_PORT_ARM79 TRUE
-#define CH_CUSTOMER_LIC_PORT_E200Z0 TRUE
-#define CH_CUSTOMER_LIC_PORT_E200Z2 TRUE
-#define CH_CUSTOMER_LIC_PORT_E200Z3 TRUE
-#define CH_CUSTOMER_LIC_PORT_E200Z4 TRUE
-#define CH_LICENSE_TYPE_STRING "GNU General Public License 3 (GPL3)"
-#define CH_LICENSE_ID_STRING "N/A"
-#define CH_LICENSE_ID_CODE "N/A"
-#define CH_LICENSE_MODIFIABLE_CODE TRUE
-#define CH_LICENSE_FEATURES CH_FEATURES_FULL
-#define CH_LICENSE_MAX_DEPLOY CH_DEPLOY_UNLIMITED
-#define CHRESTRICTIONS_H
- void chSysHalt(const char *reason);
-#define CHTYPES_H
-typedef uint32_t rtcnt_t;
-typedef uint64_t rttime_t;
-typedef uint32_t syssts_t;
-typedef uint8_t tmode_t;
-typedef uint8_t tstate_t;
-typedef uint8_t trefs_t;
-typedef uint8_t tslices_t;
-typedef uint32_t tprio_t;
-typedef int32_t msg_t;
-typedef int32_t eventid_t;
-typedef uint32_t eventmask_t;
-typedef uint32_t eventflags_t;
-typedef int32_t cnt_t;
-typedef uint32_t ucnt_t;
-#define ROMCONST const
-#define NOINLINE __attribute__((noinline))
-#define PORT_THD_FUNCTION(tname,arg) void tname(void *arg)
-#define PACKED_VAR __attribute__((packed))
-#define ALIGNED_VAR(n) __attribute__((aligned(n)))
-#define SIZEOF_PTR 4
-#define REVERSE_ORDER 1
-#define CHSYSTYPES_H
-typedef struct ch_thread thread_t;
-typedef thread_t * thread_reference_t;
-typedef struct ch_threads_list threads_list_t;
-typedef struct ch_threads_queue threads_queue_t;
-typedef struct ch_ready_list ready_list_t;
-typedef void (*vtfunc_t)(void *p);
-typedef struct ch_virtual_timer virtual_timer_t;
-typedef struct ch_virtual_timers_list virtual_timers_list_t;
-typedef struct ch_system_debug system_debug_t;
-typedef struct ch_system ch_system_t;
-#define __CH_STRINGIFY(a) #a
-#define CHDEBUG_H
-#define CH_DBG_STACK_FILL_VALUE 0x55
-#define _dbg_enter_lock()
-#define _dbg_leave_lock()
-#define _dbg_check_disable()
-#define _dbg_check_suspend()
-#define _dbg_check_enable()
-#define _dbg_check_lock()
-#define _dbg_check_unlock()
-#define _dbg_check_lock_from_isr()
-#define _dbg_check_unlock_from_isr()
-#define _dbg_check_enter_isr()
-#define _dbg_check_leave_isr()
-#define chDbgCheckClassI()
-#define chDbgCheckClassS()
-#define chDbgCheck(c) do { if (CH_DBG_ENABLE_CHECKS != FALSE) { if (!(c)) { chSysHalt(__func__); } } } while (false)
-#define chDbgAssert(c,r) do { if (CH_DBG_ENABLE_ASSERTS != FALSE) { if (!(c)) { chSysHalt(__func__); } } } while (false)
-#define CHTIME_H
-#define TIME_IMMEDIATE ((sysinterval_t)0)
-#define TIME_INFINITE ((sysinterval_t)-1)
-#define TIME_MAX_INTERVAL ((sysinterval_t)-2)
-#define TIME_MAX_SYSTIME ((systime_t)-1)
-typedef uint32_t systime_t;
-typedef uint32_t sysinterval_t;
-typedef uint32_t time_secs_t;
-typedef uint32_t time_msecs_t;
-typedef uint32_t time_usecs_t;
-typedef uint64_t time_conv_t;
-#define TIME_S2I(secs) ((sysinterval_t)((time_conv_t)(secs) * (time_conv_t)CH_CFG_ST_FREQUENCY))
-#define TIME_MS2I(msecs) ((sysinterval_t)((((time_conv_t)(msecs) * (time_conv_t)CH_CFG_ST_FREQUENCY) + (time_conv_t)999) / (time_conv_t)1000))
-#define TIME_US2I(usecs) ((sysinterval_t)((((time_conv_t)(usecs) * (time_conv_t)CH_CFG_ST_FREQUENCY) + (time_conv_t)999999) / (time_conv_t)1000000))
-#define TIME_I2S(interval) (time_secs_t)(((time_conv_t)(interval) + (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY)
-#define TIME_I2MS(interval) (time_msecs_t)((((time_conv_t)(interval) * (time_conv_t)1000) + (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY)
-#define TIME_I2US(interval) (time_msecs_t)((((time_conv_t)(interval) * (time_conv_t)1000000) + (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY)
-static inline sysinterval_t chTimeS2I(time_secs_t secs) {
- time_conv_t ticks;
- ticks = (time_conv_t)secs * (time_conv_t)CH_CFG_ST_FREQUENCY;
- chDbgAssert(ticks <= (time_conv_t)TIME_MAX_INTERVAL,
- "conversion overflow");
- return (sysinterval_t)ticks;
-}
-static inline sysinterval_t chTimeMS2I(time_msecs_t msec) {
- time_conv_t ticks;
- ticks = (((time_conv_t)msec * (time_conv_t)CH_CFG_ST_FREQUENCY) +
- (time_conv_t)999) / (time_conv_t)1000;
- chDbgAssert(ticks <= (time_conv_t)TIME_MAX_INTERVAL,
- "conversion overflow");
- return (sysinterval_t)ticks;
-}
-static inline sysinterval_t chTimeUS2I(time_usecs_t usec) {
- time_conv_t ticks;
- ticks = (((time_conv_t)usec * (time_conv_t)CH_CFG_ST_FREQUENCY) +
- (time_conv_t)999999) / (time_conv_t)1000000;
- chDbgAssert(ticks <= (time_conv_t)TIME_MAX_INTERVAL,
- "conversion overflow");
- return (sysinterval_t)ticks;
-}
-static inline time_secs_t chTimeI2S(sysinterval_t interval) {
- time_conv_t secs;
- secs = ((time_conv_t)interval +
- (time_conv_t)CH_CFG_ST_FREQUENCY -
- (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY;
- chDbgAssert(secs < (time_conv_t)((time_secs_t)-1),
- "conversion overflow");
- return (time_secs_t)secs;
-}
-static inline time_msecs_t chTimeI2MS(sysinterval_t interval) {
- time_conv_t msecs;
- msecs = (((time_conv_t)interval * (time_conv_t)1000) +
- (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) /
- (time_conv_t)CH_CFG_ST_FREQUENCY;
- chDbgAssert(msecs < (time_conv_t)((time_msecs_t)-1),
- "conversion overflow");
- return (time_msecs_t)msecs;
-}
-static inline time_usecs_t chTimeI2US(sysinterval_t interval) {
- time_conv_t usecs;
- usecs = (((time_conv_t)interval * (time_conv_t)1000000) +
- (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) /
- (time_conv_t)CH_CFG_ST_FREQUENCY;
- chDbgAssert(usecs <= (time_conv_t)((time_usecs_t)-1),
- "conversion overflow");
- return (time_usecs_t)usecs;
-}
-static inline systime_t chTimeAddX(systime_t systime,
- sysinterval_t interval) {
- return systime + (systime_t)interval;
-}
-static inline sysinterval_t chTimeDiffX(systime_t start, systime_t end) {
- return (sysinterval_t)((systime_t)(end - start));
-}
-static inline bool chTimeIsInRangeX(systime_t time,
- systime_t start,
- systime_t end) {
- return (bool)((systime_t)((systime_t)time - (systime_t)start) <
- (systime_t)((systime_t)end - (systime_t)start));
-}
-#define CHALIGN_H
-#define MEM_ALIGN_MASK(a) ((size_t)(a) - 1U)
-#define MEM_ALIGN_PREV(p,a) ((size_t)(p) & ~MEM_ALIGN_MASK(a))
-#define MEM_ALIGN_NEXT(p,a) MEM_ALIGN_PREV((size_t)(p) + MEM_ALIGN_MASK(a), (a))
-#define MEM_IS_ALIGNED(p,a) (((size_t)(p) & MEM_ALIGN_MASK(a)) == 0U)
-#define MEM_IS_VALID_ALIGNMENT(a) (((size_t)(a) != 0U) && (((size_t)(a) & ((size_t)(a) - 1U)) == 0U))
-#define CHCORE_H
-#define PORT_ARCHITECTURE_ARM
-#define PORT_COMPILER_NAME "GCC " __VERSION__
-#define PORT_USE_ALT_TIMER FALSE
-typedef void *regarm_t;
-typedef uint64_t stkalign_t;
-struct port_context {
- struct port_intctx *sp;
-};
-#define CORTEX_PRIORITY_LEVELS (1U << CORTEX_PRIORITY_BITS)
-#define CORTEX_MINIMUM_PRIORITY (CORTEX_PRIORITY_LEVELS - 1)
-#define CORTEX_MAXIMUM_PRIORITY 0U
-#define CORTEX_PRIO_MASK(n) ((n) << (8U - (unsigned)CORTEX_PRIORITY_BITS))
-#define PORT_IRQ_IS_VALID_PRIORITY(n) (((n) >= 0U) && ((n) < CORTEX_PRIORITY_LEVELS))
-#define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) (((n) >= CORTEX_MAX_KERNEL_PRIORITY) && ((n) < CORTEX_PRIORITY_LEVELS))
-#define MPU_H
-#define MPU_TYPE_SEPARATED (1U << 0U)
-#define MPU_TYPE_DREGION(n) (((n) >> 8U) & 255U)
-#define MPU_TYPE_IREGION(n) (((n) >> 16U) & 255U)
-#define MPU_CTRL_ENABLE (1U << 0U)
-#define MPU_CTRL_HFNMIENA (1U << 1U)
-#define MPU_CTRL_PRIVDEFENA (1U << 2U)
-#define MPU_RNR_REGION_MASK (255U << 0U)
-#define MPU_RNR_REGION(n) ((n) << 0U)
-#define MPU_RBAR_REGION_MASK (15U << 0U)
-#define MPU_RBAR_REGION(n) ((n) << 0U)
-#define MPU_RBAR_VALID (1U << 4U)
-#define MPU_RBAR_ADDR_MASK 0xFFFFFFE0U
-#define MPU_RBAR_ADDR(n) ((n) << 5U)
-#define MPU_RASR_ENABLE (1U << 0U)
-#define MPU_RASR_SIZE_MASK (31U << 1U)
-#define MPU_RASR_SIZE(n) ((n) << 1U)
-#define MPU_RASR_SIZE_32 MPU_RASR_SIZE(4U)
-#define MPU_RASR_SIZE_64 MPU_RASR_SIZE(5U)
-#define MPU_RASR_SIZE_128 MPU_RASR_SIZE(6U)
-#define MPU_RASR_SIZE_256 MPU_RASR_SIZE(7U)
-#define MPU_RASR_SIZE_512 MPU_RASR_SIZE(8U)
-#define MPU_RASR_SIZE_1K MPU_RASR_SIZE(9U)
-#define MPU_RASR_SIZE_2K MPU_RASR_SIZE(10U)
-#define MPU_RASR_SIZE_4K MPU_RASR_SIZE(11U)
-#define MPU_RASR_SIZE_8K MPU_RASR_SIZE(12U)
-#define MPU_RASR_SIZE_16K MPU_RASR_SIZE(13U)
-#define MPU_RASR_SIZE_32K MPU_RASR_SIZE(14U)
-#define MPU_RASR_SIZE_64K MPU_RASR_SIZE(15U)
-#define MPU_RASR_SIZE_128K MPU_RASR_SIZE(16U)
-#define MPU_RASR_SIZE_256K MPU_RASR_SIZE(17U)
-#define MPU_RASR_SIZE_512K MPU_RASR_SIZE(18U)
-#define MPU_RASR_SIZE_1M MPU_RASR_SIZE(19U)
-#define MPU_RASR_SIZE_2M MPU_RASR_SIZE(20U)
-#define MPU_RASR_SIZE_4M MPU_RASR_SIZE(21U)
-#define MPU_RASR_SIZE_8M MPU_RASR_SIZE(22U)
-#define MPU_RASR_SIZE_16M MPU_RASR_SIZE(23U)
-#define MPU_RASR_SIZE_32M MPU_RASR_SIZE(24U)
-#define MPU_RASR_SIZE_64M MPU_RASR_SIZE(25U)
-#define MPU_RASR_SIZE_128M MPU_RASR_SIZE(26U)
-#define MPU_RASR_SIZE_256M MPU_RASR_SIZE(27U)
-#define MPU_RASR_SIZE_512M MPU_RASR_SIZE(28U)
-#define MPU_RASR_SIZE_1G MPU_RASR_SIZE(29U)
-#define MPU_RASR_SIZE_2G MPU_RASR_SIZE(30U)
-#define MPU_RASR_SIZE_4G MPU_RASR_SIZE(31U)
-#define MPU_RASR_SRD_MASK (255U << 8U)
-#define MPU_RASR_SRD(n) ((n) << 8U)
-#define MPU_RASR_SRD_ALL (0U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB0 (1U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB1 (2U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB2 (4U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB3 (8U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB4 (16U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB5 (32U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB6 (64U << 8U)
-#define MPU_RASR_SRD_DISABLE_SUB7 (128U << 8U)
-#define MPU_RASR_ATTR_B (1U << 16U)
-#define MPU_RASR_ATTR_C (1U << 17U)
-#define MPU_RASR_ATTR_S (1U << 18U)
-#define MPU_RASR_ATTR_TEX_MASK (7U << 19U)
-#define MPU_RASR_ATTR_TEX(n) ((n) << 19U)
-#define MPU_RASR_ATTR_AP_MASK (7U << 24U)
-#define MPU_RASR_ATTR_AP(n) ((n) << 24U)
-#define MPU_RASR_ATTR_AP_NA_NA (0U << 24U)
-#define MPU_RASR_ATTR_AP_RW_NA (1U << 24U)
-#define MPU_RASR_ATTR_AP_RW_RO (2U << 24U)
-#define MPU_RASR_ATTR_AP_RW_RW (3U << 24U)
-#define MPU_RASR_ATTR_AP_RO_NA (5U << 24U)
-#define MPU_RASR_ATTR_AP_RO_RO (6U << 24U)
-#define MPU_RASR_ATTR_XN (1U << 28U)
-#define MPU_RASR_ATTR_STRONGLY_ORDERED (MPU_RASR_ATTR_TEX(0))
-#define MPU_RASR_ATTR_SHARED_DEVICE (MPU_RASR_ATTR_TEX(0) | MPU_RASR_ATTR_B)
-#define MPU_RASR_ATTR_CACHEABLE_WT_NWA (MPU_RASR_ATTR_TEX(0) | MPU_RASR_ATTR_C)
-#define MPU_RASR_ATTR_CACHEABLE_WB_NWA (MPU_RASR_ATTR_TEX(0) | MPU_RASR_ATTR_B | MPU_RASR_ATTR_C)
-#define MPU_RASR_ATTR_NON_CACHEABLE (MPU_RASR_ATTR_TEX(1))
-#define MPU_RASR_ATTR_CACHEABLE_WB_WA (MPU_RASR_ATTR_TEX(1) | MPU_RASR_ATTR_B | MPU_RASR_ATTR_C)
-#define MPU_RASR_ATTR_NON_SHARED_DEVICE (MPU_RASR_ATTR_TEX(2))
-#define MPU_REGION_0 0U
-#define MPU_REGION_1 1U
-#define MPU_REGION_2 2U
-#define MPU_REGION_3 3U
-#define MPU_REGION_4 4U
-#define MPU_REGION_5 5U
-#define MPU_REGION_6 6U
-#define MPU_REGION_7 7U
-#define mpuEnable(ctrl) { MPU->CTRL = ((uint32_t)ctrl) | MPU_CTRL_ENABLE; SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; }
-#define mpuDisable() { SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; MPU->CTRL = 0; }
-#define mpuConfigureRegion(region,addr,attribs) { MPU->RNR = ((uint32_t)region); MPU->RBAR = ((uint32_t)addr); MPU->RASR = ((uint32_t)attribs); }
-#define mpuSetRegionAddress(region,addr) { MPU->RNR = ((uint32_t)region); MPU->RBAR = ((uint32_t)addr); }
-#define CHCORE_V7M_H
-#define PORT_SUPPORTS_RT TRUE
-#define PORT_NATURAL_ALIGN sizeof (void *)
-#define PORT_STACK_ALIGN sizeof (stkalign_t)
-#define PORT_WORKING_AREA_ALIGN (PORT_ENABLE_GUARD_PAGES == TRUE ? 32U : PORT_STACK_ALIGN)
-#define CORTEX_BASEPRI_DISABLED 0U
-#define PORT_ENABLE_GUARD_PAGES FALSE
-#define PORT_USE_MPU_REGION MPU_REGION_7
-#define PORT_IDLE_THREAD_STACK_SIZE 16
-#define PORT_INT_REQUIRED_STACK 64
-#define CORTEX_ENABLE_WFI_IDLE FALSE
-#define CORTEX_SIMPLIFIED_PRIORITY FALSE
-#define CORTEX_PRIORITY_SVCALL (CORTEX_MAXIMUM_PRIORITY + 1U)
-#define CORTEX_PRIGROUP_INIT (7 - CORTEX_PRIORITY_BITS)
- #define PORT_GUARD_PAGE_SIZE 0U
- #define PORT_ARCHITECTURE_ARM_v7ME
- #define PORT_ARCHITECTURE_NAME "ARMv7E-M"
- #define PORT_CORE_VARIANT_NAME "Cortex-M4"
-#define PORT_INFO "Advanced kernel mode"
-#define CORTEX_MAX_KERNEL_PRIORITY (CORTEX_PRIORITY_SVCALL + 1U)
-#define CORTEX_BASEPRI_KERNEL CORTEX_PRIO_MASK(CORTEX_MAX_KERNEL_PRIORITY)
-#define CORTEX_PRIORITY_PENDSV CORTEX_MAX_KERNEL_PRIORITY
-struct port_extctx {
- regarm_t r0;
- regarm_t r1;
- regarm_t r2;
- regarm_t r3;
- regarm_t r12;
- regarm_t lr_thd;
- regarm_t pc;
- regarm_t xpsr;
-};
-struct port_intctx {
- regarm_t r4;
- regarm_t r5;
- regarm_t r6;
- regarm_t r7;
- regarm_t r8;
- regarm_t r9;
- regarm_t r10;
- regarm_t r11;
- regarm_t lr;
-};
-#define PORT_SETUP_CONTEXT(tp,wbase,wtop,pf,arg) { (tp)->ctx.sp = (struct port_intctx *)((uint8_t *)(wtop) - sizeof (struct port_intctx)); (tp)->ctx.sp->r4 = (regarm_t)(pf); (tp)->ctx.sp->r5 = (regarm_t)(arg); (tp)->ctx.sp->lr = (regarm_t)_port_thread_start; }
-#define PORT_WA_SIZE(n) ((size_t)PORT_GUARD_PAGE_SIZE + sizeof (struct port_intctx) + sizeof (struct port_extctx) + (size_t)(n) + (size_t)PORT_INT_REQUIRED_STACK)
-#define PORT_WORKING_AREA(s,n) stkalign_t s[THD_WORKING_AREA_SIZE(n) / sizeof (stkalign_t)]
-#define PORT_IRQ_PROLOGUE()
-#define PORT_IRQ_EPILOGUE() _port_irq_epilogue()
-#define PORT_IRQ_HANDLER(id) void id(void)
-#define PORT_FAST_IRQ_HANDLER(id) void id(void)
-#define port_switch(ntp,otp) _port_switch(ntp, otp)
- void _port_irq_epilogue(void);
- void _port_switch(thread_t *ntp, thread_t *otp);
- void _port_thread_start(void);
- void _port_switch_from_isr(void);
- void _port_exit_from_isr(void);
-static inline void port_init(void) {
- NVIC_SetPriorityGrouping(CORTEX_PRIGROUP_INIT);
- CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
- DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
- NVIC_SetPriority(SVCall_IRQn, CORTEX_PRIORITY_SVCALL);
- NVIC_SetPriority(PendSV_IRQn, CORTEX_PRIORITY_PENDSV);
-}
-static inline syssts_t port_get_irq_status(void) {
- syssts_t sts;
- sts = (syssts_t)__get_BASEPRI();
- return sts;
-}
-static inline bool port_irq_enabled(syssts_t sts) {
- return sts == (syssts_t)CORTEX_BASEPRI_DISABLED;
-}
-static inline bool port_is_isr_context(void) {
- return (bool)((__get_IPSR() & 0x1FFU) != 0U);
-}
-static inline void port_lock(void) {
- __set_BASEPRI(CORTEX_BASEPRI_KERNEL);
-}
-static inline void port_unlock(void) {
- __set_BASEPRI(CORTEX_BASEPRI_DISABLED);
-}
-static inline void port_lock_from_isr(void) {
- port_lock();
-}
-static inline void port_unlock_from_isr(void) {
- port_unlock();
-}
-static inline void port_disable(void) {
- __disable_irq();
-}
-static inline void port_suspend(void) {
- __set_BASEPRI(CORTEX_BASEPRI_KERNEL);
- __enable_irq();
-}
-static inline void port_enable(void) {
- __set_BASEPRI(CORTEX_BASEPRI_DISABLED);
- __enable_irq();
-}
-static inline void port_wait_for_interrupt(void) {
-}
-static inline rtcnt_t port_rt_get_counter_value(void) {
- return DWT->CYCCNT;
-}
-#define CHTRACE_H
-#define CH_TRACE_TYPE_UNUSED 0U
-#define CH_TRACE_TYPE_SWITCH 1U
-#define CH_TRACE_TYPE_ISR_ENTER 2U
-#define CH_TRACE_TYPE_ISR_LEAVE 3U
-#define CH_TRACE_TYPE_HALT 4U
-#define CH_TRACE_TYPE_USER 5U
-#define CH_DBG_TRACE_MASK_DISABLED 255U
-#define CH_DBG_TRACE_MASK_NONE 0U
-#define CH_DBG_TRACE_MASK_SWITCH 1U
-#define CH_DBG_TRACE_MASK_ISR 2U
-#define CH_DBG_TRACE_MASK_HALT 4U
-#define CH_DBG_TRACE_MASK_USER 8U
-#define CH_DBG_TRACE_MASK_SLOW (CH_DBG_TRACE_MASK_SWITCH | CH_DBG_TRACE_MASK_HALT | CH_DBG_TRACE_MASK_USER)
-#define CH_DBG_TRACE_MASK_ALL (CH_DBG_TRACE_MASK_SWITCH | CH_DBG_TRACE_MASK_ISR | CH_DBG_TRACE_MASK_HALT | CH_DBG_TRACE_MASK_USER)
-#define _trace_init()
-#define _trace_switch(ntp,otp)
-#define _trace_isr_enter(isr)
-#define _trace_isr_leave(isr)
-#define _trace_halt(reason)
-#define chDbgWriteTraceI(up1,up2)
-#define chDbgWriteTrace(up1,up2)
-#define CHTM_H
-typedef struct {
- rtcnt_t offset;
-} tm_calibration_t;
-typedef struct {
- rtcnt_t best;
- rtcnt_t worst;
- rtcnt_t last;
- ucnt_t n;
- rttime_t cumulative;
-} time_measurement_t;
- void _tm_init(void);
- void chTMObjectInit(time_measurement_t *tmp);
- NOINLINE void chTMStartMeasurementX(time_measurement_t *tmp);
- NOINLINE void chTMStopMeasurementX(time_measurement_t *tmp);
- NOINLINE void chTMChainMeasurementToX(time_measurement_t *tmp1,
- time_measurement_t *tmp2);
-#define CHSTATS_H
-#define _stats_increase_irq()
-#define _stats_ctxswc(old,new)
-#define _stats_start_measure_crit_thd()
-#define _stats_stop_measure_crit_thd()
-#define _stats_start_measure_crit_isr()
-#define _stats_stop_measure_crit_isr()
-#define CHSCHD_H
-#define MSG_OK (msg_t)0
-#define MSG_TIMEOUT (msg_t)-1
-#define MSG_RESET (msg_t)-2
-#define NOPRIO (tprio_t)0
-#define IDLEPRIO (tprio_t)1
-#define LOWPRIO (tprio_t)2
-#define NORMALPRIO (tprio_t)128
-#define HIGHPRIO (tprio_t)255
-#define CH_STATE_READY (tstate_t)0
-#define CH_STATE_CURRENT (tstate_t)1
-#define CH_STATE_WTSTART (tstate_t)2
-#define CH_STATE_SUSPENDED (tstate_t)3
-#define CH_STATE_QUEUED (tstate_t)4
-#define CH_STATE_WTSEM (tstate_t)5
-#define CH_STATE_WTMTX (tstate_t)6
-#define CH_STATE_WTCOND (tstate_t)7
-#define CH_STATE_SLEEPING (tstate_t)8
-#define CH_STATE_WTEXIT (tstate_t)9
-#define CH_STATE_WTOREVT (tstate_t)10
-#define CH_STATE_WTANDEVT (tstate_t)11
-#define CH_STATE_SNDMSGQ (tstate_t)12
-#define CH_STATE_SNDMSG (tstate_t)13
-#define CH_STATE_WTMSG (tstate_t)14
-#define CH_STATE_FINAL (tstate_t)15
-#define CH_STATE_NAMES "READY", "CURRENT", "WTSTART", "SUSPENDED", "QUEUED", "WTSEM", "WTMTX", "WTCOND", "SLEEPING", "WTEXIT", "WTOREVT", "WTANDEVT", "SNDMSGQ", "SNDMSG", "WTMSG", "FINAL"
-#define CH_FLAG_MODE_MASK (tmode_t)3U
-#define CH_FLAG_MODE_STATIC (tmode_t)0U
-#define CH_FLAG_MODE_HEAP (tmode_t)1U
-#define CH_FLAG_MODE_MPOOL (tmode_t)2U
-#define CH_FLAG_TERMINATE (tmode_t)4U
-struct ch_threads_list {
- thread_t *next;
-};
-struct ch_threads_queue {
- thread_t *next;
- thread_t *prev;
-};
-struct ch_thread {
- threads_queue_t queue;
- tprio_t prio;
- struct port_context ctx;
- thread_t *newer;
- thread_t *older;
- const char *name;
- stkalign_t *wabase;
- tstate_t state;
- tmode_t flags;
- trefs_t refs;
- union {
- msg_t rdymsg;
- msg_t exitcode;
- void *wtobjp;
- thread_reference_t *wttrp;
- msg_t sentmsg;
- struct ch_semaphore *wtsemp;
- struct ch_mutex *wtmtxp;
- eventmask_t ewmask;
- } u;
- threads_list_t waiting;
- threads_queue_t msgqueue;
- eventmask_t epending;
- struct ch_mutex *mtxlist;
- tprio_t realprio;
- void *mpool;
- CH_CFG_THREAD_EXTRA_FIELDS
-};
-struct ch_virtual_timer {
- virtual_timer_t *next;
- virtual_timer_t *prev;
- sysinterval_t delta;
- vtfunc_t func;
- void *par;
-};
-struct ch_virtual_timers_list {
- virtual_timer_t *next;
- virtual_timer_t *prev;
- sysinterval_t delta;
- volatile systime_t systime;
-};
-struct ch_ready_list {
- threads_queue_t queue;
- tprio_t prio;
- struct port_context ctx;
- thread_t *newer;
- thread_t *older;
- thread_t *current;
-};
-struct ch_system_debug {
- const char * volatile panic_msg;
-};
-struct ch_system {
- ready_list_t rlist;
- virtual_timers_list_t vtlist;
- system_debug_t dbg;
- thread_t mainthread;
- tm_calibration_t tm;
- CH_CFG_SYSTEM_EXTRA_FIELDS
-};
-#define firstprio(rlp) ((rlp)->next->prio)
-#define currp ch.rlist.current
-extern ch_system_t ch;
- void _scheduler_init(void);
- thread_t *chSchReadyI(thread_t *tp);
- thread_t *chSchReadyAheadI(thread_t *tp);
- void chSchGoSleepS(tstate_t newstate);
- msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout);
- void chSchWakeupS(thread_t *ntp, msg_t msg);
- void chSchRescheduleS(void);
- bool chSchIsPreemptionRequired(void);
- void chSchDoRescheduleBehind(void);
- void chSchDoRescheduleAhead(void);
- void chSchDoReschedule(void);
-static inline void list_init(threads_list_t *tlp) {
- tlp->next = (thread_t *)tlp;
-}
-static inline bool list_isempty(threads_list_t *tlp) {
- return (bool)(tlp->next == (thread_t *)tlp);
-}
-static inline bool list_notempty(threads_list_t *tlp) {
- return (bool)(tlp->next != (thread_t *)tlp);
-}
-static inline void queue_init(threads_queue_t *tqp) {
- tqp->next = (thread_t *)tqp;
- tqp->prev = (thread_t *)tqp;
-}
-static inline bool queue_isempty(const threads_queue_t *tqp) {
- return (bool)(tqp->next == (const thread_t *)tqp);
-}
-static inline bool queue_notempty(const threads_queue_t *tqp) {
- return (bool)(tqp->next != (const thread_t *)tqp);
-}
-static inline void list_insert(thread_t *tp, threads_list_t *tlp) {
- tp->queue.next = tlp->next;
- tlp->next = tp;
-}
-static inline thread_t *list_remove(threads_list_t *tlp) {
- thread_t *tp = tlp->next;
- tlp->next = tp->queue.next;
- return tp;
-}
-static inline void queue_prio_insert(thread_t *tp, threads_queue_t *tqp) {
- thread_t *cp = (thread_t *)tqp;
- do {
- cp = cp->queue.next;
- } while ((cp != (thread_t *)tqp) && (cp->prio >= tp->prio));
- tp->queue.next = cp;
- tp->queue.prev = cp->queue.prev;
- tp->queue.prev->queue.next = tp;
- cp->queue.prev = tp;
-}
-static inline void queue_insert(thread_t *tp, threads_queue_t *tqp) {
- tp->queue.next = (thread_t *)tqp;
- tp->queue.prev = tqp->prev;
- tp->queue.prev->queue.next = tp;
- tqp->prev = tp;
-}
-static inline thread_t *queue_fifo_remove(threads_queue_t *tqp) {
- thread_t *tp = tqp->next;
- tqp->next = tp->queue.next;
- tqp->next->queue.prev = (thread_t *)tqp;
- return tp;
-}
-static inline thread_t *queue_lifo_remove(threads_queue_t *tqp) {
- thread_t *tp = tqp->prev;
- tqp->prev = tp->queue.prev;
- tqp->prev->queue.next = (thread_t *)tqp;
- return tp;
-}
-static inline thread_t *queue_dequeue(thread_t *tp) {
- tp->queue.prev->queue.next = tp->queue.next;
- tp->queue.next->queue.prev = tp->queue.prev;
- return tp;
-}
-static inline bool chSchIsRescRequiredI(void) {
- chDbgCheckClassI();
- return firstprio(&ch.rlist.queue) > currp->prio;
-}
-static inline bool chSchCanYieldS(void) {
- chDbgCheckClassS();
- return firstprio(&ch.rlist.queue) >= currp->prio;
-}
-static inline void chSchDoYieldS(void) {
- chDbgCheckClassS();
- if (chSchCanYieldS()) {
- chSchDoRescheduleBehind();
- }
-}
-static inline void chSchPreemption(void) {
- tprio_t p1 = firstprio(&ch.rlist.queue);
- tprio_t p2 = currp->prio;
- if (p1 > p2) {
- chSchDoRescheduleAhead();
- }
-}
-#define CHSYS_H
-#define CH_INTEGRITY_RLIST 1U
-#define CH_INTEGRITY_VTLIST 2U
-#define CH_INTEGRITY_REGISTRY 4U
-#define CH_INTEGRITY_PORT 8U
-#define CH_IRQ_IS_VALID_PRIORITY(prio) PORT_IRQ_IS_VALID_PRIORITY(prio)
-#define CH_IRQ_IS_VALID_KERNEL_PRIORITY(prio) PORT_IRQ_IS_VALID_KERNEL_PRIORITY(prio)
-#define CH_IRQ_PROLOGUE() PORT_IRQ_PROLOGUE(); CH_CFG_IRQ_PROLOGUE_HOOK(); _stats_increase_irq(); _trace_isr_enter(__func__); _dbg_check_enter_isr()
-#define CH_IRQ_EPILOGUE() _dbg_check_leave_isr(); _trace_isr_leave(__func__); CH_CFG_IRQ_EPILOGUE_HOOK(); PORT_IRQ_EPILOGUE()
-#define CH_IRQ_HANDLER(id) PORT_IRQ_HANDLER(id)
-#define CH_FAST_IRQ_HANDLER(id) PORT_FAST_IRQ_HANDLER(id)
-#define S2RTC(freq,sec) ((freq) * (sec))
-#define MS2RTC(freq,msec) (rtcnt_t)((((freq) + 999UL) / 1000UL) * (msec))
-#define US2RTC(freq,usec) (rtcnt_t)((((freq) + 999999UL) / 1000000UL) * (usec))
-#define RTC2S(freq,n) ((((n) - 1UL) / (freq)) + 1UL)
-#define RTC2MS(freq,n) ((((n) - 1UL) / ((freq) / 1000UL)) + 1UL)
-#define RTC2US(freq,n) ((((n) - 1UL) / ((freq) / 1000000UL)) + 1UL)
-#define chSysGetRealtimeCounterX() (rtcnt_t)port_rt_get_counter_value()
-#define chSysSwitch(ntp,otp) { _trace_switch(ntp, otp); _stats_ctxswc(ntp, otp); CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp); port_switch(ntp, otp); }
-extern stkalign_t ch_idle_thread_wa[];
- void chSysInit(void);
- bool chSysIntegrityCheckI(unsigned testmask);
- void chSysTimerHandlerI(void);
- syssts_t chSysGetStatusAndLockX(void);
- void chSysRestoreStatusX(syssts_t sts);
- bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end);
- void chSysPolledDelayX(rtcnt_t cycles);
-static inline void chSysDisable(void) {
- port_disable();
- _dbg_check_disable();
-}
-static inline void chSysSuspend(void) {
- port_suspend();
- _dbg_check_suspend();
-}
-static inline void chSysEnable(void) {
- _dbg_check_enable();
- port_enable();
-}
-static inline void chSysLock(void) {
- port_lock();
- _stats_start_measure_crit_thd();
- _dbg_check_lock();
-}
-static inline void chSysUnlock(void) {
- _dbg_check_unlock();
- _stats_stop_measure_crit_thd();
- chDbgAssert((ch.rlist.queue.next == (thread_t *)&ch.rlist.queue) ||
- (ch.rlist.current->prio >= ch.rlist.queue.next->prio),
- "priority order violation");
- port_unlock();
-}
-static inline void chSysLockFromISR(void) {
- port_lock_from_isr();
- _stats_start_measure_crit_isr();
- _dbg_check_lock_from_isr();
-}
-static inline void chSysUnlockFromISR(void) {
- _dbg_check_unlock_from_isr();
- _stats_stop_measure_crit_isr();
- port_unlock_from_isr();
-}
-static inline void chSysUnconditionalLock(void) {
- if (port_irq_enabled(port_get_irq_status())) {
- chSysLock();
- }
-}
-static inline void chSysUnconditionalUnlock(void) {
- if (!port_irq_enabled(port_get_irq_status())) {
- chSysUnlock();
- }
-}
-static inline thread_t *chSysGetIdleThreadX(void) {
- return ch.rlist.queue.prev;
-}
-#define CHVT_H
- void _vt_init(void);
- void chVTDoSetI(virtual_timer_t *vtp, sysinterval_t delay,
- vtfunc_t vtfunc, void *par);
- void chVTDoResetI(virtual_timer_t *vtp);
-static inline void chVTObjectInit(virtual_timer_t *vtp) {
- vtp->func = NULL;
-}
-static inline systime_t chVTGetSystemTimeX(void) {
- return ch.vtlist.systime;
-}
-static inline systime_t chVTGetSystemTime(void) {
- systime_t systime;
- chSysLock();
- systime = chVTGetSystemTimeX();
- chSysUnlock();
- return systime;
-}
-static inline sysinterval_t chVTTimeElapsedSinceX(systime_t start) {
- return chTimeDiffX(start, chVTGetSystemTimeX());
-}
-static inline bool chVTIsSystemTimeWithinX(systime_t start, systime_t end) {
- return chTimeIsInRangeX(chVTGetSystemTimeX(), start, end);
-}
-static inline bool chVTIsSystemTimeWithin(systime_t start, systime_t end) {
- return chTimeIsInRangeX(chVTGetSystemTime(), start, end);
-}
-static inline bool chVTGetTimersStateI(sysinterval_t *timep) {
- chDbgCheckClassI();
- if (&ch.vtlist == (virtual_timers_list_t *)ch.vtlist.next) {
- return false;
- }
- if (timep != NULL) {
- *timep = ch.vtlist.next->delta;
- }
- return true;
-}
-static inline bool chVTIsArmedI(const virtual_timer_t *vtp) {
- chDbgCheckClassI();
- return (bool)(vtp->func != NULL);
-}
-static inline bool chVTIsArmed(const virtual_timer_t *vtp) {
- bool b;
- chSysLock();
- b = chVTIsArmedI(vtp);
- chSysUnlock();
- return b;
-}
-static inline void chVTResetI(virtual_timer_t *vtp) {
- if (chVTIsArmedI(vtp)) {
- chVTDoResetI(vtp);
- }
-}
-static inline void chVTReset(virtual_timer_t *vtp) {
- chSysLock();
- chVTResetI(vtp);
- chSysUnlock();
-}
-static inline void chVTSetI(virtual_timer_t *vtp, sysinterval_t delay,
- vtfunc_t vtfunc, void *par) {
- chVTResetI(vtp);
- chVTDoSetI(vtp, delay, vtfunc, par);
-}
-static inline void chVTSet(virtual_timer_t *vtp, sysinterval_t delay,
- vtfunc_t vtfunc, void *par) {
- chSysLock();
- chVTSetI(vtp, delay, vtfunc, par);
- chSysUnlock();
-}
-static inline void chVTDoTickI(void) {
- chDbgCheckClassI();
- ch.vtlist.systime++;
- if (&ch.vtlist != (virtual_timers_list_t *)ch.vtlist.next) {
- --ch.vtlist.next->delta;
- while (ch.vtlist.next->delta == (sysinterval_t)0) {
- virtual_timer_t *vtp;
- vtfunc_t fn;
- vtp = ch.vtlist.next;
- fn = vtp->func;
- vtp->func = NULL;
- vtp->next->prev = (virtual_timer_t *)&ch.vtlist;
- ch.vtlist.next = vtp->next;
- chSysUnlockFromISR();
- fn(vtp->par);
- chSysLockFromISR();
- }
- }
-}
-#define CHTHREADS_H
-typedef void (*tfunc_t)(void *p);
-typedef struct {
- const char *name;
- stkalign_t *wbase;
- stkalign_t *wend;
- tprio_t prio;
- tfunc_t funcp;
- void *arg;
-} thread_descriptor_t;
-#define _THREADS_QUEUE_DATA(name) {(thread_t *)&name, (thread_t *)&name}
-#define _THREADS_QUEUE_DECL(name) threads_queue_t name = _THREADS_QUEUE_DATA(name)
-#define THD_WORKING_AREA_SIZE(n) MEM_ALIGN_NEXT(sizeof(thread_t) + PORT_WA_SIZE(n), PORT_STACK_ALIGN)
-#define THD_WORKING_AREA(s,n) PORT_WORKING_AREA(s, n)
-#define THD_WORKING_AREA_BASE(s) ((stkalign_t *)(s))
-#define THD_WORKING_AREA_END(s) (THD_WORKING_AREA_BASE(s) + (sizeof (s) / sizeof (stkalign_t)))
-#define THD_FUNCTION(tname,arg) PORT_THD_FUNCTION(tname, arg)
-#define chThdSleepSeconds(sec) chThdSleep(TIME_S2I(sec))
-#define chThdSleepMilliseconds(msec) chThdSleep(TIME_MS2I(msec))
-#define chThdSleepMicroseconds(usec) chThdSleep(TIME_US2I(usec))
- thread_t *_thread_init(thread_t *tp, const char *name, tprio_t prio);
- thread_t *chThdCreateSuspendedI(const thread_descriptor_t *tdp);
- thread_t *chThdCreateSuspended(const thread_descriptor_t *tdp);
- thread_t *chThdCreateI(const thread_descriptor_t *tdp);
- thread_t *chThdCreate(const thread_descriptor_t *tdp);
- thread_t *chThdCreateStatic(void *wsp, size_t size,
- tprio_t prio, tfunc_t pf, void *arg);
- thread_t *chThdStart(thread_t *tp);
- thread_t *chThdAddRef(thread_t *tp);
- void chThdRelease(thread_t *tp);
- void chThdExit(msg_t msg);
- void chThdExitS(msg_t msg);
- msg_t chThdWait(thread_t *tp);
- tprio_t chThdSetPriority(tprio_t newprio);
- void chThdTerminate(thread_t *tp);
- msg_t chThdSuspendS(thread_reference_t *trp);
- msg_t chThdSuspendTimeoutS(thread_reference_t *trp, sysinterval_t timeout);
- void chThdResumeI(thread_reference_t *trp, msg_t msg);
- void chThdResumeS(thread_reference_t *trp, msg_t msg);
- void chThdResume(thread_reference_t *trp, msg_t msg);
- msg_t chThdEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout);
- void chThdDequeueNextI(threads_queue_t *tqp, msg_t msg);
- void chThdDequeueAllI(threads_queue_t *tqp, msg_t msg);
- void chThdSleep(sysinterval_t time);
- void chThdSleepUntil(systime_t time);
- systime_t chThdSleepUntilWindowed(systime_t prev, systime_t next);
- void chThdYield(void);
-static inline thread_t *chThdGetSelfX(void) {
- return ch.rlist.current;
-}
-static inline tprio_t chThdGetPriorityX(void) {
- return chThdGetSelfX()->prio;
-}
-static inline stkalign_t *chThdGetWorkingAreaX(thread_t *tp) {
- return tp->wabase;
-}
-static inline bool chThdTerminatedX(thread_t *tp) {
- return (bool)(tp->state == CH_STATE_FINAL);
-}
-static inline bool chThdShouldTerminateX(void) {
- return (bool)((chThdGetSelfX()->flags & CH_FLAG_TERMINATE) != (tmode_t)0);
-}
-static inline thread_t *chThdStartI(thread_t *tp) {
- chDbgAssert(tp->state == CH_STATE_WTSTART, "wrong state");
- return chSchReadyI(tp);
-}
-static inline void chThdSleepS(sysinterval_t ticks) {
- chDbgCheck(ticks != TIME_IMMEDIATE);
- (void) chSchGoSleepTimeoutS(CH_STATE_SLEEPING, ticks);
-}
-static inline void chThdQueueObjectInit(threads_queue_t *tqp) {
- queue_init(tqp);
-}
-static inline bool chThdQueueIsEmptyI(threads_queue_t *tqp) {
- chDbgCheckClassI();
- return queue_isempty(tqp);
-}
-static inline void chThdDoDequeueNextI(threads_queue_t *tqp, msg_t msg) {
- thread_t *tp;
- chDbgAssert(queue_notempty(tqp), "empty queue");
- tp = queue_fifo_remove(tqp);
- chDbgAssert(tp->state == CH_STATE_QUEUED, "invalid state");
- tp->u.rdymsg = msg;
- (void) chSchReadyI(tp);
-}
-#define CHREGISTRY_H
-typedef struct {
- char identifier[4];
- uint8_t zero;
- uint8_t size;
- uint16_t version;
- uint8_t ptrsize;
- uint8_t timesize;
- uint8_t threadsize;
- uint8_t off_prio;
- uint8_t off_ctx;
- uint8_t off_newer;
- uint8_t off_older;
- uint8_t off_name;
- uint8_t off_stklimit;
- uint8_t off_state;
- uint8_t off_flags;
- uint8_t off_refs;
- uint8_t off_preempt;
- uint8_t off_time;
-} chdebug_t;
-#define REG_REMOVE(tp) { (tp)->older->newer = (tp)->newer; (tp)->newer->older = (tp)->older; }
-#define REG_INSERT(tp) { (tp)->newer = (thread_t *)&ch.rlist; (tp)->older = ch.rlist.older; (tp)->older->newer = (tp); ch.rlist.older = (tp); }
- extern ROMCONST chdebug_t ch_debug;
- thread_t *chRegFirstThread(void);
- thread_t *chRegNextThread(thread_t *tp);
- thread_t *chRegFindThreadByName(const char *name);
- thread_t *chRegFindThreadByPointer(thread_t *tp);
- thread_t *chRegFindThreadByWorkingArea(stkalign_t *wa);
-static inline void chRegSetThreadName(const char *name) {
- ch.rlist.current->name = name;
-}
-static inline const char *chRegGetThreadNameX(thread_t *tp) {
- return tp->name;
-}
-static inline void chRegSetThreadNameX(thread_t *tp, const char *name) {
- tp->name = name;
-}
-#define CHSEM_H
-typedef struct ch_semaphore {
- threads_queue_t queue;
- cnt_t cnt;
-} semaphore_t;
-#define _SEMAPHORE_DATA(name,n) {_THREADS_QUEUE_DATA(name.queue), n}
-#define SEMAPHORE_DECL(name,n) semaphore_t name = _SEMAPHORE_DATA(name, n)
- void chSemObjectInit(semaphore_t *sp, cnt_t n);
- void chSemReset(semaphore_t *sp, cnt_t n);
- void chSemResetI(semaphore_t *sp, cnt_t n);
- msg_t chSemWait(semaphore_t *sp);
- msg_t chSemWaitS(semaphore_t *sp);
- msg_t chSemWaitTimeout(semaphore_t *sp, sysinterval_t timeout);
- msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout);
- void chSemSignal(semaphore_t *sp);
- void chSemSignalI(semaphore_t *sp);
- void chSemAddCounterI(semaphore_t *sp, cnt_t n);
- msg_t chSemSignalWait(semaphore_t *sps, semaphore_t *spw);
-static inline void chSemFastWaitI(semaphore_t *sp) {
- chDbgCheckClassI();
- sp->cnt--;
-}
-static inline void chSemFastSignalI(semaphore_t *sp) {
- chDbgCheckClassI();
- sp->cnt++;
-}
-static inline cnt_t chSemGetCounterI(const semaphore_t *sp) {
- chDbgCheckClassI();
- return sp->cnt;
-}
-#define CHMTX_H
-typedef struct ch_mutex mutex_t;
-struct ch_mutex {
- threads_queue_t queue;
- thread_t *owner;
- mutex_t *next;
-};
-#define _MUTEX_DATA(name) {_THREADS_QUEUE_DATA(name.queue), NULL, NULL}
-#define MUTEX_DECL(name) mutex_t name = _MUTEX_DATA(name)
- void chMtxObjectInit(mutex_t *mp);
- void chMtxLock(mutex_t *mp);
- void chMtxLockS(mutex_t *mp);
- bool chMtxTryLock(mutex_t *mp);
- bool chMtxTryLockS(mutex_t *mp);
- void chMtxUnlock(mutex_t *mp);
- void chMtxUnlockS(mutex_t *mp);
- void chMtxUnlockAll(void);
- void chMtxUnlockAllS(void);
-static inline bool chMtxQueueNotEmptyS(mutex_t *mp) {
- chDbgCheckClassS();
- return queue_notempty(&mp->queue);
-}
-static inline thread_t *chMtxGetOwnerI(mutex_t *mp) {
- chDbgCheckClassI();
- return mp->owner;
-}
-static inline mutex_t *chMtxGetNextMutexX(void) {
- return chThdGetSelfX()->mtxlist;
-}
-#define CHCOND_H
-typedef struct condition_variable {
- threads_queue_t queue;
-} condition_variable_t;
-#define _CONDVAR_DATA(name) {_THREADS_QUEUE_DATA(name.queue)}
-#define CONDVAR_DECL(name) condition_variable_t name = _CONDVAR_DATA(name)
- void chCondObjectInit(condition_variable_t *cp);
- void chCondSignal(condition_variable_t *cp);
- void chCondSignalI(condition_variable_t *cp);
- void chCondBroadcast(condition_variable_t *cp);
- void chCondBroadcastI(condition_variable_t *cp);
- msg_t chCondWait(condition_variable_t *cp);
- msg_t chCondWaitS(condition_variable_t *cp);
- msg_t chCondWaitTimeout(condition_variable_t *cp, sysinterval_t timeout);
- msg_t chCondWaitTimeoutS(condition_variable_t *cp, sysinterval_t timeout);
-#define CHEVENTS_H
-typedef struct event_listener event_listener_t;
-struct event_listener {
- event_listener_t *next;
- thread_t *listener;
- eventmask_t events;
- eventflags_t flags;
- eventflags_t wflags;
-};
-typedef struct event_source {
- event_listener_t *next;
-} event_source_t;
-typedef void (*evhandler_t)(eventid_t id);
-#define ALL_EVENTS ((eventmask_t)-1)
-#define EVENT_MASK(eid) ((eventmask_t)1 << (eventmask_t)(eid))
-#define _EVENTSOURCE_DATA(name) {(event_listener_t *)(&name)}
-#define EVENTSOURCE_DECL(name) event_source_t name = _EVENTSOURCE_DATA(name)
- void chEvtRegisterMaskWithFlags(event_source_t *esp,
- event_listener_t *elp,
- eventmask_t events,
- eventflags_t wflags);
- void chEvtUnregister(event_source_t *esp, event_listener_t *elp);
- eventmask_t chEvtGetAndClearEventsI(eventmask_t events);
- eventmask_t chEvtGetAndClearEvents(eventmask_t events);
- eventmask_t chEvtAddEvents(eventmask_t events);
- eventflags_t chEvtGetAndClearFlags(event_listener_t *elp);
- eventflags_t chEvtGetAndClearFlagsI(event_listener_t *elp);
- void chEvtSignal(thread_t *tp, eventmask_t events);
- void chEvtSignalI(thread_t *tp, eventmask_t events);
- void chEvtBroadcastFlags(event_source_t *esp, eventflags_t flags);
- void chEvtBroadcastFlagsI(event_source_t *esp, eventflags_t flags);
- void chEvtDispatch(const evhandler_t *handlers, eventmask_t events);
- eventmask_t chEvtWaitOne(eventmask_t events);
- eventmask_t chEvtWaitAny(eventmask_t events);
- eventmask_t chEvtWaitAll(eventmask_t events);
- eventmask_t chEvtWaitOneTimeout(eventmask_t events, sysinterval_t timeout);
- eventmask_t chEvtWaitAnyTimeout(eventmask_t events, sysinterval_t timeout);
- eventmask_t chEvtWaitAllTimeout(eventmask_t events, sysinterval_t timeout);
-static inline void chEvtObjectInit(event_source_t *esp) {
- esp->next = (event_listener_t *)esp;
-}
-static inline void chEvtRegisterMask(event_source_t *esp,
- event_listener_t *elp,
- eventmask_t events) {
- chEvtRegisterMaskWithFlags(esp, elp, events, (eventflags_t)-1);
-}
-static inline void chEvtRegister(event_source_t *esp,
- event_listener_t *elp,
- eventid_t event) {
- chEvtRegisterMask(esp, elp, EVENT_MASK(event));
-}
-static inline bool chEvtIsListeningI(event_source_t *esp) {
- return (bool)(esp != (event_source_t *)esp->next);
-}
-static inline void chEvtBroadcast(event_source_t *esp) {
- chEvtBroadcastFlags(esp, (eventflags_t)0);
-}
-static inline void chEvtBroadcastI(event_source_t *esp) {
- chEvtBroadcastFlagsI(esp, (eventflags_t)0);
-}
-static inline eventmask_t chEvtAddEventsI(eventmask_t events) {
- return currp->epending |= events;
-}
-static inline eventmask_t chEvtGetEventsX(void) {
- return currp->epending;
-}
-#define CHMSG_H
- msg_t chMsgSend(thread_t *tp, msg_t msg);
- thread_t * chMsgWait(void);
- void chMsgRelease(thread_t *tp, msg_t msg);
-static inline bool chMsgIsPendingI(thread_t *tp) {
- chDbgCheckClassI();
- return (bool)(tp->msgqueue.next != (thread_t *)&tp->msgqueue);
-}
-static inline msg_t chMsgGet(thread_t *tp) {
- chDbgAssert(tp->state == CH_STATE_SNDMSG, "invalid state");
- return tp->u.sentmsg;
-}
-static inline void chMsgReleaseS(thread_t *tp, msg_t msg) {
- chDbgCheckClassS();
- chSchWakeupS(tp, msg);
-}
-#define CHLIB_H
-#define _CHIBIOS_OSLIB_
-#define CH_OSLIB_STABLE 0
-#define CH_OSLIB_VERSION "1.1.0"
-#define CH_OSLIB_MAJOR 1
-#define CH_OSLIB_MINOR 1
-#define CH_OSLIB_PATCH 0
-#define CHBSEM_H
-typedef struct ch_binary_semaphore {
- semaphore_t sem;
-} binary_semaphore_t;
-#define _BSEMAPHORE_DATA(name,taken) {_SEMAPHORE_DATA(name.sem, ((taken) ? 0 : 1))}
-#define BSEMAPHORE_DECL(name,taken) binary_semaphore_t name = _BSEMAPHORE_DATA(name, taken)
-static inline void chBSemObjectInit(binary_semaphore_t *bsp, bool taken) {
- chSemObjectInit(&bsp->sem, taken ? (cnt_t)0 : (cnt_t)1);
-}
-static inline msg_t chBSemWait(binary_semaphore_t *bsp) {
- return chSemWait(&bsp->sem);
-}
-static inline msg_t chBSemWaitS(binary_semaphore_t *bsp) {
- chDbgCheckClassS();
- return chSemWaitS(&bsp->sem);
-}
-static inline msg_t chBSemWaitTimeoutS(binary_semaphore_t *bsp,
- sysinterval_t timeout) {
- chDbgCheckClassS();
- return chSemWaitTimeoutS(&bsp->sem, timeout);
-}
-static inline msg_t chBSemWaitTimeout(binary_semaphore_t *bsp,
- sysinterval_t timeout) {
- return chSemWaitTimeout(&bsp->sem, timeout);
-}
-static inline void chBSemResetI(binary_semaphore_t *bsp, bool taken) {
- chDbgCheckClassI();
- chSemResetI(&bsp->sem, taken ? (cnt_t)0 : (cnt_t)1);
-}
-static inline void chBSemReset(binary_semaphore_t *bsp, bool taken) {
- chSemReset(&bsp->sem, taken ? (cnt_t)0 : (cnt_t)1);
-}
-static inline void chBSemSignalI(binary_semaphore_t *bsp) {
- chDbgCheckClassI();
- if (bsp->sem.cnt < (cnt_t)1) {
- chSemSignalI(&bsp->sem);
- }
-}
-static inline void chBSemSignal(binary_semaphore_t *bsp) {
- chSysLock();
- chBSemSignalI(bsp);
- chSchRescheduleS();
- chSysUnlock();
-}
-static inline bool chBSemGetStateI(const binary_semaphore_t *bsp) {
- chDbgCheckClassI();
- return (bsp->sem.cnt > (cnt_t)0) ? false : true;
-}
-#define CHMBOXES_H
-typedef struct {
- msg_t *buffer;
- msg_t *top;
- msg_t *wrptr;
- msg_t *rdptr;
- size_t cnt;
- bool reset;
- threads_queue_t qw;
- threads_queue_t qr;
-} mailbox_t;
-#define _MAILBOX_DATA(name,buffer,size) { (msg_t *)(buffer), (msg_t *)(buffer) + size, (msg_t *)(buffer), (msg_t *)(buffer), (size_t)0, false, _THREADS_QUEUE_DATA(name.qw), _THREADS_QUEUE_DATA(name.qr), }
-#define MAILBOX_DECL(name,buffer,size) mailbox_t name = _MAILBOX_DATA(name, buffer, size)
- void chMBObjectInit(mailbox_t *mbp, msg_t *buf, size_t n);
- void chMBReset(mailbox_t *mbp);
- void chMBResetI(mailbox_t *mbp);
- msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
- msg_t chMBPostTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
- msg_t chMBPostI(mailbox_t *mbp, msg_t msg);
- msg_t chMBPostAheadTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
- msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
- msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg);
- msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout);
- msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout);
- msg_t chMBFetchI(mailbox_t *mbp, msg_t *msgp);
-static inline size_t chMBGetSizeI(const mailbox_t *mbp) {
- return (size_t)(mbp->top - mbp->buffer);
-}
-static inline size_t chMBGetUsedCountI(const mailbox_t *mbp) {
- chDbgCheckClassI();
- return mbp->cnt;
-}
-static inline size_t chMBGetFreeCountI(const mailbox_t *mbp) {
- chDbgCheckClassI();
- return chMBGetSizeI(mbp) - chMBGetUsedCountI(mbp);
-}
-static inline msg_t chMBPeekI(const mailbox_t *mbp) {
- chDbgCheckClassI();
- return *mbp->rdptr;
-}
-static inline void chMBResumeX(mailbox_t *mbp) {
- mbp->reset = false;
-}
-#define CHMEMCORE_H
-typedef void *(*memgetfunc_t)(size_t size, unsigned align);
-typedef void *(*memgetfunc2_t)(size_t size, unsigned align, size_t offset);
-typedef struct {
- uint8_t *basemem;
- uint8_t *topmem;
-} memcore_t;
-#define chCoreAllocAlignedWithOffsetI chCoreAllocFromTopI
-#define chCoreAllocAlignedWithOffset chCoreAllocFromTop
-extern memcore_t ch_memcore;
- void _core_init(void);
- void *chCoreAllocFromBaseI(size_t size, unsigned align, size_t offset);
- void *chCoreAllocFromTopI(size_t size, unsigned align, size_t offset);
- void *chCoreAllocFromBase(size_t size, unsigned align, size_t offset);
- void *chCoreAllocFromTop(size_t size, unsigned align, size_t offset);
- size_t chCoreGetStatusX(void);
-static inline void *chCoreAllocAlignedI(size_t size, unsigned align) {
- return chCoreAllocAlignedWithOffsetI(size, align, 0U);
-}
-static inline void *chCoreAllocAligned(size_t size, unsigned align) {
- return chCoreAllocAlignedWithOffset(size, align, 0U);
-}
-static inline void *chCoreAllocI(size_t size) {
- return chCoreAllocAlignedWithOffsetI(size, PORT_NATURAL_ALIGN, 0U);
-}
-static inline void *chCoreAlloc(size_t size) {
- return chCoreAllocAlignedWithOffset(size, PORT_NATURAL_ALIGN, 0U);
-}
-#define CHMEMHEAPS_H
-#define CH_HEAP_ALIGNMENT 8U
-typedef struct memory_heap memory_heap_t;
-typedef union heap_header heap_header_t;
-union heap_header {
- struct {
- heap_header_t *next;
- size_t pages;
- } free;
- struct {
- memory_heap_t *heap;
- size_t size;
- } used;
-};
-struct memory_heap {
- memgetfunc2_t provider;
- heap_header_t header;
- mutex_t mtx;
-};
-#define CH_HEAP_AREA(name,size) ALIGNED_VAR(CH_HEAP_ALIGNMENT) uint8_t name[MEM_ALIGN_NEXT((size), CH_HEAP_ALIGNMENT)]
- void _heap_init(void);
- void chHeapObjectInit(memory_heap_t *heapp, void *buf, size_t size);
- void *chHeapAllocAligned(memory_heap_t *heapp, size_t size, unsigned align);
- void chHeapFree(void *p);
- size_t chHeapStatus(memory_heap_t *heapp, size_t *totalp, size_t *largestp);
-static inline void *chHeapAlloc(memory_heap_t *heapp, size_t size) {
- return chHeapAllocAligned(heapp, size, CH_HEAP_ALIGNMENT);
-}
-static inline size_t chHeapGetSize(const void *p) {
- return ((heap_header_t *)p - 1U)->used.size;
-}
-#define CHMEMPOOLS_H
-struct pool_header {
- struct pool_header *next;
-};
-typedef struct {
- struct pool_header *next;
- size_t object_size;
- unsigned align;
- memgetfunc_t provider;
-} memory_pool_t;
-typedef struct {
- semaphore_t sem;
- memory_pool_t pool;
-} guarded_memory_pool_t;
-#define _MEMORYPOOL_DATA(name,size,align,provider) {NULL, size, align, provider}
-#define MEMORYPOOL_DECL(name,size,align,provider) memory_pool_t name = _MEMORYPOOL_DATA(name, size, align, provider)
-#define _GUARDEDMEMORYPOOL_DATA(name,size,align) { _SEMAPHORE_DATA(name.sem, (cnt_t)0), _MEMORYPOOL_DATA(NULL, size, align, NULL) }
-#define GUARDEDMEMORYPOOL_DECL(name,size,align) guarded_memory_pool_t name = _GUARDEDMEMORYPOOL_DATA(name, size, align)
- void chPoolObjectInitAligned(memory_pool_t *mp, size_t size,
- unsigned align, memgetfunc_t provider);
- void chPoolLoadArray(memory_pool_t *mp, void *p, size_t n);
- void *chPoolAllocI(memory_pool_t *mp);
- void *chPoolAlloc(memory_pool_t *mp);
- void chPoolFreeI(memory_pool_t *mp, void *objp);
- void chPoolFree(memory_pool_t *mp, void *objp);
- void chGuardedPoolObjectInitAligned(guarded_memory_pool_t *gmp,
- size_t size,
- unsigned align);
- void chGuardedPoolLoadArray(guarded_memory_pool_t *gmp, void *p, size_t n);
- void *chGuardedPoolAllocTimeoutS(guarded_memory_pool_t *gmp,
- sysinterval_t timeout);
- void *chGuardedPoolAllocTimeout(guarded_memory_pool_t *gmp,
- sysinterval_t timeout);
- void chGuardedPoolFree(guarded_memory_pool_t *gmp, void *objp);
-static inline void chPoolObjectInit(memory_pool_t *mp,
- size_t size,
- memgetfunc_t provider) {
- chPoolObjectInitAligned(mp, size, PORT_NATURAL_ALIGN, provider);
-}
-static inline void chPoolAdd(memory_pool_t *mp, void *objp) {
- chPoolFree(mp, objp);
-}
-static inline void chPoolAddI(memory_pool_t *mp, void *objp) {
- chPoolFreeI(mp, objp);
-}
-static inline void chGuardedPoolObjectInit(guarded_memory_pool_t *gmp,
- size_t size) {
- chGuardedPoolObjectInitAligned(gmp, size, PORT_NATURAL_ALIGN);
-}
-static inline cnt_t chGuardedPoolGetCounterI(guarded_memory_pool_t *gmp) {
- return chSemGetCounterI(&gmp->sem);
-}
-static inline void *chGuardedPoolAllocI(guarded_memory_pool_t *gmp) {
- void *p;
- p = chPoolAllocI(&gmp->pool);
- if (p != NULL) {
- chSemFastWaitI(&gmp->sem);
- chDbgAssert(chSemGetCounterI(&gmp->sem) >= (cnt_t)0,
- "semaphore out of sync");
- }
- return p;
-}
-static inline void chGuardedPoolFreeI(guarded_memory_pool_t *gmp, void *objp) {
- chPoolFreeI(&gmp->pool, objp);
- chSemSignalI(&gmp->sem);
-}
-static inline void chGuardedPoolFreeS(guarded_memory_pool_t *gmp, void *objp) {
- chGuardedPoolFreeI(gmp, objp);
- chSchRescheduleS();
-}
-static inline void chGuardedPoolAdd(guarded_memory_pool_t *gmp, void *objp) {
- chGuardedPoolFree(gmp, objp);
-}
-static inline void chGuardedPoolAddI(guarded_memory_pool_t *gmp, void *objp) {
- chGuardedPoolFreeI(gmp, objp);
-}
-static inline void chGuardedPoolAddS(guarded_memory_pool_t *gmp, void *objp) {
- chGuardedPoolFreeS(gmp, objp);
-}
-#define CHOBJFIFOS_H
-typedef struct ch_objects_fifo {
- guarded_memory_pool_t free;
- mailbox_t mbx;
-} objects_fifo_t;
-static inline void chFifoObjectInitAligned(objects_fifo_t *ofp, size_t objsize,
- size_t objn, unsigned objalign,
- void *objbuf, msg_t *msgbuf) {
- chDbgCheck((objsize >= objalign) && ((objsize % objalign) == 0U));
- chGuardedPoolObjectInitAligned(&ofp->free, objsize, objalign);
- chGuardedPoolLoadArray(&ofp->free, objbuf, objn);
- chMBObjectInit(&ofp->mbx, msgbuf, objn);
-}
-static inline void chFifoObjectInit(objects_fifo_t *ofp, size_t objsize,
- size_t objn, void *objbuf,
- msg_t *msgbuf) {
- chFifoObjectInitAligned(ofp, objsize, objn,
- PORT_NATURAL_ALIGN,
- objbuf, msgbuf);
-}
-static inline void *chFifoTakeObjectI(objects_fifo_t *ofp) {
- return chGuardedPoolAllocI(&ofp->free);
-}
-static inline void *chFifoTakeObjectTimeoutS(objects_fifo_t *ofp,
- sysinterval_t timeout) {
- return chGuardedPoolAllocTimeoutS(&ofp->free, timeout);
-}
-static inline void *chFifoTakeObjectTimeout(objects_fifo_t *ofp,
- sysinterval_t timeout) {
- return chGuardedPoolAllocTimeout(&ofp->free, timeout);
-}
-static inline void chFifoReturnObjectI(objects_fifo_t *ofp,
- void *objp) {
- chGuardedPoolFreeI(&ofp->free, objp);
-}
-static inline void chFifoReturnObjectS(objects_fifo_t *ofp,
- void *objp) {
- chGuardedPoolFreeS(&ofp->free, objp);
-}
-static inline void chFifoReturnObject(objects_fifo_t *ofp,
- void *objp) {
- chGuardedPoolFree(&ofp->free, objp);
-}
-static inline void chFifoSendObjectI(objects_fifo_t *ofp,
- void *objp) {
- msg_t msg;
- msg = chMBPostI(&ofp->mbx, (msg_t)objp);
- chDbgAssert(msg == MSG_OK, "post failed");
-}
-static inline void chFifoSendObjectS(objects_fifo_t *ofp,
- void *objp) {
- msg_t msg;
- msg = chMBPostTimeoutS(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
- chDbgAssert(msg == MSG_OK, "post failed");
-}
-static inline void chFifoSendObject(objects_fifo_t *ofp, void *objp) {
- msg_t msg;
- msg = chMBPostTimeout(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
- chDbgAssert(msg == MSG_OK, "post failed");
-}
-static inline void chFifoSendObjectAheadI(objects_fifo_t *ofp,
- void *objp) {
- msg_t msg;
- msg = chMBPostAheadI(&ofp->mbx, (msg_t)objp);
- chDbgAssert(msg == MSG_OK, "post failed");
-}
-static inline void chFifoSendObjectAheadS(objects_fifo_t *ofp,
- void *objp) {
- msg_t msg;
- msg = chMBPostAheadTimeoutS(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
- chDbgAssert(msg == MSG_OK, "post failed");
-}
-static inline void chFifoSendObjectAhead(objects_fifo_t *ofp, void *objp) {
- msg_t msg;
- msg = chMBPostAheadTimeout(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
- chDbgAssert(msg == MSG_OK, "post failed");
-}
-static inline msg_t chFifoReceiveObjectI(objects_fifo_t *ofp,
- void **objpp) {
- return chMBFetchI(&ofp->mbx, (msg_t *)objpp);
-}
-static inline msg_t chFifoReceiveObjectTimeoutS(objects_fifo_t *ofp,
- void **objpp,
- sysinterval_t timeout) {
- return chMBFetchTimeoutS(&ofp->mbx, (msg_t *)objpp, timeout);
-}
-static inline msg_t chFifoReceiveObjectTimeout(objects_fifo_t *ofp,
- void **objpp,
- sysinterval_t timeout) {
- return chMBFetchTimeout(&ofp->mbx, (msg_t *)objpp, timeout);
-}
-#define CHPIPES_H
-typedef struct {
- uint8_t *buffer;
- uint8_t *top;
- uint8_t *wrptr;
- uint8_t *rdptr;
- size_t cnt;
- bool reset;
- thread_reference_t wtr;
- thread_reference_t rtr;
- mutex_t cmtx;
- mutex_t wmtx;
- mutex_t rmtx;
-} pipe_t;
-#define _PIPE_DATA(name,buffer,size) { (uint8_t *)(buffer), (uint8_t *)(buffer) + size, (uint8_t *)(buffer), (uint8_t *)(buffer), (size_t)0, false, NULL, NULL, _MUTEX_DATA(name.cmtx), _MUTEX_DATA(name.wmtx), _MUTEX_DATA(name.rmtx), }
-#define PIPE_DECL(name,buffer,size) pipe_t name = _PIPE_DATA(name, buffer, size)
- void chPipeObjectInit(pipe_t *pp, uint8_t *buf, size_t n);
- void chPipeReset(pipe_t *pp);
- size_t chPipeWriteTimeout(pipe_t *pp, const uint8_t *bp,
- size_t n, sysinterval_t timeout);
- size_t chPipeReadTimeout(pipe_t *pp, uint8_t *bp,
- size_t n, sysinterval_t timeout);
-static inline size_t chPipeGetSize(const pipe_t *pp) {
- return (size_t)(pp->top - pp->buffer);
-}
-static inline size_t chPipeGetUsedCount(const pipe_t *pp) {
- return pp->cnt;
-}
-static inline size_t chPipeGetFreeCount(const pipe_t *pp) {
- return chPipeGetSize(pp) - chPipeGetUsedCount(pp);
-}
-static inline void chPipeResume(pipe_t *pp) {
- pp->reset = false;
-}
-#define CHFACTORY_H
-#define CH_FACTORY_REQUIRES_POOLS ((CH_CFG_FACTORY_OBJECTS_REGISTRY == TRUE) || (CH_CFG_FACTORY_SEMAPHORES == TRUE))
-#define CH_FACTORY_REQUIRES_HEAP ((CH_CFG_FACTORY_GENERIC_BUFFERS == TRUE) || (CH_CFG_FACTORY_MAILBOXES == TRUE) || (CH_CFG_FACTORY_OBJ_FIFOS == TRUE) || (CH_CFG_FACTORY_PIPES == TRUE))
-typedef struct ch_dyn_element {
- struct ch_dyn_element *next;
- ucnt_t refs;
- char name[CH_CFG_FACTORY_MAX_NAMES_LENGTH];
-} dyn_element_t;
-typedef struct ch_dyn_list {
- dyn_element_t *next;
-} dyn_list_t;
-typedef struct ch_registered_static_object {
- dyn_element_t element;
- void *objp;
-} registered_object_t;
-typedef struct ch_dyn_object {
- dyn_element_t element;
- uint8_t buffer[];
-} dyn_buffer_t;
-typedef struct ch_dyn_semaphore {
- dyn_element_t element;
- semaphore_t sem;
-} dyn_semaphore_t;
-typedef struct ch_dyn_mailbox {
- dyn_element_t element;
- mailbox_t mbx;
- msg_t msgbuf[];
-} dyn_mailbox_t;
-typedef struct ch_dyn_objects_fifo {
- dyn_element_t element;
- objects_fifo_t fifo;
- msg_t msgbuf[];
-} dyn_objects_fifo_t;
-typedef struct ch_dyn_pipe {
- dyn_element_t element;
- pipe_t pipe;
- uint8_t buffer[];
-} dyn_pipe_t;
-typedef struct ch_objects_factory {
- mutex_t mtx;
- dyn_list_t obj_list;
- memory_pool_t obj_pool;
- dyn_list_t buf_list;
- dyn_list_t sem_list;
- memory_pool_t sem_pool;
- dyn_list_t mbx_list;
- dyn_list_t fifo_list;
- dyn_list_t pipe_list;
-} objects_factory_t;
-extern objects_factory_t ch_factory;
- void _factory_init(void);
- registered_object_t *chFactoryRegisterObject(const char *name,
- void *objp);
- registered_object_t *chFactoryFindObject(const char *name);
- registered_object_t *chFactoryFindObjectByPointer(void *objp);
- void chFactoryReleaseObject(registered_object_t *rop);
- dyn_buffer_t *chFactoryCreateBuffer(const char *name, size_t size);
- dyn_buffer_t *chFactoryFindBuffer(const char *name);
- void chFactoryReleaseBuffer(dyn_buffer_t *dbp);
- dyn_semaphore_t *chFactoryCreateSemaphore(const char *name, cnt_t n);
- dyn_semaphore_t *chFactoryFindSemaphore(const char *name);
- void chFactoryReleaseSemaphore(dyn_semaphore_t *dsp);
- dyn_mailbox_t *chFactoryCreateMailbox(const char *name, size_t n);
- dyn_mailbox_t *chFactoryFindMailbox(const char *name);
- void chFactoryReleaseMailbox(dyn_mailbox_t *dmp);
- dyn_objects_fifo_t *chFactoryCreateObjectsFIFO(const char *name,
- size_t objsize,
- size_t objn,
- unsigned objalign);
- dyn_objects_fifo_t *chFactoryFindObjectsFIFO(const char *name);
- void chFactoryReleaseObjectsFIFO(dyn_objects_fifo_t *dofp);
- dyn_pipe_t *chFactoryCreatePipe(const char *name, size_t size);
- dyn_pipe_t *chFactoryFindPipe(const char *name);
- void chFactoryReleasePipe(dyn_pipe_t *dpp);
-static inline dyn_element_t *chFactoryDuplicateReference(dyn_element_t *dep) {
- dep->refs++;
- return dep;
-}
-static inline void *chFactoryGetObject(registered_object_t *rop) {
- return rop->objp;
-}
-static inline size_t chFactoryGetBufferSize(dyn_buffer_t *dbp) {
- return chHeapGetSize(dbp) - sizeof (dyn_element_t);
-}
-static inline uint8_t *chFactoryGetBuffer(dyn_buffer_t *dbp) {
- return dbp->buffer;
-}
-static inline semaphore_t *chFactoryGetSemaphore(dyn_semaphore_t *dsp) {
- return &dsp->sem;
-}
-static inline mailbox_t *chFactoryGetMailbox(dyn_mailbox_t *dmp) {
- return &dmp->mbx;
-}
-static inline objects_fifo_t *chFactoryGetObjectsFIFO(dyn_objects_fifo_t *dofp) {
- return &dofp->fifo;
-}
-static inline pipe_t *chFactoryGetPipe(dyn_pipe_t *dpp) {
- return &dpp->pipe;
-}
-#define CHDYNAMIC_H
- thread_t *chThdCreateFromHeap(memory_heap_t *heapp, size_t size,
- const char *name, tprio_t prio,
- tfunc_t pf, void *arg);
- thread_t *chThdCreateFromMemoryPool(memory_pool_t *mp, const char *name,
- tprio_t prio, tfunc_t pf, void *arg);
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include
+#include
+#include
+
+#include "cmparams.h"
+
+#define CH_H
+#define _CHIBIOS_RT_
+#define CH_KERNEL_STABLE 0
+#define CH_KERNEL_VERSION "6.0.0"
+#define CH_KERNEL_MAJOR 6
+#define CH_KERNEL_MINOR 0
+#define CH_KERNEL_PATCH 0
+#define FALSE 0
+#define TRUE 1
+#define CHCONF_H
+#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
+#define CH_CFG_ST_RESOLUTION 32
+#define CH_CFG_ST_FREQUENCY 1000
+#define CH_CFG_INTERVALS_SIZE 32
+#define CH_CFG_TIME_TYPES_SIZE 32
+#define CH_CFG_ST_TIMEDELTA 0
+#define CH_CFG_TIME_QUANTUM 0
+#define CH_CFG_MEMCORE_SIZE 0
+#define CH_CFG_NO_IDLE_THREAD FALSE
+#define CH_CFG_OPTIMIZE_SPEED TRUE
+#define CH_CFG_USE_TM TRUE
+#define CH_CFG_USE_REGISTRY TRUE
+#define CH_CFG_USE_WAITEXIT TRUE
+#define CH_CFG_USE_SEMAPHORES TRUE
+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#define CH_CFG_USE_MUTEXES TRUE
+#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#define CH_CFG_USE_CONDVARS TRUE
+#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#define CH_CFG_USE_EVENTS TRUE
+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#define CH_CFG_USE_MESSAGES TRUE
+#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#define CH_CFG_USE_MAILBOXES TRUE
+#define CH_CFG_USE_MEMCORE TRUE
+#define CH_CFG_USE_HEAP TRUE
+#define CH_CFG_USE_MEMPOOLS TRUE
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#define CH_CFG_USE_PIPES TRUE
+#define CH_CFG_USE_DYNAMIC TRUE
+#define CH_CFG_USE_FACTORY TRUE
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#define CH_CFG_FACTORY_PIPES TRUE
+#define CH_DBG_STATISTICS FALSE
+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#define CH_DBG_ENABLE_CHECKS FALSE
+#define CH_DBG_ENABLE_ASSERTS FALSE
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#define CH_DBG_TRACE_BUFFER_SIZE 128
+#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#define CH_DBG_FILL_THREADS FALSE
+#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_CFG_SYSTEM_EXTRA_FIELDS
+#define CH_CFG_SYSTEM_INIT_HOOK() { }
+#define CH_CFG_THREAD_EXTRA_FIELDS
+#define CH_CFG_THREAD_INIT_HOOK(tp) { }
+#define CH_CFG_THREAD_EXIT_HOOK(tp) { }
+#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp,otp) { }
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { }
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { }
+#define CH_CFG_IDLE_ENTER_HOOK() { }
+#define CH_CFG_IDLE_LEAVE_HOOK() { }
+#define CH_CFG_IDLE_LOOP_HOOK() { }
+#define CH_CFG_SYSTEM_TICK_HOOK() { }
+#define CH_CFG_SYSTEM_HALT_HOOK(reason) { }
+#define CH_CFG_TRACE_HOOK(tep) { }
+#define CHCHECKS_H
+#define CHLICENSE_H
+#define CH_FEATURES_BASIC 0
+#define CH_FEATURES_INTERMEDIATE 1
+#define CH_FEATURES_FULL 2
+#define CH_DEPLOY_UNLIMITED -1
+#define CH_DEPLOY_NONE 0
+#define CH_LICENSE_GPL 0
+#define CH_LICENSE_GPL_EXCEPTION 1
+#define CH_LICENSE_COMMERCIAL_FREE 2
+#define CH_LICENSE_COMMERCIAL_DEV_1000 3
+#define CH_LICENSE_COMMERCIAL_DEV_5000 4
+#define CH_LICENSE_COMMERCIAL_FULL 5
+#define CH_LICENSE_COMMERCIAL_RUNTIME 6
+#define CH_LICENSE_PARTNER 7
+#define CHCUSTOMER_H
+#define CH_CUSTOMER_ID_STRING "Santa, North Pole"
+#define CH_CUSTOMER_ID_CODE "xxxx-yyyy"
+#define CH_LICENSE CH_LICENSE_GPL
+#define CH_CUSTOMER_LIC_RT TRUE
+#define CH_CUSTOMER_LIC_NIL TRUE
+#define CH_CUSTOMER_LIC_OSLIB TRUE
+#define CH_CUSTOMER_LIC_EX TRUE
+#define CH_CUSTOMER_LIC_PORT_CM0 TRUE
+#define CH_CUSTOMER_LIC_PORT_CM3 TRUE
+#define CH_CUSTOMER_LIC_PORT_CM4 TRUE
+#define CH_CUSTOMER_LIC_PORT_CM7 TRUE
+#define CH_CUSTOMER_LIC_PORT_ARM79 TRUE
+#define CH_CUSTOMER_LIC_PORT_E200Z0 TRUE
+#define CH_CUSTOMER_LIC_PORT_E200Z2 TRUE
+#define CH_CUSTOMER_LIC_PORT_E200Z3 TRUE
+#define CH_CUSTOMER_LIC_PORT_E200Z4 TRUE
+#define CH_LICENSE_TYPE_STRING "GNU General Public License 3 (GPL3)"
+#define CH_LICENSE_ID_STRING "N/A"
+#define CH_LICENSE_ID_CODE "N/A"
+#define CH_LICENSE_MODIFIABLE_CODE TRUE
+#define CH_LICENSE_FEATURES CH_FEATURES_FULL
+#define CH_LICENSE_MAX_DEPLOY CH_DEPLOY_UNLIMITED
+#define CHRESTRICTIONS_H
+ void chSysHalt(const char *reason);
+#define CHTYPES_H
+typedef uint32_t rtcnt_t;
+typedef uint64_t rttime_t;
+typedef uint32_t syssts_t;
+typedef uint8_t tmode_t;
+typedef uint8_t tstate_t;
+typedef uint8_t trefs_t;
+typedef uint8_t tslices_t;
+typedef uint32_t tprio_t;
+typedef int32_t msg_t;
+typedef int32_t eventid_t;
+typedef uint32_t eventmask_t;
+typedef uint32_t eventflags_t;
+typedef int32_t cnt_t;
+typedef uint32_t ucnt_t;
+#define ROMCONST const
+#define NOINLINE __attribute__((noinline))
+#define PORT_THD_FUNCTION(tname,arg) void tname(void *arg)
+#define PACKED_VAR __attribute__((packed))
+#define ALIGNED_VAR(n) __attribute__((aligned(n)))
+#define SIZEOF_PTR 4
+#define REVERSE_ORDER 1
+#define CHSYSTYPES_H
+typedef struct ch_thread thread_t;
+typedef thread_t * thread_reference_t;
+typedef struct ch_threads_list threads_list_t;
+typedef struct ch_threads_queue threads_queue_t;
+typedef struct ch_ready_list ready_list_t;
+typedef void (*vtfunc_t)(void *p);
+typedef struct ch_virtual_timer virtual_timer_t;
+typedef struct ch_virtual_timers_list virtual_timers_list_t;
+typedef struct ch_system_debug system_debug_t;
+typedef struct ch_system ch_system_t;
+#define __CH_STRINGIFY(a) #a
+#define CHDEBUG_H
+#define CH_DBG_STACK_FILL_VALUE 0x55
+#define _dbg_enter_lock()
+#define _dbg_leave_lock()
+#define _dbg_check_disable()
+#define _dbg_check_suspend()
+#define _dbg_check_enable()
+#define _dbg_check_lock()
+#define _dbg_check_unlock()
+#define _dbg_check_lock_from_isr()
+#define _dbg_check_unlock_from_isr()
+#define _dbg_check_enter_isr()
+#define _dbg_check_leave_isr()
+#define chDbgCheckClassI()
+#define chDbgCheckClassS()
+#define chDbgCheck(c) do { if (CH_DBG_ENABLE_CHECKS != FALSE) { if (!(c)) { chSysHalt(__func__); } } } while (false)
+#define chDbgAssert(c,r) do { if (CH_DBG_ENABLE_ASSERTS != FALSE) { if (!(c)) { chSysHalt(__func__); } } } while (false)
+#define CHTIME_H
+#define TIME_IMMEDIATE ((sysinterval_t)0)
+#define TIME_INFINITE ((sysinterval_t)-1)
+#define TIME_MAX_INTERVAL ((sysinterval_t)-2)
+#define TIME_MAX_SYSTIME ((systime_t)-1)
+typedef uint32_t systime_t;
+typedef uint32_t sysinterval_t;
+typedef uint32_t time_secs_t;
+typedef uint32_t time_msecs_t;
+typedef uint32_t time_usecs_t;
+typedef uint64_t time_conv_t;
+#define TIME_S2I(secs) ((sysinterval_t)((time_conv_t)(secs) * (time_conv_t)CH_CFG_ST_FREQUENCY))
+#define TIME_MS2I(msecs) ((sysinterval_t)((((time_conv_t)(msecs) * (time_conv_t)CH_CFG_ST_FREQUENCY) + (time_conv_t)999) / (time_conv_t)1000))
+#define TIME_US2I(usecs) ((sysinterval_t)((((time_conv_t)(usecs) * (time_conv_t)CH_CFG_ST_FREQUENCY) + (time_conv_t)999999) / (time_conv_t)1000000))
+#define TIME_I2S(interval) (time_secs_t)(((time_conv_t)(interval) + (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY)
+#define TIME_I2MS(interval) (time_msecs_t)((((time_conv_t)(interval) * (time_conv_t)1000) + (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY)
+#define TIME_I2US(interval) (time_msecs_t)((((time_conv_t)(interval) * (time_conv_t)1000000) + (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY)
+static inline sysinterval_t chTimeS2I(time_secs_t secs) {
+ time_conv_t ticks;
+ ticks = (time_conv_t)secs * (time_conv_t)CH_CFG_ST_FREQUENCY;
+ chDbgAssert(ticks <= (time_conv_t)TIME_MAX_INTERVAL,
+ "conversion overflow");
+ return (sysinterval_t)ticks;
+}
+static inline sysinterval_t chTimeMS2I(time_msecs_t msec) {
+ time_conv_t ticks;
+ ticks = (((time_conv_t)msec * (time_conv_t)CH_CFG_ST_FREQUENCY) +
+ (time_conv_t)999) / (time_conv_t)1000;
+ chDbgAssert(ticks <= (time_conv_t)TIME_MAX_INTERVAL,
+ "conversion overflow");
+ return (sysinterval_t)ticks;
+}
+static inline sysinterval_t chTimeUS2I(time_usecs_t usec) {
+ time_conv_t ticks;
+ ticks = (((time_conv_t)usec * (time_conv_t)CH_CFG_ST_FREQUENCY) +
+ (time_conv_t)999999) / (time_conv_t)1000000;
+ chDbgAssert(ticks <= (time_conv_t)TIME_MAX_INTERVAL,
+ "conversion overflow");
+ return (sysinterval_t)ticks;
+}
+static inline time_secs_t chTimeI2S(sysinterval_t interval) {
+ time_conv_t secs;
+ secs = ((time_conv_t)interval +
+ (time_conv_t)CH_CFG_ST_FREQUENCY -
+ (time_conv_t)1) / (time_conv_t)CH_CFG_ST_FREQUENCY;
+ chDbgAssert(secs < (time_conv_t)((time_secs_t)-1),
+ "conversion overflow");
+ return (time_secs_t)secs;
+}
+static inline time_msecs_t chTimeI2MS(sysinterval_t interval) {
+ time_conv_t msecs;
+ msecs = (((time_conv_t)interval * (time_conv_t)1000) +
+ (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) /
+ (time_conv_t)CH_CFG_ST_FREQUENCY;
+ chDbgAssert(msecs < (time_conv_t)((time_msecs_t)-1),
+ "conversion overflow");
+ return (time_msecs_t)msecs;
+}
+static inline time_usecs_t chTimeI2US(sysinterval_t interval) {
+ time_conv_t usecs;
+ usecs = (((time_conv_t)interval * (time_conv_t)1000000) +
+ (time_conv_t)CH_CFG_ST_FREQUENCY - (time_conv_t)1) /
+ (time_conv_t)CH_CFG_ST_FREQUENCY;
+ chDbgAssert(usecs <= (time_conv_t)((time_usecs_t)-1),
+ "conversion overflow");
+ return (time_usecs_t)usecs;
+}
+static inline systime_t chTimeAddX(systime_t systime,
+ sysinterval_t interval) {
+ return systime + (systime_t)interval;
+}
+static inline sysinterval_t chTimeDiffX(systime_t start, systime_t end) {
+ return (sysinterval_t)((systime_t)(end - start));
+}
+static inline bool chTimeIsInRangeX(systime_t time,
+ systime_t start,
+ systime_t end) {
+ return (bool)((systime_t)((systime_t)time - (systime_t)start) <
+ (systime_t)((systime_t)end - (systime_t)start));
+}
+#define CHALIGN_H
+#define MEM_ALIGN_MASK(a) ((size_t)(a) - 1U)
+#define MEM_ALIGN_PREV(p,a) ((size_t)(p) & ~MEM_ALIGN_MASK(a))
+#define MEM_ALIGN_NEXT(p,a) MEM_ALIGN_PREV((size_t)(p) + MEM_ALIGN_MASK(a), (a))
+#define MEM_IS_ALIGNED(p,a) (((size_t)(p) & MEM_ALIGN_MASK(a)) == 0U)
+#define MEM_IS_VALID_ALIGNMENT(a) (((size_t)(a) != 0U) && (((size_t)(a) & ((size_t)(a) - 1U)) == 0U))
+#define CHCORE_H
+#define PORT_ARCHITECTURE_ARM
+#define PORT_COMPILER_NAME "GCC " __VERSION__
+#define PORT_USE_ALT_TIMER FALSE
+typedef void *regarm_t;
+typedef uint64_t stkalign_t;
+struct port_context {
+ struct port_intctx *sp;
+};
+#define CORTEX_PRIORITY_LEVELS (1U << CORTEX_PRIORITY_BITS)
+#define CORTEX_MINIMUM_PRIORITY (CORTEX_PRIORITY_LEVELS - 1)
+#define CORTEX_MAXIMUM_PRIORITY 0U
+#define CORTEX_PRIO_MASK(n) ((n) << (8U - (unsigned)CORTEX_PRIORITY_BITS))
+#define PORT_IRQ_IS_VALID_PRIORITY(n) (((n) >= 0U) && ((n) < CORTEX_PRIORITY_LEVELS))
+#define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) (((n) >= CORTEX_MAX_KERNEL_PRIORITY) && ((n) < CORTEX_PRIORITY_LEVELS))
+#define MPU_H
+#define MPU_TYPE_SEPARATED (1U << 0U)
+#define MPU_TYPE_DREGION(n) (((n) >> 8U) & 255U)
+#define MPU_TYPE_IREGION(n) (((n) >> 16U) & 255U)
+#define MPU_CTRL_ENABLE (1U << 0U)
+#define MPU_CTRL_HFNMIENA (1U << 1U)
+#define MPU_CTRL_PRIVDEFENA (1U << 2U)
+#define MPU_RNR_REGION_MASK (255U << 0U)
+#define MPU_RNR_REGION(n) ((n) << 0U)
+#define MPU_RBAR_REGION_MASK (15U << 0U)
+#define MPU_RBAR_REGION(n) ((n) << 0U)
+#define MPU_RBAR_VALID (1U << 4U)
+#define MPU_RBAR_ADDR_MASK 0xFFFFFFE0U
+#define MPU_RBAR_ADDR(n) ((n) << 5U)
+#define MPU_RASR_ENABLE (1U << 0U)
+#define MPU_RASR_SIZE_MASK (31U << 1U)
+#define MPU_RASR_SIZE(n) ((n) << 1U)
+#define MPU_RASR_SIZE_32 MPU_RASR_SIZE(4U)
+#define MPU_RASR_SIZE_64 MPU_RASR_SIZE(5U)
+#define MPU_RASR_SIZE_128 MPU_RASR_SIZE(6U)
+#define MPU_RASR_SIZE_256 MPU_RASR_SIZE(7U)
+#define MPU_RASR_SIZE_512 MPU_RASR_SIZE(8U)
+#define MPU_RASR_SIZE_1K MPU_RASR_SIZE(9U)
+#define MPU_RASR_SIZE_2K MPU_RASR_SIZE(10U)
+#define MPU_RASR_SIZE_4K MPU_RASR_SIZE(11U)
+#define MPU_RASR_SIZE_8K MPU_RASR_SIZE(12U)
+#define MPU_RASR_SIZE_16K MPU_RASR_SIZE(13U)
+#define MPU_RASR_SIZE_32K MPU_RASR_SIZE(14U)
+#define MPU_RASR_SIZE_64K MPU_RASR_SIZE(15U)
+#define MPU_RASR_SIZE_128K MPU_RASR_SIZE(16U)
+#define MPU_RASR_SIZE_256K MPU_RASR_SIZE(17U)
+#define MPU_RASR_SIZE_512K MPU_RASR_SIZE(18U)
+#define MPU_RASR_SIZE_1M MPU_RASR_SIZE(19U)
+#define MPU_RASR_SIZE_2M MPU_RASR_SIZE(20U)
+#define MPU_RASR_SIZE_4M MPU_RASR_SIZE(21U)
+#define MPU_RASR_SIZE_8M MPU_RASR_SIZE(22U)
+#define MPU_RASR_SIZE_16M MPU_RASR_SIZE(23U)
+#define MPU_RASR_SIZE_32M MPU_RASR_SIZE(24U)
+#define MPU_RASR_SIZE_64M MPU_RASR_SIZE(25U)
+#define MPU_RASR_SIZE_128M MPU_RASR_SIZE(26U)
+#define MPU_RASR_SIZE_256M MPU_RASR_SIZE(27U)
+#define MPU_RASR_SIZE_512M MPU_RASR_SIZE(28U)
+#define MPU_RASR_SIZE_1G MPU_RASR_SIZE(29U)
+#define MPU_RASR_SIZE_2G MPU_RASR_SIZE(30U)
+#define MPU_RASR_SIZE_4G MPU_RASR_SIZE(31U)
+#define MPU_RASR_SRD_MASK (255U << 8U)
+#define MPU_RASR_SRD(n) ((n) << 8U)
+#define MPU_RASR_SRD_ALL (0U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB0 (1U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB1 (2U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB2 (4U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB3 (8U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB4 (16U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB5 (32U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB6 (64U << 8U)
+#define MPU_RASR_SRD_DISABLE_SUB7 (128U << 8U)
+#define MPU_RASR_ATTR_B (1U << 16U)
+#define MPU_RASR_ATTR_C (1U << 17U)
+#define MPU_RASR_ATTR_S (1U << 18U)
+#define MPU_RASR_ATTR_TEX_MASK (7U << 19U)
+#define MPU_RASR_ATTR_TEX(n) ((n) << 19U)
+#define MPU_RASR_ATTR_AP_MASK (7U << 24U)
+#define MPU_RASR_ATTR_AP(n) ((n) << 24U)
+#define MPU_RASR_ATTR_AP_NA_NA (0U << 24U)
+#define MPU_RASR_ATTR_AP_RW_NA (1U << 24U)
+#define MPU_RASR_ATTR_AP_RW_RO (2U << 24U)
+#define MPU_RASR_ATTR_AP_RW_RW (3U << 24U)
+#define MPU_RASR_ATTR_AP_RO_NA (5U << 24U)
+#define MPU_RASR_ATTR_AP_RO_RO (6U << 24U)
+#define MPU_RASR_ATTR_XN (1U << 28U)
+#define MPU_RASR_ATTR_STRONGLY_ORDERED (MPU_RASR_ATTR_TEX(0))
+#define MPU_RASR_ATTR_SHARED_DEVICE (MPU_RASR_ATTR_TEX(0) | MPU_RASR_ATTR_B)
+#define MPU_RASR_ATTR_CACHEABLE_WT_NWA (MPU_RASR_ATTR_TEX(0) | MPU_RASR_ATTR_C)
+#define MPU_RASR_ATTR_CACHEABLE_WB_NWA (MPU_RASR_ATTR_TEX(0) | MPU_RASR_ATTR_B | MPU_RASR_ATTR_C)
+#define MPU_RASR_ATTR_NON_CACHEABLE (MPU_RASR_ATTR_TEX(1))
+#define MPU_RASR_ATTR_CACHEABLE_WB_WA (MPU_RASR_ATTR_TEX(1) | MPU_RASR_ATTR_B | MPU_RASR_ATTR_C)
+#define MPU_RASR_ATTR_NON_SHARED_DEVICE (MPU_RASR_ATTR_TEX(2))
+#define MPU_REGION_0 0U
+#define MPU_REGION_1 1U
+#define MPU_REGION_2 2U
+#define MPU_REGION_3 3U
+#define MPU_REGION_4 4U
+#define MPU_REGION_5 5U
+#define MPU_REGION_6 6U
+#define MPU_REGION_7 7U
+#define mpuEnable(ctrl) { MPU->CTRL = ((uint32_t)ctrl) | MPU_CTRL_ENABLE; SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; }
+#define mpuDisable() { SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; MPU->CTRL = 0; }
+#define mpuConfigureRegion(region,addr,attribs) { MPU->RNR = ((uint32_t)region); MPU->RBAR = ((uint32_t)addr); MPU->RASR = ((uint32_t)attribs); }
+#define mpuSetRegionAddress(region,addr) { MPU->RNR = ((uint32_t)region); MPU->RBAR = ((uint32_t)addr); }
+#define CHCORE_V7M_H
+#define PORT_SUPPORTS_RT TRUE
+#define PORT_NATURAL_ALIGN sizeof (void *)
+#define PORT_STACK_ALIGN sizeof (stkalign_t)
+#define PORT_WORKING_AREA_ALIGN (PORT_ENABLE_GUARD_PAGES == TRUE ? 32U : PORT_STACK_ALIGN)
+#define CORTEX_BASEPRI_DISABLED 0U
+#define PORT_ENABLE_GUARD_PAGES FALSE
+#define PORT_USE_MPU_REGION MPU_REGION_7
+#define PORT_IDLE_THREAD_STACK_SIZE 16
+#define PORT_INT_REQUIRED_STACK 64
+#define CORTEX_ENABLE_WFI_IDLE FALSE
+#define CORTEX_SIMPLIFIED_PRIORITY FALSE
+#define CORTEX_PRIORITY_SVCALL (CORTEX_MAXIMUM_PRIORITY + 1U)
+#define CORTEX_PRIGROUP_INIT (7 - CORTEX_PRIORITY_BITS)
+ #define PORT_GUARD_PAGE_SIZE 0U
+ #define PORT_ARCHITECTURE_ARM_v7ME
+ #define PORT_ARCHITECTURE_NAME "ARMv7E-M"
+ #define PORT_CORE_VARIANT_NAME "Cortex-M4"
+#define PORT_INFO "Advanced kernel mode"
+#define CORTEX_MAX_KERNEL_PRIORITY (CORTEX_PRIORITY_SVCALL + 1U)
+#define CORTEX_BASEPRI_KERNEL CORTEX_PRIO_MASK(CORTEX_MAX_KERNEL_PRIORITY)
+#define CORTEX_PRIORITY_PENDSV CORTEX_MAX_KERNEL_PRIORITY
+struct port_extctx {
+ regarm_t r0;
+ regarm_t r1;
+ regarm_t r2;
+ regarm_t r3;
+ regarm_t r12;
+ regarm_t lr_thd;
+ regarm_t pc;
+ regarm_t xpsr;
+};
+struct port_intctx {
+ regarm_t r4;
+ regarm_t r5;
+ regarm_t r6;
+ regarm_t r7;
+ regarm_t r8;
+ regarm_t r9;
+ regarm_t r10;
+ regarm_t r11;
+ regarm_t lr;
+};
+#define PORT_SETUP_CONTEXT(tp,wbase,wtop,pf,arg) { (tp)->ctx.sp = (struct port_intctx *)((uint8_t *)(wtop) - sizeof (struct port_intctx)); (tp)->ctx.sp->r4 = (regarm_t)(pf); (tp)->ctx.sp->r5 = (regarm_t)(arg); (tp)->ctx.sp->lr = (regarm_t)_port_thread_start; }
+#define PORT_WA_SIZE(n) ((size_t)PORT_GUARD_PAGE_SIZE + sizeof (struct port_intctx) + sizeof (struct port_extctx) + (size_t)(n) + (size_t)PORT_INT_REQUIRED_STACK)
+#define PORT_WORKING_AREA(s,n) stkalign_t s[THD_WORKING_AREA_SIZE(n) / sizeof (stkalign_t)]
+#define PORT_IRQ_PROLOGUE()
+#define PORT_IRQ_EPILOGUE() _port_irq_epilogue()
+#define PORT_IRQ_HANDLER(id) void id(void)
+#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#define port_switch(ntp,otp) _port_switch(ntp, otp)
+ void _port_irq_epilogue(void);
+ void _port_switch(thread_t *ntp, thread_t *otp);
+ void _port_thread_start(void);
+ void _port_switch_from_isr(void);
+ void _port_exit_from_isr(void);
+static inline void port_init(void) {
+ NVIC_SetPriorityGrouping(CORTEX_PRIGROUP_INIT);
+ CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
+ DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
+ NVIC_SetPriority(SVCall_IRQn, CORTEX_PRIORITY_SVCALL);
+ NVIC_SetPriority(PendSV_IRQn, CORTEX_PRIORITY_PENDSV);
+}
+static inline syssts_t port_get_irq_status(void) {
+ syssts_t sts;
+ sts = (syssts_t)__get_BASEPRI();
+ return sts;
+}
+static inline bool port_irq_enabled(syssts_t sts) {
+ return sts == (syssts_t)CORTEX_BASEPRI_DISABLED;
+}
+static inline bool port_is_isr_context(void) {
+ return (bool)((__get_IPSR() & 0x1FFU) != 0U);
+}
+static inline void port_lock(void) {
+ __set_BASEPRI(CORTEX_BASEPRI_KERNEL);
+}
+static inline void port_unlock(void) {
+ __set_BASEPRI(CORTEX_BASEPRI_DISABLED);
+}
+static inline void port_lock_from_isr(void) {
+ port_lock();
+}
+static inline void port_unlock_from_isr(void) {
+ port_unlock();
+}
+static inline void port_disable(void) {
+ __disable_irq();
+}
+static inline void port_suspend(void) {
+ __set_BASEPRI(CORTEX_BASEPRI_KERNEL);
+ __enable_irq();
+}
+static inline void port_enable(void) {
+ __set_BASEPRI(CORTEX_BASEPRI_DISABLED);
+ __enable_irq();
+}
+static inline void port_wait_for_interrupt(void) {
+}
+static inline rtcnt_t port_rt_get_counter_value(void) {
+ return DWT->CYCCNT;
+}
+#define CHTRACE_H
+#define CH_TRACE_TYPE_UNUSED 0U
+#define CH_TRACE_TYPE_SWITCH 1U
+#define CH_TRACE_TYPE_ISR_ENTER 2U
+#define CH_TRACE_TYPE_ISR_LEAVE 3U
+#define CH_TRACE_TYPE_HALT 4U
+#define CH_TRACE_TYPE_USER 5U
+#define CH_DBG_TRACE_MASK_DISABLED 255U
+#define CH_DBG_TRACE_MASK_NONE 0U
+#define CH_DBG_TRACE_MASK_SWITCH 1U
+#define CH_DBG_TRACE_MASK_ISR 2U
+#define CH_DBG_TRACE_MASK_HALT 4U
+#define CH_DBG_TRACE_MASK_USER 8U
+#define CH_DBG_TRACE_MASK_SLOW (CH_DBG_TRACE_MASK_SWITCH | CH_DBG_TRACE_MASK_HALT | CH_DBG_TRACE_MASK_USER)
+#define CH_DBG_TRACE_MASK_ALL (CH_DBG_TRACE_MASK_SWITCH | CH_DBG_TRACE_MASK_ISR | CH_DBG_TRACE_MASK_HALT | CH_DBG_TRACE_MASK_USER)
+#define _trace_init()
+#define _trace_switch(ntp,otp)
+#define _trace_isr_enter(isr)
+#define _trace_isr_leave(isr)
+#define _trace_halt(reason)
+#define chDbgWriteTraceI(up1,up2)
+#define chDbgWriteTrace(up1,up2)
+#define CHTM_H
+typedef struct {
+ rtcnt_t offset;
+} tm_calibration_t;
+typedef struct {
+ rtcnt_t best;
+ rtcnt_t worst;
+ rtcnt_t last;
+ ucnt_t n;
+ rttime_t cumulative;
+} time_measurement_t;
+ void _tm_init(void);
+ void chTMObjectInit(time_measurement_t *tmp);
+ NOINLINE void chTMStartMeasurementX(time_measurement_t *tmp);
+ NOINLINE void chTMStopMeasurementX(time_measurement_t *tmp);
+ NOINLINE void chTMChainMeasurementToX(time_measurement_t *tmp1,
+ time_measurement_t *tmp2);
+#define CHSTATS_H
+#define _stats_increase_irq()
+#define _stats_ctxswc(old,new)
+#define _stats_start_measure_crit_thd()
+#define _stats_stop_measure_crit_thd()
+#define _stats_start_measure_crit_isr()
+#define _stats_stop_measure_crit_isr()
+#define CHSCHD_H
+#define MSG_OK (msg_t)0
+#define MSG_TIMEOUT (msg_t)-1
+#define MSG_RESET (msg_t)-2
+#define NOPRIO (tprio_t)0
+#define IDLEPRIO (tprio_t)1
+#define LOWPRIO (tprio_t)2
+#define NORMALPRIO (tprio_t)128
+#define HIGHPRIO (tprio_t)255
+#define CH_STATE_READY (tstate_t)0
+#define CH_STATE_CURRENT (tstate_t)1
+#define CH_STATE_WTSTART (tstate_t)2
+#define CH_STATE_SUSPENDED (tstate_t)3
+#define CH_STATE_QUEUED (tstate_t)4
+#define CH_STATE_WTSEM (tstate_t)5
+#define CH_STATE_WTMTX (tstate_t)6
+#define CH_STATE_WTCOND (tstate_t)7
+#define CH_STATE_SLEEPING (tstate_t)8
+#define CH_STATE_WTEXIT (tstate_t)9
+#define CH_STATE_WTOREVT (tstate_t)10
+#define CH_STATE_WTANDEVT (tstate_t)11
+#define CH_STATE_SNDMSGQ (tstate_t)12
+#define CH_STATE_SNDMSG (tstate_t)13
+#define CH_STATE_WTMSG (tstate_t)14
+#define CH_STATE_FINAL (tstate_t)15
+#define CH_STATE_NAMES "READY", "CURRENT", "WTSTART", "SUSPENDED", "QUEUED", "WTSEM", "WTMTX", "WTCOND", "SLEEPING", "WTEXIT", "WTOREVT", "WTANDEVT", "SNDMSGQ", "SNDMSG", "WTMSG", "FINAL"
+#define CH_FLAG_MODE_MASK (tmode_t)3U
+#define CH_FLAG_MODE_STATIC (tmode_t)0U
+#define CH_FLAG_MODE_HEAP (tmode_t)1U
+#define CH_FLAG_MODE_MPOOL (tmode_t)2U
+#define CH_FLAG_TERMINATE (tmode_t)4U
+struct ch_threads_list {
+ thread_t *next;
+};
+struct ch_threads_queue {
+ thread_t *next;
+ thread_t *prev;
+};
+struct ch_thread {
+ threads_queue_t queue;
+ tprio_t prio;
+ struct port_context ctx;
+ thread_t *newer;
+ thread_t *older;
+ const char *name;
+ stkalign_t *wabase;
+ tstate_t state;
+ tmode_t flags;
+ trefs_t refs;
+ union {
+ msg_t rdymsg;
+ msg_t exitcode;
+ void *wtobjp;
+ thread_reference_t *wttrp;
+ msg_t sentmsg;
+ struct ch_semaphore *wtsemp;
+ struct ch_mutex *wtmtxp;
+ eventmask_t ewmask;
+ } u;
+ threads_list_t waiting;
+ threads_queue_t msgqueue;
+ eventmask_t epending;
+ struct ch_mutex *mtxlist;
+ tprio_t realprio;
+ void *mpool;
+ CH_CFG_THREAD_EXTRA_FIELDS
+};
+struct ch_virtual_timer {
+ virtual_timer_t *next;
+ virtual_timer_t *prev;
+ sysinterval_t delta;
+ vtfunc_t func;
+ void *par;
+};
+struct ch_virtual_timers_list {
+ virtual_timer_t *next;
+ virtual_timer_t *prev;
+ sysinterval_t delta;
+ volatile systime_t systime;
+};
+struct ch_ready_list {
+ threads_queue_t queue;
+ tprio_t prio;
+ struct port_context ctx;
+ thread_t *newer;
+ thread_t *older;
+ thread_t *current;
+};
+struct ch_system_debug {
+ const char * volatile panic_msg;
+};
+struct ch_system {
+ ready_list_t rlist;
+ virtual_timers_list_t vtlist;
+ system_debug_t dbg;
+ thread_t mainthread;
+ tm_calibration_t tm;
+ CH_CFG_SYSTEM_EXTRA_FIELDS
+};
+#define firstprio(rlp) ((rlp)->next->prio)
+#define currp ch.rlist.current
+extern ch_system_t ch;
+ void _scheduler_init(void);
+ thread_t *chSchReadyI(thread_t *tp);
+ thread_t *chSchReadyAheadI(thread_t *tp);
+ void chSchGoSleepS(tstate_t newstate);
+ msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout);
+ void chSchWakeupS(thread_t *ntp, msg_t msg);
+ void chSchRescheduleS(void);
+ bool chSchIsPreemptionRequired(void);
+ void chSchDoRescheduleBehind(void);
+ void chSchDoRescheduleAhead(void);
+ void chSchDoReschedule(void);
+static inline void list_init(threads_list_t *tlp) {
+ tlp->next = (thread_t *)tlp;
+}
+static inline bool list_isempty(threads_list_t *tlp) {
+ return (bool)(tlp->next == (thread_t *)tlp);
+}
+static inline bool list_notempty(threads_list_t *tlp) {
+ return (bool)(tlp->next != (thread_t *)tlp);
+}
+static inline void queue_init(threads_queue_t *tqp) {
+ tqp->next = (thread_t *)tqp;
+ tqp->prev = (thread_t *)tqp;
+}
+static inline bool queue_isempty(const threads_queue_t *tqp) {
+ return (bool)(tqp->next == (const thread_t *)tqp);
+}
+static inline bool queue_notempty(const threads_queue_t *tqp) {
+ return (bool)(tqp->next != (const thread_t *)tqp);
+}
+static inline void list_insert(thread_t *tp, threads_list_t *tlp) {
+ tp->queue.next = tlp->next;
+ tlp->next = tp;
+}
+static inline thread_t *list_remove(threads_list_t *tlp) {
+ thread_t *tp = tlp->next;
+ tlp->next = tp->queue.next;
+ return tp;
+}
+static inline void queue_prio_insert(thread_t *tp, threads_queue_t *tqp) {
+ thread_t *cp = (thread_t *)tqp;
+ do {
+ cp = cp->queue.next;
+ } while ((cp != (thread_t *)tqp) && (cp->prio >= tp->prio));
+ tp->queue.next = cp;
+ tp->queue.prev = cp->queue.prev;
+ tp->queue.prev->queue.next = tp;
+ cp->queue.prev = tp;
+}
+static inline void queue_insert(thread_t *tp, threads_queue_t *tqp) {
+ tp->queue.next = (thread_t *)tqp;
+ tp->queue.prev = tqp->prev;
+ tp->queue.prev->queue.next = tp;
+ tqp->prev = tp;
+}
+static inline thread_t *queue_fifo_remove(threads_queue_t *tqp) {
+ thread_t *tp = tqp->next;
+ tqp->next = tp->queue.next;
+ tqp->next->queue.prev = (thread_t *)tqp;
+ return tp;
+}
+static inline thread_t *queue_lifo_remove(threads_queue_t *tqp) {
+ thread_t *tp = tqp->prev;
+ tqp->prev = tp->queue.prev;
+ tqp->prev->queue.next = (thread_t *)tqp;
+ return tp;
+}
+static inline thread_t *queue_dequeue(thread_t *tp) {
+ tp->queue.prev->queue.next = tp->queue.next;
+ tp->queue.next->queue.prev = tp->queue.prev;
+ return tp;
+}
+static inline bool chSchIsRescRequiredI(void) {
+ chDbgCheckClassI();
+ return firstprio(&ch.rlist.queue) > currp->prio;
+}
+static inline bool chSchCanYieldS(void) {
+ chDbgCheckClassS();
+ return firstprio(&ch.rlist.queue) >= currp->prio;
+}
+static inline void chSchDoYieldS(void) {
+ chDbgCheckClassS();
+ if (chSchCanYieldS()) {
+ chSchDoRescheduleBehind();
+ }
+}
+static inline void chSchPreemption(void) {
+ tprio_t p1 = firstprio(&ch.rlist.queue);
+ tprio_t p2 = currp->prio;
+ if (p1 > p2) {
+ chSchDoRescheduleAhead();
+ }
+}
+#define CHSYS_H
+#define CH_INTEGRITY_RLIST 1U
+#define CH_INTEGRITY_VTLIST 2U
+#define CH_INTEGRITY_REGISTRY 4U
+#define CH_INTEGRITY_PORT 8U
+#define CH_IRQ_IS_VALID_PRIORITY(prio) PORT_IRQ_IS_VALID_PRIORITY(prio)
+#define CH_IRQ_IS_VALID_KERNEL_PRIORITY(prio) PORT_IRQ_IS_VALID_KERNEL_PRIORITY(prio)
+#define CH_IRQ_PROLOGUE() PORT_IRQ_PROLOGUE(); CH_CFG_IRQ_PROLOGUE_HOOK(); _stats_increase_irq(); _trace_isr_enter(__func__); _dbg_check_enter_isr()
+#define CH_IRQ_EPILOGUE() _dbg_check_leave_isr(); _trace_isr_leave(__func__); CH_CFG_IRQ_EPILOGUE_HOOK(); PORT_IRQ_EPILOGUE()
+#define CH_IRQ_HANDLER(id) PORT_IRQ_HANDLER(id)
+#define CH_FAST_IRQ_HANDLER(id) PORT_FAST_IRQ_HANDLER(id)
+#define S2RTC(freq,sec) ((freq) * (sec))
+#define MS2RTC(freq,msec) (rtcnt_t)((((freq) + 999UL) / 1000UL) * (msec))
+#define US2RTC(freq,usec) (rtcnt_t)((((freq) + 999999UL) / 1000000UL) * (usec))
+#define RTC2S(freq,n) ((((n) - 1UL) / (freq)) + 1UL)
+#define RTC2MS(freq,n) ((((n) - 1UL) / ((freq) / 1000UL)) + 1UL)
+#define RTC2US(freq,n) ((((n) - 1UL) / ((freq) / 1000000UL)) + 1UL)
+#define chSysGetRealtimeCounterX() (rtcnt_t)port_rt_get_counter_value()
+#define chSysSwitch(ntp,otp) { _trace_switch(ntp, otp); _stats_ctxswc(ntp, otp); CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp); port_switch(ntp, otp); }
+extern stkalign_t ch_idle_thread_wa[];
+ void chSysInit(void);
+ bool chSysIntegrityCheckI(unsigned testmask);
+ void chSysTimerHandlerI(void);
+ syssts_t chSysGetStatusAndLockX(void);
+ void chSysRestoreStatusX(syssts_t sts);
+ bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end);
+ void chSysPolledDelayX(rtcnt_t cycles);
+static inline void chSysDisable(void) {
+ port_disable();
+ _dbg_check_disable();
+}
+static inline void chSysSuspend(void) {
+ port_suspend();
+ _dbg_check_suspend();
+}
+static inline void chSysEnable(void) {
+ _dbg_check_enable();
+ port_enable();
+}
+static inline void chSysLock(void) {
+ port_lock();
+ _stats_start_measure_crit_thd();
+ _dbg_check_lock();
+}
+static inline void chSysUnlock(void) {
+ _dbg_check_unlock();
+ _stats_stop_measure_crit_thd();
+ chDbgAssert((ch.rlist.queue.next == (thread_t *)&ch.rlist.queue) ||
+ (ch.rlist.current->prio >= ch.rlist.queue.next->prio),
+ "priority order violation");
+ port_unlock();
+}
+static inline void chSysLockFromISR(void) {
+ port_lock_from_isr();
+ _stats_start_measure_crit_isr();
+ _dbg_check_lock_from_isr();
+}
+static inline void chSysUnlockFromISR(void) {
+ _dbg_check_unlock_from_isr();
+ _stats_stop_measure_crit_isr();
+ port_unlock_from_isr();
+}
+static inline void chSysUnconditionalLock(void) {
+ if (port_irq_enabled(port_get_irq_status())) {
+ chSysLock();
+ }
+}
+static inline void chSysUnconditionalUnlock(void) {
+ if (!port_irq_enabled(port_get_irq_status())) {
+ chSysUnlock();
+ }
+}
+static inline thread_t *chSysGetIdleThreadX(void) {
+ return ch.rlist.queue.prev;
+}
+#define CHVT_H
+ void _vt_init(void);
+ void chVTDoSetI(virtual_timer_t *vtp, sysinterval_t delay,
+ vtfunc_t vtfunc, void *par);
+ void chVTDoResetI(virtual_timer_t *vtp);
+static inline void chVTObjectInit(virtual_timer_t *vtp) {
+ vtp->func = NULL;
+}
+static inline systime_t chVTGetSystemTimeX(void) {
+ return ch.vtlist.systime;
+}
+static inline systime_t chVTGetSystemTime(void) {
+ systime_t systime;
+ chSysLock();
+ systime = chVTGetSystemTimeX();
+ chSysUnlock();
+ return systime;
+}
+static inline sysinterval_t chVTTimeElapsedSinceX(systime_t start) {
+ return chTimeDiffX(start, chVTGetSystemTimeX());
+}
+static inline bool chVTIsSystemTimeWithinX(systime_t start, systime_t end) {
+ return chTimeIsInRangeX(chVTGetSystemTimeX(), start, end);
+}
+static inline bool chVTIsSystemTimeWithin(systime_t start, systime_t end) {
+ return chTimeIsInRangeX(chVTGetSystemTime(), start, end);
+}
+static inline bool chVTGetTimersStateI(sysinterval_t *timep) {
+ chDbgCheckClassI();
+ if (&ch.vtlist == (virtual_timers_list_t *)ch.vtlist.next) {
+ return false;
+ }
+ if (timep != NULL) {
+ *timep = ch.vtlist.next->delta;
+ }
+ return true;
+}
+static inline bool chVTIsArmedI(const virtual_timer_t *vtp) {
+ chDbgCheckClassI();
+ return (bool)(vtp->func != NULL);
+}
+static inline bool chVTIsArmed(const virtual_timer_t *vtp) {
+ bool b;
+ chSysLock();
+ b = chVTIsArmedI(vtp);
+ chSysUnlock();
+ return b;
+}
+static inline void chVTResetI(virtual_timer_t *vtp) {
+ if (chVTIsArmedI(vtp)) {
+ chVTDoResetI(vtp);
+ }
+}
+static inline void chVTReset(virtual_timer_t *vtp) {
+ chSysLock();
+ chVTResetI(vtp);
+ chSysUnlock();
+}
+static inline void chVTSetI(virtual_timer_t *vtp, sysinterval_t delay,
+ vtfunc_t vtfunc, void *par) {
+ chVTResetI(vtp);
+ chVTDoSetI(vtp, delay, vtfunc, par);
+}
+static inline void chVTSet(virtual_timer_t *vtp, sysinterval_t delay,
+ vtfunc_t vtfunc, void *par) {
+ chSysLock();
+ chVTSetI(vtp, delay, vtfunc, par);
+ chSysUnlock();
+}
+static inline void chVTDoTickI(void) {
+ chDbgCheckClassI();
+ ch.vtlist.systime++;
+ if (&ch.vtlist != (virtual_timers_list_t *)ch.vtlist.next) {
+ --ch.vtlist.next->delta;
+ while (ch.vtlist.next->delta == (sysinterval_t)0) {
+ virtual_timer_t *vtp;
+ vtfunc_t fn;
+ vtp = ch.vtlist.next;
+ fn = vtp->func;
+ vtp->func = NULL;
+ vtp->next->prev = (virtual_timer_t *)&ch.vtlist;
+ ch.vtlist.next = vtp->next;
+ chSysUnlockFromISR();
+ fn(vtp->par);
+ chSysLockFromISR();
+ }
+ }
+}
+#define CHTHREADS_H
+typedef void (*tfunc_t)(void *p);
+typedef struct {
+ const char *name;
+ stkalign_t *wbase;
+ stkalign_t *wend;
+ tprio_t prio;
+ tfunc_t funcp;
+ void *arg;
+} thread_descriptor_t;
+#define _THREADS_QUEUE_DATA(name) {(thread_t *)&name, (thread_t *)&name}
+#define _THREADS_QUEUE_DECL(name) threads_queue_t name = _THREADS_QUEUE_DATA(name)
+#define THD_WORKING_AREA_SIZE(n) MEM_ALIGN_NEXT(sizeof(thread_t) + PORT_WA_SIZE(n), PORT_STACK_ALIGN)
+#define THD_WORKING_AREA(s,n) PORT_WORKING_AREA(s, n)
+#define THD_WORKING_AREA_BASE(s) ((stkalign_t *)(s))
+#define THD_WORKING_AREA_END(s) (THD_WORKING_AREA_BASE(s) + (sizeof (s) / sizeof (stkalign_t)))
+#define THD_FUNCTION(tname,arg) PORT_THD_FUNCTION(tname, arg)
+#define chThdSleepSeconds(sec) chThdSleep(TIME_S2I(sec))
+#define chThdSleepMilliseconds(msec) chThdSleep(TIME_MS2I(msec))
+#define chThdSleepMicroseconds(usec) chThdSleep(TIME_US2I(usec))
+ thread_t *_thread_init(thread_t *tp, const char *name, tprio_t prio);
+ thread_t *chThdCreateSuspendedI(const thread_descriptor_t *tdp);
+ thread_t *chThdCreateSuspended(const thread_descriptor_t *tdp);
+ thread_t *chThdCreateI(const thread_descriptor_t *tdp);
+ thread_t *chThdCreate(const thread_descriptor_t *tdp);
+ thread_t *chThdCreateStatic(void *wsp, size_t size,
+ tprio_t prio, tfunc_t pf, void *arg);
+ thread_t *chThdStart(thread_t *tp);
+ thread_t *chThdAddRef(thread_t *tp);
+ void chThdRelease(thread_t *tp);
+ void chThdExit(msg_t msg);
+ void chThdExitS(msg_t msg);
+ msg_t chThdWait(thread_t *tp);
+ tprio_t chThdSetPriority(tprio_t newprio);
+ void chThdTerminate(thread_t *tp);
+ msg_t chThdSuspendS(thread_reference_t *trp);
+ msg_t chThdSuspendTimeoutS(thread_reference_t *trp, sysinterval_t timeout);
+ void chThdResumeI(thread_reference_t *trp, msg_t msg);
+ void chThdResumeS(thread_reference_t *trp, msg_t msg);
+ void chThdResume(thread_reference_t *trp, msg_t msg);
+ msg_t chThdEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout);
+ void chThdDequeueNextI(threads_queue_t *tqp, msg_t msg);
+ void chThdDequeueAllI(threads_queue_t *tqp, msg_t msg);
+ void chThdSleep(sysinterval_t time);
+ void chThdSleepUntil(systime_t time);
+ systime_t chThdSleepUntilWindowed(systime_t prev, systime_t next);
+ void chThdYield(void);
+static inline thread_t *chThdGetSelfX(void) {
+ return ch.rlist.current;
+}
+static inline tprio_t chThdGetPriorityX(void) {
+ return chThdGetSelfX()->prio;
+}
+static inline stkalign_t *chThdGetWorkingAreaX(thread_t *tp) {
+ return tp->wabase;
+}
+static inline bool chThdTerminatedX(thread_t *tp) {
+ return (bool)(tp->state == CH_STATE_FINAL);
+}
+static inline bool chThdShouldTerminateX(void) {
+ return (bool)((chThdGetSelfX()->flags & CH_FLAG_TERMINATE) != (tmode_t)0);
+}
+static inline thread_t *chThdStartI(thread_t *tp) {
+ chDbgAssert(tp->state == CH_STATE_WTSTART, "wrong state");
+ return chSchReadyI(tp);
+}
+static inline void chThdSleepS(sysinterval_t ticks) {
+ chDbgCheck(ticks != TIME_IMMEDIATE);
+ (void) chSchGoSleepTimeoutS(CH_STATE_SLEEPING, ticks);
+}
+static inline void chThdQueueObjectInit(threads_queue_t *tqp) {
+ queue_init(tqp);
+}
+static inline bool chThdQueueIsEmptyI(threads_queue_t *tqp) {
+ chDbgCheckClassI();
+ return queue_isempty(tqp);
+}
+static inline void chThdDoDequeueNextI(threads_queue_t *tqp, msg_t msg) {
+ thread_t *tp;
+ chDbgAssert(queue_notempty(tqp), "empty queue");
+ tp = queue_fifo_remove(tqp);
+ chDbgAssert(tp->state == CH_STATE_QUEUED, "invalid state");
+ tp->u.rdymsg = msg;
+ (void) chSchReadyI(tp);
+}
+#define CHREGISTRY_H
+typedef struct {
+ char identifier[4];
+ uint8_t zero;
+ uint8_t size;
+ uint16_t version;
+ uint8_t ptrsize;
+ uint8_t timesize;
+ uint8_t threadsize;
+ uint8_t off_prio;
+ uint8_t off_ctx;
+ uint8_t off_newer;
+ uint8_t off_older;
+ uint8_t off_name;
+ uint8_t off_stklimit;
+ uint8_t off_state;
+ uint8_t off_flags;
+ uint8_t off_refs;
+ uint8_t off_preempt;
+ uint8_t off_time;
+} chdebug_t;
+#define REG_REMOVE(tp) { (tp)->older->newer = (tp)->newer; (tp)->newer->older = (tp)->older; }
+#define REG_INSERT(tp) { (tp)->newer = (thread_t *)&ch.rlist; (tp)->older = ch.rlist.older; (tp)->older->newer = (tp); ch.rlist.older = (tp); }
+ extern ROMCONST chdebug_t ch_debug;
+ thread_t *chRegFirstThread(void);
+ thread_t *chRegNextThread(thread_t *tp);
+ thread_t *chRegFindThreadByName(const char *name);
+ thread_t *chRegFindThreadByPointer(thread_t *tp);
+ thread_t *chRegFindThreadByWorkingArea(stkalign_t *wa);
+static inline void chRegSetThreadName(const char *name) {
+ ch.rlist.current->name = name;
+}
+static inline const char *chRegGetThreadNameX(thread_t *tp) {
+ return tp->name;
+}
+static inline void chRegSetThreadNameX(thread_t *tp, const char *name) {
+ tp->name = name;
+}
+#define CHSEM_H
+typedef struct ch_semaphore {
+ threads_queue_t queue;
+ cnt_t cnt;
+} semaphore_t;
+#define _SEMAPHORE_DATA(name,n) {_THREADS_QUEUE_DATA(name.queue), n}
+#define SEMAPHORE_DECL(name,n) semaphore_t name = _SEMAPHORE_DATA(name, n)
+ void chSemObjectInit(semaphore_t *sp, cnt_t n);
+ void chSemReset(semaphore_t *sp, cnt_t n);
+ void chSemResetI(semaphore_t *sp, cnt_t n);
+ msg_t chSemWait(semaphore_t *sp);
+ msg_t chSemWaitS(semaphore_t *sp);
+ msg_t chSemWaitTimeout(semaphore_t *sp, sysinterval_t timeout);
+ msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout);
+ void chSemSignal(semaphore_t *sp);
+ void chSemSignalI(semaphore_t *sp);
+ void chSemAddCounterI(semaphore_t *sp, cnt_t n);
+ msg_t chSemSignalWait(semaphore_t *sps, semaphore_t *spw);
+static inline void chSemFastWaitI(semaphore_t *sp) {
+ chDbgCheckClassI();
+ sp->cnt--;
+}
+static inline void chSemFastSignalI(semaphore_t *sp) {
+ chDbgCheckClassI();
+ sp->cnt++;
+}
+static inline cnt_t chSemGetCounterI(const semaphore_t *sp) {
+ chDbgCheckClassI();
+ return sp->cnt;
+}
+#define CHMTX_H
+typedef struct ch_mutex mutex_t;
+struct ch_mutex {
+ threads_queue_t queue;
+ thread_t *owner;
+ mutex_t *next;
+};
+#define _MUTEX_DATA(name) {_THREADS_QUEUE_DATA(name.queue), NULL, NULL}
+#define MUTEX_DECL(name) mutex_t name = _MUTEX_DATA(name)
+ void chMtxObjectInit(mutex_t *mp);
+ void chMtxLock(mutex_t *mp);
+ void chMtxLockS(mutex_t *mp);
+ bool chMtxTryLock(mutex_t *mp);
+ bool chMtxTryLockS(mutex_t *mp);
+ void chMtxUnlock(mutex_t *mp);
+ void chMtxUnlockS(mutex_t *mp);
+ void chMtxUnlockAll(void);
+ void chMtxUnlockAllS(void);
+static inline bool chMtxQueueNotEmptyS(mutex_t *mp) {
+ chDbgCheckClassS();
+ return queue_notempty(&mp->queue);
+}
+static inline thread_t *chMtxGetOwnerI(mutex_t *mp) {
+ chDbgCheckClassI();
+ return mp->owner;
+}
+static inline mutex_t *chMtxGetNextMutexX(void) {
+ return chThdGetSelfX()->mtxlist;
+}
+#define CHCOND_H
+typedef struct condition_variable {
+ threads_queue_t queue;
+} condition_variable_t;
+#define _CONDVAR_DATA(name) {_THREADS_QUEUE_DATA(name.queue)}
+#define CONDVAR_DECL(name) condition_variable_t name = _CONDVAR_DATA(name)
+ void chCondObjectInit(condition_variable_t *cp);
+ void chCondSignal(condition_variable_t *cp);
+ void chCondSignalI(condition_variable_t *cp);
+ void chCondBroadcast(condition_variable_t *cp);
+ void chCondBroadcastI(condition_variable_t *cp);
+ msg_t chCondWait(condition_variable_t *cp);
+ msg_t chCondWaitS(condition_variable_t *cp);
+ msg_t chCondWaitTimeout(condition_variable_t *cp, sysinterval_t timeout);
+ msg_t chCondWaitTimeoutS(condition_variable_t *cp, sysinterval_t timeout);
+#define CHEVENTS_H
+typedef struct event_listener event_listener_t;
+struct event_listener {
+ event_listener_t *next;
+ thread_t *listener;
+ eventmask_t events;
+ eventflags_t flags;
+ eventflags_t wflags;
+};
+typedef struct event_source {
+ event_listener_t *next;
+} event_source_t;
+typedef void (*evhandler_t)(eventid_t id);
+#define ALL_EVENTS ((eventmask_t)-1)
+#define EVENT_MASK(eid) ((eventmask_t)1 << (eventmask_t)(eid))
+#define _EVENTSOURCE_DATA(name) {(event_listener_t *)(&name)}
+#define EVENTSOURCE_DECL(name) event_source_t name = _EVENTSOURCE_DATA(name)
+ void chEvtRegisterMaskWithFlags(event_source_t *esp,
+ event_listener_t *elp,
+ eventmask_t events,
+ eventflags_t wflags);
+ void chEvtUnregister(event_source_t *esp, event_listener_t *elp);
+ eventmask_t chEvtGetAndClearEventsI(eventmask_t events);
+ eventmask_t chEvtGetAndClearEvents(eventmask_t events);
+ eventmask_t chEvtAddEvents(eventmask_t events);
+ eventflags_t chEvtGetAndClearFlags(event_listener_t *elp);
+ eventflags_t chEvtGetAndClearFlagsI(event_listener_t *elp);
+ void chEvtSignal(thread_t *tp, eventmask_t events);
+ void chEvtSignalI(thread_t *tp, eventmask_t events);
+ void chEvtBroadcastFlags(event_source_t *esp, eventflags_t flags);
+ void chEvtBroadcastFlagsI(event_source_t *esp, eventflags_t flags);
+ void chEvtDispatch(const evhandler_t *handlers, eventmask_t events);
+ eventmask_t chEvtWaitOne(eventmask_t events);
+ eventmask_t chEvtWaitAny(eventmask_t events);
+ eventmask_t chEvtWaitAll(eventmask_t events);
+ eventmask_t chEvtWaitOneTimeout(eventmask_t events, sysinterval_t timeout);
+ eventmask_t chEvtWaitAnyTimeout(eventmask_t events, sysinterval_t timeout);
+ eventmask_t chEvtWaitAllTimeout(eventmask_t events, sysinterval_t timeout);
+static inline void chEvtObjectInit(event_source_t *esp) {
+ esp->next = (event_listener_t *)esp;
+}
+static inline void chEvtRegisterMask(event_source_t *esp,
+ event_listener_t *elp,
+ eventmask_t events) {
+ chEvtRegisterMaskWithFlags(esp, elp, events, (eventflags_t)-1);
+}
+static inline void chEvtRegister(event_source_t *esp,
+ event_listener_t *elp,
+ eventid_t event) {
+ chEvtRegisterMask(esp, elp, EVENT_MASK(event));
+}
+static inline bool chEvtIsListeningI(event_source_t *esp) {
+ return (bool)(esp != (event_source_t *)esp->next);
+}
+static inline void chEvtBroadcast(event_source_t *esp) {
+ chEvtBroadcastFlags(esp, (eventflags_t)0);
+}
+static inline void chEvtBroadcastI(event_source_t *esp) {
+ chEvtBroadcastFlagsI(esp, (eventflags_t)0);
+}
+static inline eventmask_t chEvtAddEventsI(eventmask_t events) {
+ return currp->epending |= events;
+}
+static inline eventmask_t chEvtGetEventsX(void) {
+ return currp->epending;
+}
+#define CHMSG_H
+ msg_t chMsgSend(thread_t *tp, msg_t msg);
+ thread_t * chMsgWait(void);
+ void chMsgRelease(thread_t *tp, msg_t msg);
+static inline bool chMsgIsPendingI(thread_t *tp) {
+ chDbgCheckClassI();
+ return (bool)(tp->msgqueue.next != (thread_t *)&tp->msgqueue);
+}
+static inline msg_t chMsgGet(thread_t *tp) {
+ chDbgAssert(tp->state == CH_STATE_SNDMSG, "invalid state");
+ return tp->u.sentmsg;
+}
+static inline void chMsgReleaseS(thread_t *tp, msg_t msg) {
+ chDbgCheckClassS();
+ chSchWakeupS(tp, msg);
+}
+#define CHLIB_H
+#define _CHIBIOS_OSLIB_
+#define CH_OSLIB_STABLE 0
+#define CH_OSLIB_VERSION "1.1.0"
+#define CH_OSLIB_MAJOR 1
+#define CH_OSLIB_MINOR 1
+#define CH_OSLIB_PATCH 0
+#define CHBSEM_H
+typedef struct ch_binary_semaphore {
+ semaphore_t sem;
+} binary_semaphore_t;
+#define _BSEMAPHORE_DATA(name,taken) {_SEMAPHORE_DATA(name.sem, ((taken) ? 0 : 1))}
+#define BSEMAPHORE_DECL(name,taken) binary_semaphore_t name = _BSEMAPHORE_DATA(name, taken)
+static inline void chBSemObjectInit(binary_semaphore_t *bsp, bool taken) {
+ chSemObjectInit(&bsp->sem, taken ? (cnt_t)0 : (cnt_t)1);
+}
+static inline msg_t chBSemWait(binary_semaphore_t *bsp) {
+ return chSemWait(&bsp->sem);
+}
+static inline msg_t chBSemWaitS(binary_semaphore_t *bsp) {
+ chDbgCheckClassS();
+ return chSemWaitS(&bsp->sem);
+}
+static inline msg_t chBSemWaitTimeoutS(binary_semaphore_t *bsp,
+ sysinterval_t timeout) {
+ chDbgCheckClassS();
+ return chSemWaitTimeoutS(&bsp->sem, timeout);
+}
+static inline msg_t chBSemWaitTimeout(binary_semaphore_t *bsp,
+ sysinterval_t timeout) {
+ return chSemWaitTimeout(&bsp->sem, timeout);
+}
+static inline void chBSemResetI(binary_semaphore_t *bsp, bool taken) {
+ chDbgCheckClassI();
+ chSemResetI(&bsp->sem, taken ? (cnt_t)0 : (cnt_t)1);
+}
+static inline void chBSemReset(binary_semaphore_t *bsp, bool taken) {
+ chSemReset(&bsp->sem, taken ? (cnt_t)0 : (cnt_t)1);
+}
+static inline void chBSemSignalI(binary_semaphore_t *bsp) {
+ chDbgCheckClassI();
+ if (bsp->sem.cnt < (cnt_t)1) {
+ chSemSignalI(&bsp->sem);
+ }
+}
+static inline void chBSemSignal(binary_semaphore_t *bsp) {
+ chSysLock();
+ chBSemSignalI(bsp);
+ chSchRescheduleS();
+ chSysUnlock();
+}
+static inline bool chBSemGetStateI(const binary_semaphore_t *bsp) {
+ chDbgCheckClassI();
+ return (bsp->sem.cnt > (cnt_t)0) ? false : true;
+}
+#define CHMBOXES_H
+typedef struct {
+ msg_t *buffer;
+ msg_t *top;
+ msg_t *wrptr;
+ msg_t *rdptr;
+ size_t cnt;
+ bool reset;
+ threads_queue_t qw;
+ threads_queue_t qr;
+} mailbox_t;
+#define _MAILBOX_DATA(name,buffer,size) { (msg_t *)(buffer), (msg_t *)(buffer) + size, (msg_t *)(buffer), (msg_t *)(buffer), (size_t)0, false, _THREADS_QUEUE_DATA(name.qw), _THREADS_QUEUE_DATA(name.qr), }
+#define MAILBOX_DECL(name,buffer,size) mailbox_t name = _MAILBOX_DATA(name, buffer, size)
+ void chMBObjectInit(mailbox_t *mbp, msg_t *buf, size_t n);
+ void chMBReset(mailbox_t *mbp);
+ void chMBResetI(mailbox_t *mbp);
+ msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
+ msg_t chMBPostTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
+ msg_t chMBPostI(mailbox_t *mbp, msg_t msg);
+ msg_t chMBPostAheadTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
+ msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout);
+ msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg);
+ msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout);
+ msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout);
+ msg_t chMBFetchI(mailbox_t *mbp, msg_t *msgp);
+static inline size_t chMBGetSizeI(const mailbox_t *mbp) {
+ return (size_t)(mbp->top - mbp->buffer);
+}
+static inline size_t chMBGetUsedCountI(const mailbox_t *mbp) {
+ chDbgCheckClassI();
+ return mbp->cnt;
+}
+static inline size_t chMBGetFreeCountI(const mailbox_t *mbp) {
+ chDbgCheckClassI();
+ return chMBGetSizeI(mbp) - chMBGetUsedCountI(mbp);
+}
+static inline msg_t chMBPeekI(const mailbox_t *mbp) {
+ chDbgCheckClassI();
+ return *mbp->rdptr;
+}
+static inline void chMBResumeX(mailbox_t *mbp) {
+ mbp->reset = false;
+}
+#define CHMEMCORE_H
+typedef void *(*memgetfunc_t)(size_t size, unsigned align);
+typedef void *(*memgetfunc2_t)(size_t size, unsigned align, size_t offset);
+typedef struct {
+ uint8_t *basemem;
+ uint8_t *topmem;
+} memcore_t;
+#define chCoreAllocAlignedWithOffsetI chCoreAllocFromTopI
+#define chCoreAllocAlignedWithOffset chCoreAllocFromTop
+extern memcore_t ch_memcore;
+ void _core_init(void);
+ void *chCoreAllocFromBaseI(size_t size, unsigned align, size_t offset);
+ void *chCoreAllocFromTopI(size_t size, unsigned align, size_t offset);
+ void *chCoreAllocFromBase(size_t size, unsigned align, size_t offset);
+ void *chCoreAllocFromTop(size_t size, unsigned align, size_t offset);
+ size_t chCoreGetStatusX(void);
+static inline void *chCoreAllocAlignedI(size_t size, unsigned align) {
+ return chCoreAllocAlignedWithOffsetI(size, align, 0U);
+}
+static inline void *chCoreAllocAligned(size_t size, unsigned align) {
+ return chCoreAllocAlignedWithOffset(size, align, 0U);
+}
+static inline void *chCoreAllocI(size_t size) {
+ return chCoreAllocAlignedWithOffsetI(size, PORT_NATURAL_ALIGN, 0U);
+}
+static inline void *chCoreAlloc(size_t size) {
+ return chCoreAllocAlignedWithOffset(size, PORT_NATURAL_ALIGN, 0U);
+}
+#define CHMEMHEAPS_H
+#define CH_HEAP_ALIGNMENT 8U
+typedef struct memory_heap memory_heap_t;
+typedef union heap_header heap_header_t;
+union heap_header {
+ struct {
+ heap_header_t *next;
+ size_t pages;
+ } free;
+ struct {
+ memory_heap_t *heap;
+ size_t size;
+ } used;
+};
+struct memory_heap {
+ memgetfunc2_t provider;
+ heap_header_t header;
+ mutex_t mtx;
+};
+#define CH_HEAP_AREA(name,size) ALIGNED_VAR(CH_HEAP_ALIGNMENT) uint8_t name[MEM_ALIGN_NEXT((size), CH_HEAP_ALIGNMENT)]
+ void _heap_init(void);
+ void chHeapObjectInit(memory_heap_t *heapp, void *buf, size_t size);
+ void *chHeapAllocAligned(memory_heap_t *heapp, size_t size, unsigned align);
+ void chHeapFree(void *p);
+ size_t chHeapStatus(memory_heap_t *heapp, size_t *totalp, size_t *largestp);
+static inline void *chHeapAlloc(memory_heap_t *heapp, size_t size) {
+ return chHeapAllocAligned(heapp, size, CH_HEAP_ALIGNMENT);
+}
+static inline size_t chHeapGetSize(const void *p) {
+ return ((heap_header_t *)p - 1U)->used.size;
+}
+#define CHMEMPOOLS_H
+struct pool_header {
+ struct pool_header *next;
+};
+typedef struct {
+ struct pool_header *next;
+ size_t object_size;
+ unsigned align;
+ memgetfunc_t provider;
+} memory_pool_t;
+typedef struct {
+ semaphore_t sem;
+ memory_pool_t pool;
+} guarded_memory_pool_t;
+#define _MEMORYPOOL_DATA(name,size,align,provider) {NULL, size, align, provider}
+#define MEMORYPOOL_DECL(name,size,align,provider) memory_pool_t name = _MEMORYPOOL_DATA(name, size, align, provider)
+#define _GUARDEDMEMORYPOOL_DATA(name,size,align) { _SEMAPHORE_DATA(name.sem, (cnt_t)0), _MEMORYPOOL_DATA(NULL, size, align, NULL) }
+#define GUARDEDMEMORYPOOL_DECL(name,size,align) guarded_memory_pool_t name = _GUARDEDMEMORYPOOL_DATA(name, size, align)
+ void chPoolObjectInitAligned(memory_pool_t *mp, size_t size,
+ unsigned align, memgetfunc_t provider);
+ void chPoolLoadArray(memory_pool_t *mp, void *p, size_t n);
+ void *chPoolAllocI(memory_pool_t *mp);
+ void *chPoolAlloc(memory_pool_t *mp);
+ void chPoolFreeI(memory_pool_t *mp, void *objp);
+ void chPoolFree(memory_pool_t *mp, void *objp);
+ void chGuardedPoolObjectInitAligned(guarded_memory_pool_t *gmp,
+ size_t size,
+ unsigned align);
+ void chGuardedPoolLoadArray(guarded_memory_pool_t *gmp, void *p, size_t n);
+ void *chGuardedPoolAllocTimeoutS(guarded_memory_pool_t *gmp,
+ sysinterval_t timeout);
+ void *chGuardedPoolAllocTimeout(guarded_memory_pool_t *gmp,
+ sysinterval_t timeout);
+ void chGuardedPoolFree(guarded_memory_pool_t *gmp, void *objp);
+static inline void chPoolObjectInit(memory_pool_t *mp,
+ size_t size,
+ memgetfunc_t provider) {
+ chPoolObjectInitAligned(mp, size, PORT_NATURAL_ALIGN, provider);
+}
+static inline void chPoolAdd(memory_pool_t *mp, void *objp) {
+ chPoolFree(mp, objp);
+}
+static inline void chPoolAddI(memory_pool_t *mp, void *objp) {
+ chPoolFreeI(mp, objp);
+}
+static inline void chGuardedPoolObjectInit(guarded_memory_pool_t *gmp,
+ size_t size) {
+ chGuardedPoolObjectInitAligned(gmp, size, PORT_NATURAL_ALIGN);
+}
+static inline cnt_t chGuardedPoolGetCounterI(guarded_memory_pool_t *gmp) {
+ return chSemGetCounterI(&gmp->sem);
+}
+static inline void *chGuardedPoolAllocI(guarded_memory_pool_t *gmp) {
+ void *p;
+ p = chPoolAllocI(&gmp->pool);
+ if (p != NULL) {
+ chSemFastWaitI(&gmp->sem);
+ chDbgAssert(chSemGetCounterI(&gmp->sem) >= (cnt_t)0,
+ "semaphore out of sync");
+ }
+ return p;
+}
+static inline void chGuardedPoolFreeI(guarded_memory_pool_t *gmp, void *objp) {
+ chPoolFreeI(&gmp->pool, objp);
+ chSemSignalI(&gmp->sem);
+}
+static inline void chGuardedPoolFreeS(guarded_memory_pool_t *gmp, void *objp) {
+ chGuardedPoolFreeI(gmp, objp);
+ chSchRescheduleS();
+}
+static inline void chGuardedPoolAdd(guarded_memory_pool_t *gmp, void *objp) {
+ chGuardedPoolFree(gmp, objp);
+}
+static inline void chGuardedPoolAddI(guarded_memory_pool_t *gmp, void *objp) {
+ chGuardedPoolFreeI(gmp, objp);
+}
+static inline void chGuardedPoolAddS(guarded_memory_pool_t *gmp, void *objp) {
+ chGuardedPoolFreeS(gmp, objp);
+}
+#define CHOBJFIFOS_H
+typedef struct ch_objects_fifo {
+ guarded_memory_pool_t free;
+ mailbox_t mbx;
+} objects_fifo_t;
+static inline void chFifoObjectInitAligned(objects_fifo_t *ofp, size_t objsize,
+ size_t objn, unsigned objalign,
+ void *objbuf, msg_t *msgbuf) {
+ chDbgCheck((objsize >= objalign) && ((objsize % objalign) == 0U));
+ chGuardedPoolObjectInitAligned(&ofp->free, objsize, objalign);
+ chGuardedPoolLoadArray(&ofp->free, objbuf, objn);
+ chMBObjectInit(&ofp->mbx, msgbuf, objn);
+}
+static inline void chFifoObjectInit(objects_fifo_t *ofp, size_t objsize,
+ size_t objn, void *objbuf,
+ msg_t *msgbuf) {
+ chFifoObjectInitAligned(ofp, objsize, objn,
+ PORT_NATURAL_ALIGN,
+ objbuf, msgbuf);
+}
+static inline void *chFifoTakeObjectI(objects_fifo_t *ofp) {
+ return chGuardedPoolAllocI(&ofp->free);
+}
+static inline void *chFifoTakeObjectTimeoutS(objects_fifo_t *ofp,
+ sysinterval_t timeout) {
+ return chGuardedPoolAllocTimeoutS(&ofp->free, timeout);
+}
+static inline void *chFifoTakeObjectTimeout(objects_fifo_t *ofp,
+ sysinterval_t timeout) {
+ return chGuardedPoolAllocTimeout(&ofp->free, timeout);
+}
+static inline void chFifoReturnObjectI(objects_fifo_t *ofp,
+ void *objp) {
+ chGuardedPoolFreeI(&ofp->free, objp);
+}
+static inline void chFifoReturnObjectS(objects_fifo_t *ofp,
+ void *objp) {
+ chGuardedPoolFreeS(&ofp->free, objp);
+}
+static inline void chFifoReturnObject(objects_fifo_t *ofp,
+ void *objp) {
+ chGuardedPoolFree(&ofp->free, objp);
+}
+static inline void chFifoSendObjectI(objects_fifo_t *ofp,
+ void *objp) {
+ msg_t msg;
+ msg = chMBPostI(&ofp->mbx, (msg_t)objp);
+ chDbgAssert(msg == MSG_OK, "post failed");
+}
+static inline void chFifoSendObjectS(objects_fifo_t *ofp,
+ void *objp) {
+ msg_t msg;
+ msg = chMBPostTimeoutS(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
+ chDbgAssert(msg == MSG_OK, "post failed");
+}
+static inline void chFifoSendObject(objects_fifo_t *ofp, void *objp) {
+ msg_t msg;
+ msg = chMBPostTimeout(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
+ chDbgAssert(msg == MSG_OK, "post failed");
+}
+static inline void chFifoSendObjectAheadI(objects_fifo_t *ofp,
+ void *objp) {
+ msg_t msg;
+ msg = chMBPostAheadI(&ofp->mbx, (msg_t)objp);
+ chDbgAssert(msg == MSG_OK, "post failed");
+}
+static inline void chFifoSendObjectAheadS(objects_fifo_t *ofp,
+ void *objp) {
+ msg_t msg;
+ msg = chMBPostAheadTimeoutS(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
+ chDbgAssert(msg == MSG_OK, "post failed");
+}
+static inline void chFifoSendObjectAhead(objects_fifo_t *ofp, void *objp) {
+ msg_t msg;
+ msg = chMBPostAheadTimeout(&ofp->mbx, (msg_t)objp, TIME_IMMEDIATE);
+ chDbgAssert(msg == MSG_OK, "post failed");
+}
+static inline msg_t chFifoReceiveObjectI(objects_fifo_t *ofp,
+ void **objpp) {
+ return chMBFetchI(&ofp->mbx, (msg_t *)objpp);
+}
+static inline msg_t chFifoReceiveObjectTimeoutS(objects_fifo_t *ofp,
+ void **objpp,
+ sysinterval_t timeout) {
+ return chMBFetchTimeoutS(&ofp->mbx, (msg_t *)objpp, timeout);
+}
+static inline msg_t chFifoReceiveObjectTimeout(objects_fifo_t *ofp,
+ void **objpp,
+ sysinterval_t timeout) {
+ return chMBFetchTimeout(&ofp->mbx, (msg_t *)objpp, timeout);
+}
+#define CHPIPES_H
+typedef struct {
+ uint8_t *buffer;
+ uint8_t *top;
+ uint8_t *wrptr;
+ uint8_t *rdptr;
+ size_t cnt;
+ bool reset;
+ thread_reference_t wtr;
+ thread_reference_t rtr;
+ mutex_t cmtx;
+ mutex_t wmtx;
+ mutex_t rmtx;
+} pipe_t;
+#define _PIPE_DATA(name,buffer,size) { (uint8_t *)(buffer), (uint8_t *)(buffer) + size, (uint8_t *)(buffer), (uint8_t *)(buffer), (size_t)0, false, NULL, NULL, _MUTEX_DATA(name.cmtx), _MUTEX_DATA(name.wmtx), _MUTEX_DATA(name.rmtx), }
+#define PIPE_DECL(name,buffer,size) pipe_t name = _PIPE_DATA(name, buffer, size)
+ void chPipeObjectInit(pipe_t *pp, uint8_t *buf, size_t n);
+ void chPipeReset(pipe_t *pp);
+ size_t chPipeWriteTimeout(pipe_t *pp, const uint8_t *bp,
+ size_t n, sysinterval_t timeout);
+ size_t chPipeReadTimeout(pipe_t *pp, uint8_t *bp,
+ size_t n, sysinterval_t timeout);
+static inline size_t chPipeGetSize(const pipe_t *pp) {
+ return (size_t)(pp->top - pp->buffer);
+}
+static inline size_t chPipeGetUsedCount(const pipe_t *pp) {
+ return pp->cnt;
+}
+static inline size_t chPipeGetFreeCount(const pipe_t *pp) {
+ return chPipeGetSize(pp) - chPipeGetUsedCount(pp);
+}
+static inline void chPipeResume(pipe_t *pp) {
+ pp->reset = false;
+}
+#define CHFACTORY_H
+#define CH_FACTORY_REQUIRES_POOLS ((CH_CFG_FACTORY_OBJECTS_REGISTRY == TRUE) || (CH_CFG_FACTORY_SEMAPHORES == TRUE))
+#define CH_FACTORY_REQUIRES_HEAP ((CH_CFG_FACTORY_GENERIC_BUFFERS == TRUE) || (CH_CFG_FACTORY_MAILBOXES == TRUE) || (CH_CFG_FACTORY_OBJ_FIFOS == TRUE) || (CH_CFG_FACTORY_PIPES == TRUE))
+typedef struct ch_dyn_element {
+ struct ch_dyn_element *next;
+ ucnt_t refs;
+ char name[CH_CFG_FACTORY_MAX_NAMES_LENGTH];
+} dyn_element_t;
+typedef struct ch_dyn_list {
+ dyn_element_t *next;
+} dyn_list_t;
+typedef struct ch_registered_static_object {
+ dyn_element_t element;
+ void *objp;
+} registered_object_t;
+typedef struct ch_dyn_object {
+ dyn_element_t element;
+ uint8_t buffer[];
+} dyn_buffer_t;
+typedef struct ch_dyn_semaphore {
+ dyn_element_t element;
+ semaphore_t sem;
+} dyn_semaphore_t;
+typedef struct ch_dyn_mailbox {
+ dyn_element_t element;
+ mailbox_t mbx;
+ msg_t msgbuf[];
+} dyn_mailbox_t;
+typedef struct ch_dyn_objects_fifo {
+ dyn_element_t element;
+ objects_fifo_t fifo;
+ msg_t msgbuf[];
+} dyn_objects_fifo_t;
+typedef struct ch_dyn_pipe {
+ dyn_element_t element;
+ pipe_t pipe;
+ uint8_t buffer[];
+} dyn_pipe_t;
+typedef struct ch_objects_factory {
+ mutex_t mtx;
+ dyn_list_t obj_list;
+ memory_pool_t obj_pool;
+ dyn_list_t buf_list;
+ dyn_list_t sem_list;
+ memory_pool_t sem_pool;
+ dyn_list_t mbx_list;
+ dyn_list_t fifo_list;
+ dyn_list_t pipe_list;
+} objects_factory_t;
+extern objects_factory_t ch_factory;
+ void _factory_init(void);
+ registered_object_t *chFactoryRegisterObject(const char *name,
+ void *objp);
+ registered_object_t *chFactoryFindObject(const char *name);
+ registered_object_t *chFactoryFindObjectByPointer(void *objp);
+ void chFactoryReleaseObject(registered_object_t *rop);
+ dyn_buffer_t *chFactoryCreateBuffer(const char *name, size_t size);
+ dyn_buffer_t *chFactoryFindBuffer(const char *name);
+ void chFactoryReleaseBuffer(dyn_buffer_t *dbp);
+ dyn_semaphore_t *chFactoryCreateSemaphore(const char *name, cnt_t n);
+ dyn_semaphore_t *chFactoryFindSemaphore(const char *name);
+ void chFactoryReleaseSemaphore(dyn_semaphore_t *dsp);
+ dyn_mailbox_t *chFactoryCreateMailbox(const char *name, size_t n);
+ dyn_mailbox_t *chFactoryFindMailbox(const char *name);
+ void chFactoryReleaseMailbox(dyn_mailbox_t *dmp);
+ dyn_objects_fifo_t *chFactoryCreateObjectsFIFO(const char *name,
+ size_t objsize,
+ size_t objn,
+ unsigned objalign);
+ dyn_objects_fifo_t *chFactoryFindObjectsFIFO(const char *name);
+ void chFactoryReleaseObjectsFIFO(dyn_objects_fifo_t *dofp);
+ dyn_pipe_t *chFactoryCreatePipe(const char *name, size_t size);
+ dyn_pipe_t *chFactoryFindPipe(const char *name);
+ void chFactoryReleasePipe(dyn_pipe_t *dpp);
+static inline dyn_element_t *chFactoryDuplicateReference(dyn_element_t *dep) {
+ dep->refs++;
+ return dep;
+}
+static inline void *chFactoryGetObject(registered_object_t *rop) {
+ return rop->objp;
+}
+static inline size_t chFactoryGetBufferSize(dyn_buffer_t *dbp) {
+ return chHeapGetSize(dbp) - sizeof (dyn_element_t);
+}
+static inline uint8_t *chFactoryGetBuffer(dyn_buffer_t *dbp) {
+ return dbp->buffer;
+}
+static inline semaphore_t *chFactoryGetSemaphore(dyn_semaphore_t *dsp) {
+ return &dsp->sem;
+}
+static inline mailbox_t *chFactoryGetMailbox(dyn_mailbox_t *dmp) {
+ return &dmp->mbx;
+}
+static inline objects_fifo_t *chFactoryGetObjectsFIFO(dyn_objects_fifo_t *dofp) {
+ return &dofp->fifo;
+}
+static inline pipe_t *chFactoryGetPipe(dyn_pipe_t *dpp) {
+ return &dpp->pipe;
+}
+#define CHDYNAMIC_H
+ thread_t *chThdCreateFromHeap(memory_heap_t *heapp, size_t size,
+ const char *name, tprio_t prio,
+ tfunc_t pf, void *arg);
+ thread_t *chThdCreateFromMemoryPool(memory_pool_t *mp, const char *name,
+ tprio_t prio, tfunc_t pf, void *arg);
diff --git a/doc/common/src/concepts.dox b/doc/common/src/concepts.dox
index b8ea34b00..76d8667da 100644
--- a/doc/common/src/concepts.dox
+++ b/doc/common/src/concepts.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/ex/src/main.dox b/doc/ex/src/main.dox
index 5e39f058e..bb19335ec 100644
--- a/doc/ex/src/main.dox
+++ b/doc/ex/src/main.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/full_rm/src/main.dox b/doc/full_rm/src/main.dox
index 9be27c8da..6f88bfa2c 100644
--- a/doc/full_rm/src/main.dox
+++ b/doc/full_rm/src/main.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/hal-stm32f3/src/main.dox b/doc/hal-stm32f3/src/main.dox
index ef38a519f..5cf9e63ea 100755
--- a/doc/hal-stm32f3/src/main.dox
+++ b/doc/hal-stm32f3/src/main.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/hal/src/main.dox b/doc/hal/src/main.dox
index ef38a519f..5cf9e63ea 100644
--- a/doc/hal/src/main.dox
+++ b/doc/hal/src/main.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/nil/src/main.dox b/doc/nil/src/main.dox
index 63db94094..b15bfa1ef 100644
--- a/doc/nil/src/main.dox
+++ b/doc/nil/src/main.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/rt/src/main.dox b/doc/rt/src/main.dox
index 722801d4c..b80e83e48 100644
--- a/doc/rt/src/main.dox
+++ b/doc/rt/src/main.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/abstractions/cmsis_os/cmsis_os.c b/os/common/abstractions/cmsis_os/cmsis_os.c
index 4611eef0d..154574281 100644
--- a/os/common/abstractions/cmsis_os/cmsis_os.c
+++ b/os/common/abstractions/cmsis_os/cmsis_os.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/abstractions/cmsis_os/cmsis_os.h b/os/common/abstractions/cmsis_os/cmsis_os.h
index d6e9876a4..eb689a4c3 100644
--- a/os/common/abstractions/cmsis_os/cmsis_os.h
+++ b/os/common/abstractions/cmsis_os/cmsis_os.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARM/chcore.c b/os/common/ports/ARM/chcore.c
index 38ecba65d..a1f10e4ab 100644
--- a/os/common/ports/ARM/chcore.c
+++ b/os/common/ports/ARM/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARM/chcore.h b/os/common/ports/ARM/chcore.h
index 5e7c4972c..1197071b8 100644
--- a/os/common/ports/ARM/chcore.h
+++ b/os/common/ports/ARM/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARM/chcore_timer.h b/os/common/ports/ARM/chcore_timer.h
index e19ac8e73..145a6bb3d 100644
--- a/os/common/ports/ARM/chcore_timer.h
+++ b/os/common/ports/ARM/chcore_timer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARM/compilers/GCC/chcoreasm.S b/os/common/ports/ARM/compilers/GCC/chcoreasm.S
index 0dc0d84be..7d2782e9e 100644
--- a/os/common/ports/ARM/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/ARM/compilers/GCC/chcoreasm.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARM/compilers/GCC/chtypes.h b/os/common/ports/ARM/compilers/GCC/chtypes.h
index 048101666..d6af7ac5d 100644
--- a/os/common/ports/ARM/compilers/GCC/chtypes.h
+++ b/os/common/ports/ARM/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/chcore.c b/os/common/ports/ARMv6-M/chcore.c
index 3ea79fb3a..bc5672bbc 100644
--- a/os/common/ports/ARMv6-M/chcore.c
+++ b/os/common/ports/ARMv6-M/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/chcore.h b/os/common/ports/ARMv6-M/chcore.h
index ad99d43a8..cb29b10e1 100644
--- a/os/common/ports/ARMv6-M/chcore.h
+++ b/os/common/ports/ARMv6-M/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/chcore_timer.h b/os/common/ports/ARMv6-M/chcore_timer.h
index 80a76f9f4..98e6592c6 100644
--- a/os/common/ports/ARMv6-M/chcore_timer.h
+++ b/os/common/ports/ARMv6-M/chcore_timer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S
index c17bcb2cc..a3c92b73d 100644
--- a/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h b/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h
index de95804bf..2163f3d48 100644
--- a/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h
+++ b/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s b/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s
index 753d65f15..416a7a670 100644
--- a/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s
+++ b/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h b/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h
index 2bd376de2..93a80b224 100644
--- a/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h
+++ b/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s b/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s
index 0e2ea0018..d213fb514 100644
--- a/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s
+++ b/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h b/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h
index fbda59762..53bb3e220 100644
--- a/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h
+++ b/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/chcore.c b/os/common/ports/ARMv7-M/chcore.c
index 982e24fe6..dfa060e46 100644
--- a/os/common/ports/ARMv7-M/chcore.c
+++ b/os/common/ports/ARMv7-M/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/chcore.h b/os/common/ports/ARMv7-M/chcore.h
index b3c5f4e30..fe41adc06 100644
--- a/os/common/ports/ARMv7-M/chcore.h
+++ b/os/common/ports/ARMv7-M/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/chcore_timer.h b/os/common/ports/ARMv7-M/chcore_timer.h
index 80a76f9f4..98e6592c6 100644
--- a/os/common/ports/ARMv7-M/chcore_timer.h
+++ b/os/common/ports/ARMv7-M/chcore_timer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S
index f02557729..a642885da 100644
--- a/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h b/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h
index de95804bf..2163f3d48 100644
--- a/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h
+++ b/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s b/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s
index 5aad81ed5..a4bf85c97 100644
--- a/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s
+++ b/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h b/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h
index 2bd376de2..93a80b224 100644
--- a/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h
+++ b/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s b/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s
index 67f305934..51e4df65a 100644
--- a/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s
+++ b/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h b/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h
index fbda59762..53bb3e220 100644
--- a/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h
+++ b/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML-TZ/chcore.c b/os/common/ports/ARMv8-M-ML-TZ/chcore.c
index b5166f7b5..448d49646 100644
--- a/os/common/ports/ARMv8-M-ML-TZ/chcore.c
+++ b/os/common/ports/ARMv8-M-ML-TZ/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML-TZ/chcore.h b/os/common/ports/ARMv8-M-ML-TZ/chcore.h
index e5ac0e8e3..40f06516e 100644
--- a/os/common/ports/ARMv8-M-ML-TZ/chcore.h
+++ b/os/common/ports/ARMv8-M-ML-TZ/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h b/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h
index 08764751d..85b1f7450 100644
--- a/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h
+++ b/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML-TZ/chtypes.h b/os/common/ports/ARMv8-M-ML-TZ/chtypes.h
index 98d55ff7b..25f479f9c 100644
--- a/os/common/ports/ARMv8-M-ML-TZ/chtypes.h
+++ b/os/common/ports/ARMv8-M-ML-TZ/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S
index 7a87b2e53..603482989 100644
--- a/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML/chcore.c b/os/common/ports/ARMv8-M-ML/chcore.c
index 73845a9ff..d4039530f 100644
--- a/os/common/ports/ARMv8-M-ML/chcore.c
+++ b/os/common/ports/ARMv8-M-ML/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML/chcore.h b/os/common/ports/ARMv8-M-ML/chcore.h
index 7a8eb8c8a..0652cff90 100644
--- a/os/common/ports/ARMv8-M-ML/chcore.h
+++ b/os/common/ports/ARMv8-M-ML/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML/chcore_timer.h b/os/common/ports/ARMv8-M-ML/chcore_timer.h
index 80a76f9f4..98e6592c6 100644
--- a/os/common/ports/ARMv8-M-ML/chcore_timer.h
+++ b/os/common/ports/ARMv8-M-ML/chcore_timer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S
index 94afedd19..8efe75efd 100644
--- a/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h b/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h
index de95804bf..2163f3d48 100644
--- a/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h
+++ b/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/AVR/chcore.c b/os/common/ports/AVR/chcore.c
index f75b12e63..7b3fda997 100644
--- a/os/common/ports/AVR/chcore.c
+++ b/os/common/ports/AVR/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/AVR/chcore.h b/os/common/ports/AVR/chcore.h
index b5f70fc9a..8dabb0ab7 100644
--- a/os/common/ports/AVR/chcore.h
+++ b/os/common/ports/AVR/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/AVR/chcore_timer.h b/os/common/ports/AVR/chcore_timer.h
index 826f24a46..c2e4ab120 100644
--- a/os/common/ports/AVR/chcore_timer.h
+++ b/os/common/ports/AVR/chcore_timer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/AVR/compilers/GCC/chtypes.h b/os/common/ports/AVR/compilers/GCC/chtypes.h
index 0bbb9ef9a..35652b7c8 100644
--- a/os/common/ports/AVR/compilers/GCC/chtypes.h
+++ b/os/common/ports/AVR/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/SIMIA32/chcore.c b/os/common/ports/SIMIA32/chcore.c
index 800c53f96..951cdcea6 100644
--- a/os/common/ports/SIMIA32/chcore.c
+++ b/os/common/ports/SIMIA32/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/SIMIA32/chcore.h b/os/common/ports/SIMIA32/chcore.h
index 609f2a535..d94bb52d6 100644
--- a/os/common/ports/SIMIA32/chcore.h
+++ b/os/common/ports/SIMIA32/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/SIMIA32/compilers/GCC/chtypes.h b/os/common/ports/SIMIA32/compilers/GCC/chtypes.h
index 6ed1f04bc..0225e01fe 100644
--- a/os/common/ports/SIMIA32/compilers/GCC/chtypes.h
+++ b/os/common/ports/SIMIA32/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/chcore.c b/os/common/ports/e200/chcore.c
index ed0b9089d..370ce633b 100644
--- a/os/common/ports/e200/chcore.c
+++ b/os/common/ports/e200/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/chcore.h b/os/common/ports/e200/chcore.h
index f7832ef9c..bf57674b3 100644
--- a/os/common/ports/e200/chcore.h
+++ b/os/common/ports/e200/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/CW/chcoreasm.s b/os/common/ports/e200/compilers/CW/chcoreasm.s
index ad4037318..a6e9f5698 100644
--- a/os/common/ports/e200/compilers/CW/chcoreasm.s
+++ b/os/common/ports/e200/compilers/CW/chcoreasm.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/CW/chtypes.h b/os/common/ports/e200/compilers/CW/chtypes.h
index 22be82288..35e071a9f 100644
--- a/os/common/ports/e200/compilers/CW/chtypes.h
+++ b/os/common/ports/e200/compilers/CW/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/CW/ivor.s b/os/common/ports/e200/compilers/CW/ivor.s
index 64b2408c1..5f5db990a 100644
--- a/os/common/ports/e200/compilers/CW/ivor.s
+++ b/os/common/ports/e200/compilers/CW/ivor.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/GCC/chcoreasm.S b/os/common/ports/e200/compilers/GCC/chcoreasm.S
index f9e4c6774..f00119934 100644
--- a/os/common/ports/e200/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/e200/compilers/GCC/chcoreasm.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/GCC/chtypes.h b/os/common/ports/e200/compilers/GCC/chtypes.h
index ae4d1162f..c12300df7 100644
--- a/os/common/ports/e200/compilers/GCC/chtypes.h
+++ b/os/common/ports/e200/compilers/GCC/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/GCC/ivor.S b/os/common/ports/e200/compilers/GCC/ivor.S
index 6bc2f5b70..ea17c48f2 100644
--- a/os/common/ports/e200/compilers/GCC/ivor.S
+++ b/os/common/ports/e200/compilers/GCC/ivor.S
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/GHS/chcoreasm.s b/os/common/ports/e200/compilers/GHS/chcoreasm.s
index 88a57f00d..7883b83bd 100644
--- a/os/common/ports/e200/compilers/GHS/chcoreasm.s
+++ b/os/common/ports/e200/compilers/GHS/chcoreasm.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/GHS/chtypes.h b/os/common/ports/e200/compilers/GHS/chtypes.h
index ae4d1162f..c12300df7 100644
--- a/os/common/ports/e200/compilers/GHS/chtypes.h
+++ b/os/common/ports/e200/compilers/GHS/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/e200/compilers/GHS/ivor.s b/os/common/ports/e200/compilers/GHS/ivor.s
index 2fd98ba8f..ee875cc7d 100644
--- a/os/common/ports/e200/compilers/GHS/ivor.s
+++ b/os/common/ports/e200/compilers/GHS/ivor.s
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/templates/chcore.c b/os/common/ports/templates/chcore.c
index 217e49bfa..be97763e1 100644
--- a/os/common/ports/templates/chcore.c
+++ b/os/common/ports/templates/chcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/templates/chcore.dox b/os/common/ports/templates/chcore.dox
index 16a4da66d..2c21eb4b4 100644
--- a/os/common/ports/templates/chcore.dox
+++ b/os/common/ports/templates/chcore.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/templates/chcore.h b/os/common/ports/templates/chcore.h
index bcc8db448..f62fd1b59 100644
--- a/os/common/ports/templates/chcore.h
+++ b/os/common/ports/templates/chcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/common/ports/templates/chtypes.h b/os/common/ports/templates/chtypes.h
index fe30eff8c..3bd5f75e9 100644
--- a/os/common/ports/templates/chtypes.h
+++ b/os/common/ports/templates/chtypes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/hal/lib/complex/mfs/hal_mfs.c b/os/hal/lib/complex/mfs/hal_mfs.c
index 7b898ff25..5c05721ee 100644
--- a/os/hal/lib/complex/mfs/hal_mfs.c
+++ b/os/hal/lib/complex/mfs/hal_mfs.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/hal/lib/complex/mfs/hal_mfs.h b/os/hal/lib/complex/mfs/hal_mfs.h
index 43ffcbd47..1bc063982 100644
--- a/os/hal/lib/complex/mfs/hal_mfs.h
+++ b/os/hal/lib/complex/mfs/hal_mfs.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/license/chcustomer.h b/os/license/chcustomer.h
index f6b948086..6f9b8dd92 100644
--- a/os/license/chcustomer.h
+++ b/os/license/chcustomer.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/license/chlicense.h b/os/license/chlicense.h
index a2253839a..6e73efa80 100644
--- a/os/license/chlicense.h
+++ b/os/license/chlicense.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/license/chversion.h b/os/license/chversion.h
index 086ae2692..e8c2856a5 100644
--- a/os/license/chversion.h
+++ b/os/license/chversion.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/license/license.dox b/os/license/license.dox
index b240e1544..303d565fd 100644
--- a/os/license/license.dox
+++ b/os/license/license.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/dox/nil.dox b/os/nil/dox/nil.dox
index 9fd3af5ff..4c971b35c 100644
--- a/os/nil/dox/nil.dox
+++ b/os/nil/dox/nil.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/include/ch.h b/os/nil/include/ch.h
index 43862d2e9..8a33e0c15 100644
--- a/os/nil/include/ch.h
+++ b/os/nil/include/ch.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/include/chevt.h b/os/nil/include/chevt.h
index 7d7446148..5a0795402 100644
--- a/os/nil/include/chevt.h
+++ b/os/nil/include/chevt.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/include/chmsg.h b/os/nil/include/chmsg.h
index abe1de75e..bcd5828f4 100644
--- a/os/nil/include/chmsg.h
+++ b/os/nil/include/chmsg.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/include/chsem.h b/os/nil/include/chsem.h
index 942c63194..fbd21d30e 100644
--- a/os/nil/include/chsem.h
+++ b/os/nil/include/chsem.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/src/ch.c b/os/nil/src/ch.c
index 4dd4fe89c..c3c991294 100644
--- a/os/nil/src/ch.c
+++ b/os/nil/src/ch.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/src/chevt.c b/os/nil/src/chevt.c
index ed33af44c..28eba85b6 100644
--- a/os/nil/src/chevt.c
+++ b/os/nil/src/chevt.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/src/chmsg.c b/os/nil/src/chmsg.c
index ccefcc587..e17ee0eaa 100644
--- a/os/nil/src/chmsg.c
+++ b/os/nil/src/chmsg.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/nil/src/chsem.c b/os/nil/src/chsem.c
index c97eb3a5e..fe38a2c4f 100644
--- a/os/nil/src/chsem.c
+++ b/os/nil/src/chsem.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/dox/lib.dox b/os/oslib/dox/lib.dox
index 362a608fe..7055d4ce4 100644
--- a/os/oslib/dox/lib.dox
+++ b/os/oslib/dox/lib.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chbsem.h b/os/oslib/include/chbsem.h
index b70f1ae1f..53ade74ec 100644
--- a/os/oslib/include/chbsem.h
+++ b/os/oslib/include/chbsem.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chdelegates.h b/os/oslib/include/chdelegates.h
index 4b4679dca..0bf34acc9 100644
--- a/os/oslib/include/chdelegates.h
+++ b/os/oslib/include/chdelegates.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chfactory.h b/os/oslib/include/chfactory.h
index aba5bc656..293790bbb 100644
--- a/os/oslib/include/chfactory.h
+++ b/os/oslib/include/chfactory.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chjobs.h b/os/oslib/include/chjobs.h
index 46a8edc06..3ab28c7d6 100644
--- a/os/oslib/include/chjobs.h
+++ b/os/oslib/include/chjobs.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chlib.h b/os/oslib/include/chlib.h
index c720d56f1..fcc01d10e 100644
--- a/os/oslib/include/chlib.h
+++ b/os/oslib/include/chlib.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chmboxes.h b/os/oslib/include/chmboxes.h
index 747e9b5ec..42c5209e1 100644
--- a/os/oslib/include/chmboxes.h
+++ b/os/oslib/include/chmboxes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chmemcore.h b/os/oslib/include/chmemcore.h
index 85a954e77..56245f157 100644
--- a/os/oslib/include/chmemcore.h
+++ b/os/oslib/include/chmemcore.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chmemheaps.h b/os/oslib/include/chmemheaps.h
index 246c83ba3..02117ec97 100644
--- a/os/oslib/include/chmemheaps.h
+++ b/os/oslib/include/chmemheaps.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chmempools.h b/os/oslib/include/chmempools.h
index 619dec88a..3e999ac4a 100644
--- a/os/oslib/include/chmempools.h
+++ b/os/oslib/include/chmempools.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chobjcaches.h b/os/oslib/include/chobjcaches.h
index db6957604..1015e46de 100644
--- a/os/oslib/include/chobjcaches.h
+++ b/os/oslib/include/chobjcaches.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chobjfifos.h b/os/oslib/include/chobjfifos.h
index 52c227962..0e45be9a6 100644
--- a/os/oslib/include/chobjfifos.h
+++ b/os/oslib/include/chobjfifos.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/include/chpipes.h b/os/oslib/include/chpipes.h
index bf88a7f34..9f5e61867 100644
--- a/os/oslib/include/chpipes.h
+++ b/os/oslib/include/chpipes.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chdelegates.c b/os/oslib/src/chdelegates.c
index d1c245367..12aee9813 100644
--- a/os/oslib/src/chdelegates.c
+++ b/os/oslib/src/chdelegates.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chfactory.c b/os/oslib/src/chfactory.c
index d1e8c09c5..1491ea8fc 100644
--- a/os/oslib/src/chfactory.c
+++ b/os/oslib/src/chfactory.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chmboxes.c b/os/oslib/src/chmboxes.c
index a96c07d5a..a83f3e852 100644
--- a/os/oslib/src/chmboxes.c
+++ b/os/oslib/src/chmboxes.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chmemcore.c b/os/oslib/src/chmemcore.c
index dd57eff9c..4565e9a85 100644
--- a/os/oslib/src/chmemcore.c
+++ b/os/oslib/src/chmemcore.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chmemheaps.c b/os/oslib/src/chmemheaps.c
index b81091659..864fdf193 100644
--- a/os/oslib/src/chmemheaps.c
+++ b/os/oslib/src/chmemheaps.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chmempools.c b/os/oslib/src/chmempools.c
index 1144b0bdf..bc02ba2b4 100644
--- a/os/oslib/src/chmempools.c
+++ b/os/oslib/src/chmempools.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chobjcaches.c b/os/oslib/src/chobjcaches.c
index d08421bd8..09b2ecbc5 100644
--- a/os/oslib/src/chobjcaches.c
+++ b/os/oslib/src/chobjcaches.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/oslib/src/chpipes.c b/os/oslib/src/chpipes.c
index f3fb462d2..57ca29e2d 100644
--- a/os/oslib/src/chpipes.c
+++ b/os/oslib/src/chpipes.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/dox/rt.dox b/os/rt/dox/rt.dox
index 6f1ffb10e..598697478 100644
--- a/os/rt/dox/rt.dox
+++ b/os/rt/dox/rt.dox
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/ch.h b/os/rt/include/ch.h
index c0c26fcc3..12d26d367 100644
--- a/os/rt/include/ch.h
+++ b/os/rt/include/ch.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chalign.h b/os/rt/include/chalign.h
index ccc9568b8..ad13f1f4c 100644
--- a/os/rt/include/chalign.h
+++ b/os/rt/include/chalign.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chchecks.h b/os/rt/include/chchecks.h
index 5b03f3c3e..98a1feff0 100644
--- a/os/rt/include/chchecks.h
+++ b/os/rt/include/chchecks.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chcond.h b/os/rt/include/chcond.h
index a55ae1796..c0793bb00 100644
--- a/os/rt/include/chcond.h
+++ b/os/rt/include/chcond.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chdebug.h b/os/rt/include/chdebug.h
index 55a88d182..4a7e9d590 100644
--- a/os/rt/include/chdebug.h
+++ b/os/rt/include/chdebug.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chdynamic.h b/os/rt/include/chdynamic.h
index 6f44c407a..84c8904ec 100644
--- a/os/rt/include/chdynamic.h
+++ b/os/rt/include/chdynamic.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chearly.h b/os/rt/include/chearly.h
index d5d256807..edb6b6591 100644
--- a/os/rt/include/chearly.h
+++ b/os/rt/include/chearly.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chevents.h b/os/rt/include/chevents.h
index 028162657..b431f2737 100644
--- a/os/rt/include/chevents.h
+++ b/os/rt/include/chevents.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chlists.h b/os/rt/include/chlists.h
index 995c43c84..39e274da8 100644
--- a/os/rt/include/chlists.h
+++ b/os/rt/include/chlists.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chmsg.h b/os/rt/include/chmsg.h
index 114a6cfc4..342763435 100644
--- a/os/rt/include/chmsg.h
+++ b/os/rt/include/chmsg.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chmtx.h b/os/rt/include/chmtx.h
index da58e9928..6030d4317 100644
--- a/os/rt/include/chmtx.h
+++ b/os/rt/include/chmtx.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chobjects.h b/os/rt/include/chobjects.h
index dafbc8d7c..40f4f8ccf 100644
--- a/os/rt/include/chobjects.h
+++ b/os/rt/include/chobjects.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chport.h b/os/rt/include/chport.h
index 18f4a8e7c..5eacc4247 100644
--- a/os/rt/include/chport.h
+++ b/os/rt/include/chport.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chregistry.h b/os/rt/include/chregistry.h
index ef03c9f4c..1d0cd3143 100644
--- a/os/rt/include/chregistry.h
+++ b/os/rt/include/chregistry.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chrestrictions.h b/os/rt/include/chrestrictions.h
index 7c1840fb5..abb7eae05 100644
--- a/os/rt/include/chrestrictions.h
+++ b/os/rt/include/chrestrictions.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h
index 165da0a86..515cc7402 100644
--- a/os/rt/include/chschd.h
+++ b/os/rt/include/chschd.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chsem.h b/os/rt/include/chsem.h
index 7242f08ce..ddeedbcda 100644
--- a/os/rt/include/chsem.h
+++ b/os/rt/include/chsem.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chstats.h b/os/rt/include/chstats.h
index d269db774..1bd7c97e7 100644
--- a/os/rt/include/chstats.h
+++ b/os/rt/include/chstats.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chsys.h b/os/rt/include/chsys.h
index 74c8348af..f0b03306c 100644
--- a/os/rt/include/chsys.h
+++ b/os/rt/include/chsys.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h
index bcaac0c00..5a451f2a2 100644
--- a/os/rt/include/chthreads.h
+++ b/os/rt/include/chthreads.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chtime.h b/os/rt/include/chtime.h
index 1655760d8..3ed46993d 100644
--- a/os/rt/include/chtime.h
+++ b/os/rt/include/chtime.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chtm.h b/os/rt/include/chtm.h
index 04d12e265..8fbd0e016 100644
--- a/os/rt/include/chtm.h
+++ b/os/rt/include/chtm.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chtrace.h b/os/rt/include/chtrace.h
index 902f8bd48..2343885ae 100644
--- a/os/rt/include/chtrace.h
+++ b/os/rt/include/chtrace.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h
index fb2a6fa60..65abaf139 100644
--- a/os/rt/include/chvt.h
+++ b/os/rt/include/chvt.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chcond.c b/os/rt/src/chcond.c
index 50466a069..9378aa4fa 100644
--- a/os/rt/src/chcond.c
+++ b/os/rt/src/chcond.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chdebug.c b/os/rt/src/chdebug.c
index 5f815321d..5285804a9 100644
--- a/os/rt/src/chdebug.c
+++ b/os/rt/src/chdebug.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chdynamic.c b/os/rt/src/chdynamic.c
index 591938140..0368540bf 100644
--- a/os/rt/src/chdynamic.c
+++ b/os/rt/src/chdynamic.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chevents.c b/os/rt/src/chevents.c
index e3bbe5abf..81138ab1b 100644
--- a/os/rt/src/chevents.c
+++ b/os/rt/src/chevents.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chmsg.c b/os/rt/src/chmsg.c
index 92e6f7c38..a3e712428 100644
--- a/os/rt/src/chmsg.c
+++ b/os/rt/src/chmsg.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chmtx.c b/os/rt/src/chmtx.c
index 90f8d5709..5b993187a 100644
--- a/os/rt/src/chmtx.c
+++ b/os/rt/src/chmtx.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chregistry.c b/os/rt/src/chregistry.c
index ba12b8cf5..ccba0a1ef 100644
--- a/os/rt/src/chregistry.c
+++ b/os/rt/src/chregistry.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chschd.c b/os/rt/src/chschd.c
index 1e76eb015..a2dbb178d 100644
--- a/os/rt/src/chschd.c
+++ b/os/rt/src/chschd.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chsem.c b/os/rt/src/chsem.c
index 35ed5499a..a9b813518 100644
--- a/os/rt/src/chsem.c
+++ b/os/rt/src/chsem.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chstats.c b/os/rt/src/chstats.c
index cc18427b1..213ddca34 100644
--- a/os/rt/src/chstats.c
+++ b/os/rt/src/chstats.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c
index e58d1fdf8..2c29e44f8 100644
--- a/os/rt/src/chsys.c
+++ b/os/rt/src/chsys.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c
index 7ca8c6f91..be5f8feb4 100644
--- a/os/rt/src/chthreads.c
+++ b/os/rt/src/chthreads.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chtm.c b/os/rt/src/chtm.c
index 139717ed5..466d9ce20 100644
--- a/os/rt/src/chtm.c
+++ b/os/rt/src/chtm.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chtrace.c b/os/rt/src/chtrace.c
index 1ee11da8d..50260c605 100644
--- a/os/rt/src/chtrace.c
+++ b/os/rt/src/chtrace.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/src/chvt.c b/os/rt/src/chvt.c
index 24231deaf..85f49e514 100644
--- a/os/rt/src/chvt.c
+++ b/os/rt/src/chvt.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/templates/meta/module.c b/os/rt/templates/meta/module.c
index e88687d7a..285e21ecc 100644
--- a/os/rt/templates/meta/module.c
+++ b/os/rt/templates/meta/module.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/rt/templates/meta/module.h b/os/rt/templates/meta/module.h
index 0e120c415..e8a694487 100644
--- a/os/rt/templates/meta/module.h
+++ b/os/rt/templates/meta/module.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/common/sberr.h b/os/sb/common/sberr.h
index b827f7d51..a392206b8 100644
--- a/os/sb/common/sberr.h
+++ b/os/sb/common/sberr.h
@@ -1,97 +1,97 @@
-/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/**
- * @file sb/common/sberr.h
- * @brief ARMv7-M sandbox common macros and structures.
- *
- * @addtogroup ARM_SANDBOX_ERRORS
- * @{
- */
-
-#ifndef SBERR_H
-#define SBERR_H
-
-/*===========================================================================*/
-/* Module constants. */
-/*===========================================================================*/
-
-/**
- * @name Sandbox API error codes
- * @{
- */
-#define SB_ERR_NOERROR 0U
-#define SB_ERR_ENOENT ((uint32_t)(-2))
-#define SB_ERR_EFAULT ((uint32_t)(-14))
-#define SB_ERR_EBUSY ((uint32_t)(-16))
-#define SB_ERR_EINVAL ((uint32_t)(-22))
-#define SB_ERR_ESPIPE ((uint32_t)(-29))
-#define SB_ERR_EBADFD ((uint32_t)(-81))
-#define SB_ERR_ENOSYS ((uint32_t)(-88))
-
-#define SB_ERR_ERRORMASK 0xFFFFFF00U
-#define SB_ERR_ISERROR(x) (((uint32_t)(x) & SB_ERR_ERRORMASK) == SB_ERR_ERRORMASK)
-/** @} */
-
-/**
- * @name Posix-like function codes
- * @{
- */
-#define SB_POSIX_OPEN 1
-#define SB_POSIX_CLOSE 2
-#define SB_POSIX_READ 3
-#define SB_POSIX_WRITE 4
-#define SB_POSIX_LSEEK 5
-/** @} */
-
-/*===========================================================================*/
-/* Module pre-compile time settings. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Derived constants and error checks. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module data structures and types. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module macros. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* External declarations. */
-/*===========================================================================*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/*===========================================================================*/
-/* Module inline functions. */
-/*===========================================================================*/
-
-#endif /* SBERR_H */
-
-/** @} */
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * @file sb/common/sberr.h
+ * @brief ARMv7-M sandbox common macros and structures.
+ *
+ * @addtogroup ARM_SANDBOX_ERRORS
+ * @{
+ */
+
+#ifndef SBERR_H
+#define SBERR_H
+
+/*===========================================================================*/
+/* Module constants. */
+/*===========================================================================*/
+
+/**
+ * @name Sandbox API error codes
+ * @{
+ */
+#define SB_ERR_NOERROR 0U
+#define SB_ERR_ENOENT ((uint32_t)(-2))
+#define SB_ERR_EFAULT ((uint32_t)(-14))
+#define SB_ERR_EBUSY ((uint32_t)(-16))
+#define SB_ERR_EINVAL ((uint32_t)(-22))
+#define SB_ERR_ESPIPE ((uint32_t)(-29))
+#define SB_ERR_EBADFD ((uint32_t)(-81))
+#define SB_ERR_ENOSYS ((uint32_t)(-88))
+
+#define SB_ERR_ERRORMASK 0xFFFFFF00U
+#define SB_ERR_ISERROR(x) (((uint32_t)(x) & SB_ERR_ERRORMASK) == SB_ERR_ERRORMASK)
+/** @} */
+
+/**
+ * @name Posix-like function codes
+ * @{
+ */
+#define SB_POSIX_OPEN 1
+#define SB_POSIX_CLOSE 2
+#define SB_POSIX_READ 3
+#define SB_POSIX_WRITE 4
+#define SB_POSIX_LSEEK 5
+/** @} */
+
+/*===========================================================================*/
+/* Module pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module macros. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/*===========================================================================*/
+/* Module inline functions. */
+/*===========================================================================*/
+
+#endif /* SBERR_H */
+
+/** @} */
diff --git a/os/sb/host/compilers/GCC/sbexc.S b/os/sb/host/compilers/GCC/sbexc.S
index 3cccaf302..454041955 100644
--- a/os/sb/host/compilers/GCC/sbexc.S
+++ b/os/sb/host/compilers/GCC/sbexc.S
@@ -1,170 +1,170 @@
-/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/**
- * @file sb/sbexc.S
- * @brief Exception handlers for sandbox.
- *
- * @defgroup ARMV7M_SANDBOX_EXCEPTIONS SandBox Exception Vectors
- * @{
- */
-
-/*===========================================================================*/
-/* Module constants. */
-/*===========================================================================*/
-
-#define FPU 0xE000EF30
-
-/*===========================================================================*/
-/* Module pre-compile time settings. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Code section. */
-/*===========================================================================*/
-
-#if !defined(__DOXYGEN__)
-
- .syntax unified
- .cpu cortex-m3
- .thumb
-
- .text
-
- .align 2
- .thumb_func
- .global port_syscall
-port_syscall:
- ldr r3, =sb_syscalls
- ldr.w r3, [r3, r1, lsl #2]
- blx r3
- svc 0
-.zombies1: b .zombies1
-
- .align 2
- .thumb_func
- .global HardFault_Handler
-HardFault_Handler:
- tst.w lr, #8
- beq.n .normal_hf
- mrs r3, CONTROL
- tst.w r3, #1
- bne.w .exit_thd
-.normal_hf: ldr r3, =HardFault_Handler_SB
- bx r3
-
- .align 2
- .thumb_func
- .global MemManage_Handler
-MemManage_Handler:
- tst.w lr, #8
- beq.n .normal_mm
- mrs r3, CONTROL
- tst.w r3, #1
- bne.w .exit_thd
-.normal_mm: ldr r3, =MemManage_Handler_SB
- bx r3
-
- .align 2
- .thumb_func
- .global BusFault_Handler
-BusFault_Handler:
- tst.w lr, #8
- beq.n .normal_bf
- mrs r3, CONTROL
- tst.w r3, #1
- bne.w .exit_thd
-.normal_bf: ldr r3, =BusFault_Handler_SB
- bx r3
-
- .align 2
- .thumb_func
- .global UsageFault_Handler
-UsageFault_Handler:
- tst.w lr, #8
- beq.n .normal_uf
- mrs r3, CONTROL
- tst.w r3, #1
- bne.w .exit_thd
-.normal_uf: ldr r3, =UsageFault_Handler_SB
- bx r3
-
-/*
- * Common thread-exit handler on exception.
- * Makes the current exception return on chThdExit() with the PSR
- * value as exit message.
- */
-.exit_thd:
- mov.w r4, lr
-
- /* This thread is going to die so going back on
- S-PSP and working safely from there.*/
- bl port_get_s_psp
-#if CORTEX_USE_FPU
- sub.w r0, r0, #104
-#else
- sub.w r0, r0, #32
- msr PSP, r0
-#endif
-
- /* Forcing return on exit syscall code with PSR
- value as exit message.*/
- mrs r2, PSR
- str r2, [r0, #0]
- ldr r2, =.do_exit
- str r2, [r0, #24]
- ldr r2, =0x01000000
- str r2, [r0, #28]
-#if CORTEX_USE_FPU
- ldr r2, =FPU
- ldr r2, [r2, #12] /* FPDSCR*/
- str r2, [r0, #96] /* port_extctx.fpscr */
-#endif
-
- /* Back to privileged mode.*/
- mrs r3, CONTROL
- bic.w r3, #1
- msr CONTROL, r3
-
- /* Making sure there are no chained exceptions or interrupts
- in the way, we need to exit this one atomically.*/
- bl port_syslock_noinline
- bx r4
-
- /* Exception exit point.*/
-.do_exit:
- bl chThdExitS
-.zombies2: b .zombies2
-
- .align 2
- .thumb_func
- .weak HardFault_Handler_SB
- .weak MemManage_Handler_SB
- .weak BusFault_Handler_SB
- .weak UsageFault_Handler_SB
-HardFault_Handler_SB:
-MemManage_Handler_SB:
-BusFault_Handler_SB:
-UsageFault_Handler_SB:
- ldr r3, =_unhandled_exception
- bx r3
-
-#endif /* !defined(__DOXYGEN__) */
-
-/** @} */
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * @file sb/sbexc.S
+ * @brief Exception handlers for sandbox.
+ *
+ * @defgroup ARMV7M_SANDBOX_EXCEPTIONS SandBox Exception Vectors
+ * @{
+ */
+
+/*===========================================================================*/
+/* Module constants. */
+/*===========================================================================*/
+
+#define FPU 0xE000EF30
+
+/*===========================================================================*/
+/* Module pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Code section. */
+/*===========================================================================*/
+
+#if !defined(__DOXYGEN__)
+
+ .syntax unified
+ .cpu cortex-m3
+ .thumb
+
+ .text
+
+ .align 2
+ .thumb_func
+ .global port_syscall
+port_syscall:
+ ldr r3, =sb_syscalls
+ ldr.w r3, [r3, r1, lsl #2]
+ blx r3
+ svc 0
+.zombies1: b .zombies1
+
+ .align 2
+ .thumb_func
+ .global HardFault_Handler
+HardFault_Handler:
+ tst.w lr, #8
+ beq.n .normal_hf
+ mrs r3, CONTROL
+ tst.w r3, #1
+ bne.w .exit_thd
+.normal_hf: ldr r3, =HardFault_Handler_SB
+ bx r3
+
+ .align 2
+ .thumb_func
+ .global MemManage_Handler
+MemManage_Handler:
+ tst.w lr, #8
+ beq.n .normal_mm
+ mrs r3, CONTROL
+ tst.w r3, #1
+ bne.w .exit_thd
+.normal_mm: ldr r3, =MemManage_Handler_SB
+ bx r3
+
+ .align 2
+ .thumb_func
+ .global BusFault_Handler
+BusFault_Handler:
+ tst.w lr, #8
+ beq.n .normal_bf
+ mrs r3, CONTROL
+ tst.w r3, #1
+ bne.w .exit_thd
+.normal_bf: ldr r3, =BusFault_Handler_SB
+ bx r3
+
+ .align 2
+ .thumb_func
+ .global UsageFault_Handler
+UsageFault_Handler:
+ tst.w lr, #8
+ beq.n .normal_uf
+ mrs r3, CONTROL
+ tst.w r3, #1
+ bne.w .exit_thd
+.normal_uf: ldr r3, =UsageFault_Handler_SB
+ bx r3
+
+/*
+ * Common thread-exit handler on exception.
+ * Makes the current exception return on chThdExit() with the PSR
+ * value as exit message.
+ */
+.exit_thd:
+ mov.w r4, lr
+
+ /* This thread is going to die so going back on
+ S-PSP and working safely from there.*/
+ bl port_get_s_psp
+#if CORTEX_USE_FPU
+ sub.w r0, r0, #104
+#else
+ sub.w r0, r0, #32
+ msr PSP, r0
+#endif
+
+ /* Forcing return on exit syscall code with PSR
+ value as exit message.*/
+ mrs r2, PSR
+ str r2, [r0, #0]
+ ldr r2, =.do_exit
+ str r2, [r0, #24]
+ ldr r2, =0x01000000
+ str r2, [r0, #28]
+#if CORTEX_USE_FPU
+ ldr r2, =FPU
+ ldr r2, [r2, #12] /* FPDSCR*/
+ str r2, [r0, #96] /* port_extctx.fpscr */
+#endif
+
+ /* Back to privileged mode.*/
+ mrs r3, CONTROL
+ bic.w r3, #1
+ msr CONTROL, r3
+
+ /* Making sure there are no chained exceptions or interrupts
+ in the way, we need to exit this one atomically.*/
+ bl port_syslock_noinline
+ bx r4
+
+ /* Exception exit point.*/
+.do_exit:
+ bl chThdExitS
+.zombies2: b .zombies2
+
+ .align 2
+ .thumb_func
+ .weak HardFault_Handler_SB
+ .weak MemManage_Handler_SB
+ .weak BusFault_Handler_SB
+ .weak UsageFault_Handler_SB
+HardFault_Handler_SB:
+MemManage_Handler_SB:
+BusFault_Handler_SB:
+UsageFault_Handler_SB:
+ ldr r3, =_unhandled_exception
+ bx r3
+
+#endif /* !defined(__DOXYGEN__) */
+
+/** @} */
diff --git a/os/sb/host/sb.h b/os/sb/host/sb.h
index 1addc9b92..03ada425d 100644
--- a/os/sb/host/sb.h
+++ b/os/sb/host/sb.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/host/sbapi.c b/os/sb/host/sbapi.c
index b52d16b7c..e36ce54a7 100644
--- a/os/sb/host/sbapi.c
+++ b/os/sb/host/sbapi.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/host/sbapi.h b/os/sb/host/sbapi.h
index e2a08d789..2d1525c37 100644
--- a/os/sb/host/sbapi.h
+++ b/os/sb/host/sbapi.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/host/sbhost.c b/os/sb/host/sbhost.c
index 53eeebacc..af6d3b038 100644
--- a/os/sb/host/sbhost.c
+++ b/os/sb/host/sbhost.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/host/sbhost.h b/os/sb/host/sbhost.h
index 5ce4832ba..65c5435a2 100644
--- a/os/sb/host/sbhost.h
+++ b/os/sb/host/sbhost.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/host/sbposix.c b/os/sb/host/sbposix.c
index b2f68398a..6a855d2e0 100644
--- a/os/sb/host/sbposix.c
+++ b/os/sb/host/sbposix.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/host/sbposix.h b/os/sb/host/sbposix.h
index 99693632c..1409d1da8 100644
--- a/os/sb/host/sbposix.h
+++ b/os/sb/host/sbposix.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/user/sbuser.c b/os/sb/user/sbuser.c
index 92838d5ac..2515b8da6 100644
--- a/os/sb/user/sbuser.c
+++ b/os/sb/user/sbuser.c
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/sb/user/sbuser.h b/os/sb/user/sbuser.h
index ed0be6ff5..4980c33ae 100644
--- a/os/sb/user/sbuser.h
+++ b/os/sb/user/sbuser.h
@@ -1,12 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation version 3 of the License.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os/se/include/se.h b/os/se/include/se.h
index 15b473a73..48d00bfc9 100644
--- a/os/se/include/se.h
+++ b/os/se/include/se.h
@@ -1,112 +1,112 @@
-/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/**
- * @file seregs.h
- * @brief Safety Extensions macros and structures.
- *
- * @addtogroup SE
- * @{
- */
-
-#ifndef SE_H
-#define SE_H
-
-/*===========================================================================*/
-/* Module constants. */
-/*===========================================================================*/
-
-/**
- * @brief ChibiOS/SE identification macro.
- */
-#define __CHIBIOS_SE__
-
-/**
- * @brief Stable release flag.
- */
-#define CH_SE_STABLE 0
-
-/**
- * @name ChibiOS/SE version identification
- * @{
- */
-/**
- * @brief Safety Extensions version string.
- */
-#define CH_SE_VERSION "1.0.0"
-
-/**
- * @brief Safety Extensions version major number.
- */
-#define CH_SE_MAJOR 1
-
-/**
- * @brief Safety Extensions version minor number.
- */
-#define CH_SE_MINOR 0
-
-/**
- * @brief Safety Extensions version patch number.
- */
-#define CH_SE_PATCH 0
-/** @} */
-
-/*===========================================================================*/
-/* Module pre-compile time settings. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Derived constants and error checks. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module data structures and types. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module macros. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* External declarations. */
-/*===========================================================================*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/*===========================================================================*/
-/* Module inline functions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Late inclusions. */
-/*===========================================================================*/
-
-/* Safety Extensions headers.*/
-#include "seregs.h"
-#include "seloops.h"
-
-#endif /* SE_H */
-
-/** @} */
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * @file seregs.h
+ * @brief Safety Extensions macros and structures.
+ *
+ * @addtogroup SE
+ * @{
+ */
+
+#ifndef SE_H
+#define SE_H
+
+/*===========================================================================*/
+/* Module constants. */
+/*===========================================================================*/
+
+/**
+ * @brief ChibiOS/SE identification macro.
+ */
+#define __CHIBIOS_SE__
+
+/**
+ * @brief Stable release flag.
+ */
+#define CH_SE_STABLE 0
+
+/**
+ * @name ChibiOS/SE version identification
+ * @{
+ */
+/**
+ * @brief Safety Extensions version string.
+ */
+#define CH_SE_VERSION "1.0.0"
+
+/**
+ * @brief Safety Extensions version major number.
+ */
+#define CH_SE_MAJOR 1
+
+/**
+ * @brief Safety Extensions version minor number.
+ */
+#define CH_SE_MINOR 0
+
+/**
+ * @brief Safety Extensions version patch number.
+ */
+#define CH_SE_PATCH 0
+/** @} */
+
+/*===========================================================================*/
+/* Module pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module macros. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/*===========================================================================*/
+/* Module inline functions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Late inclusions. */
+/*===========================================================================*/
+
+/* Safety Extensions headers.*/
+#include "seregs.h"
+#include "seloops.h"
+
+#endif /* SE_H */
+
+/** @} */
diff --git a/os/se/include/seloops.h b/os/se/include/seloops.h
index 532c565cc..9d2d76f13 100644
--- a/os/se/include/seloops.h
+++ b/os/se/include/seloops.h
@@ -1,92 +1,92 @@
-/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/**
- * @file seloops.h
- * @brief Safety Extensions Loops module macros and structures.
- *
- * @addtogroup SELOOPS
- * @{
- */
-
-#ifndef SELOOPS_H
-#define SELOOPS_H
-
-/*===========================================================================*/
-/* Module constants. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module pre-compile time settings. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Derived constants and error checks. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module data structures and types. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module macros. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* External declarations. */
-/*===========================================================================*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- bool seRegWaitAllSet8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp);
- bool seRegWaitAllSet16X(volatile uint16_t *p, uint16_t mask,
- rtcnt_t tmo, uint16_t *valp);
- bool seRegWaitAllSet32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp);
- bool seRegWaitAnySet8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp);
- bool seRegWaitAnySet16X(volatile uint16_t *p, uint16_t mask,
- rtcnt_t tmo, uint16_t *valp);
- bool seRegWaitAnySet32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp);
- bool seRegWaitAllClear8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp);
- bool seRegWaitAllClear16X(volatile uint16_t *p, uint32_t mask,
- rtcnt_t tmo, uint16_t *valp);
- bool seRegWaitAllClear32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp);
- bool seRegWaitAnyClear8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp);
- bool seRegWaitAnyClear16X(volatile uint16_t *p, uint16_t mask,
- rtcnt_t tmo, uint16_t *valp);
- bool seRegWaitAnyClear32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp);
-#ifdef __cplusplus
-}
-#endif
-
-/*===========================================================================*/
-/* Module inline functions. */
-/*===========================================================================*/
-
-#endif /* SELOOPS_H */
-
-/** @} */
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * @file seloops.h
+ * @brief Safety Extensions Loops module macros and structures.
+ *
+ * @addtogroup SELOOPS
+ * @{
+ */
+
+#ifndef SELOOPS_H
+#define SELOOPS_H
+
+/*===========================================================================*/
+/* Module constants. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module macros. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ bool seRegWaitAllSet8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp);
+ bool seRegWaitAllSet16X(volatile uint16_t *p, uint16_t mask,
+ rtcnt_t tmo, uint16_t *valp);
+ bool seRegWaitAllSet32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp);
+ bool seRegWaitAnySet8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp);
+ bool seRegWaitAnySet16X(volatile uint16_t *p, uint16_t mask,
+ rtcnt_t tmo, uint16_t *valp);
+ bool seRegWaitAnySet32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp);
+ bool seRegWaitAllClear8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp);
+ bool seRegWaitAllClear16X(volatile uint16_t *p, uint32_t mask,
+ rtcnt_t tmo, uint16_t *valp);
+ bool seRegWaitAllClear32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp);
+ bool seRegWaitAnyClear8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp);
+ bool seRegWaitAnyClear16X(volatile uint16_t *p, uint16_t mask,
+ rtcnt_t tmo, uint16_t *valp);
+ bool seRegWaitAnyClear32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp);
+#ifdef __cplusplus
+}
+#endif
+
+/*===========================================================================*/
+/* Module inline functions. */
+/*===========================================================================*/
+
+#endif /* SELOOPS_H */
+
+/** @} */
diff --git a/os/se/include/seregs.h b/os/se/include/seregs.h
index 9257a094e..082a1c768 100644
--- a/os/se/include/seregs.h
+++ b/os/se/include/seregs.h
@@ -1,175 +1,175 @@
-/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/**
- * @file seregs.h
- * @brief Safety Extensions Registers module macros and structures.
- *
- * @addtogroup SEREGS
- * @{
- */
-
-#ifndef SEREGS_H
-#define SEREGS_H
-
-/*===========================================================================*/
-/* Module constants. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module pre-compile time settings. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Derived constants and error checks. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module data structures and types. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module macros. */
-/*===========================================================================*/
-
-/**
- * @name Function variants
- * @{
- */
-#define seRegSet8X(p, s, v) seRegModify8X(p, s, (uint8_t)0, v)
-#define seRegSet16X(p, s, v) seRegModify16X(p, s, (uint16_t)0, v)
-#define seRegSet32X(p, s, v) seRegModify32X(p, s, (uint32_t)0, v)
-#define seRegClear8X(p, c, v) seRegModify8X(p, (uint8_t)0, c, v)
-#define seRegClear16X(p, c, v) seRegModify16X(p, (uint16_t)0, c, v)
-#define seRegClear32X(p, c, v) seRegModify32X(p, (uint32_t)0, c, v)
-/** @} */
-
-/*===========================================================================*/
-/* External declarations. */
-/*===========================================================================*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/*===========================================================================*/
-/* Module inline functions. */
-/*===========================================================================*/
-
-/**
- * @brief Modifies a 8 bits register.
- * @note This code relies on compiler optimizations, the constant
- * operations that cause no change to the final value are
- * optimized out.
- *
- * @param[in] p address of the register
- * @param[in] setmask mask of bits to be set
- * @param[in] clrmask mask of bits to be cleared
- * @param[in] verify comparison flag
- * @return The check result.
- * @retval false if the comparison succeeded.
- * @retval true if the comparison failed.
- *
- * @xclass
- */
-static inline bool seRegModify8X(volatile uint8_t *p,
- uint8_t setmask,
- uint8_t clrmask,
- bool verify) {
- uint8_t v = *p;
- v |= setmask;
- v &= ~clrmask;
- *p = v;
-
- if (verify) {
- return (*p & (uint8_t)(setmask | clrmask)) != setmask;
- }
- return false;
-}
-
-/**
- * @brief Modifies a 16 bits register.
- * @note This code relies on compiler optimizations, the constant
- * operations that cause no change to the final value are
- * optimized out.
- *
- * @param[in] p address of the register
- * @param[in] setmask mask of bits to be set
- * @param[in] clrmask mask of bits to be cleared
- * @param[in] verify comparison flag
- * @return The check result.
- * @retval false if the comparison succeeded.
- * @retval true if the comparison failed.
- *
- * @xclass
- */
-static inline bool seRegModify16X(volatile uint16_t *p,
- uint16_t setmask,
- uint16_t clrmask,
- bool verify) {
- uint16_t v = *p;
- v |= setmask;
- v &= ~clrmask;
- *p = v;
-
- if (verify) {
- return (*p & (uint16_t)(setmask | clrmask)) != setmask;
- }
- return false;
-}
-
-/**
- * @brief Modifies a 32 bits register.
- * @note This code relies on compiler optimizations, the constant
- * operations that cause no change to the final value are
- * optimized out.
- *
- * @param[in] p address of the register
- * @param[in] setmask mask of bits to be set
- * @param[in] clrmask mask of bits to be cleared
- * @param[in] verify comparison flag
- * @return The check result.
- * @retval false if the comparison succeeded.
- * @retval true if the comparison failed.
- *
- * @xclass
- */
-static inline bool seRegModify32X(volatile uint32_t *p,
- uint32_t setmask,
- uint32_t clrmask,
- bool verify) {
- uint32_t v = *p;
- v |= setmask;
- v &= ~clrmask;
- *p = v;
-
- if (verify) {
- return (*p & (uint32_t)(setmask | clrmask)) != setmask;
- }
-
- return false;
-}
-
-#endif /* SEREGS_H */
-
-/** @} */
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * @file seregs.h
+ * @brief Safety Extensions Registers module macros and structures.
+ *
+ * @addtogroup SEREGS
+ * @{
+ */
+
+#ifndef SEREGS_H
+#define SEREGS_H
+
+/*===========================================================================*/
+/* Module constants. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module macros. */
+/*===========================================================================*/
+
+/**
+ * @name Function variants
+ * @{
+ */
+#define seRegSet8X(p, s, v) seRegModify8X(p, s, (uint8_t)0, v)
+#define seRegSet16X(p, s, v) seRegModify16X(p, s, (uint16_t)0, v)
+#define seRegSet32X(p, s, v) seRegModify32X(p, s, (uint32_t)0, v)
+#define seRegClear8X(p, c, v) seRegModify8X(p, (uint8_t)0, c, v)
+#define seRegClear16X(p, c, v) seRegModify16X(p, (uint16_t)0, c, v)
+#define seRegClear32X(p, c, v) seRegModify32X(p, (uint32_t)0, c, v)
+/** @} */
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/*===========================================================================*/
+/* Module inline functions. */
+/*===========================================================================*/
+
+/**
+ * @brief Modifies a 8 bits register.
+ * @note This code relies on compiler optimizations, the constant
+ * operations that cause no change to the final value are
+ * optimized out.
+ *
+ * @param[in] p address of the register
+ * @param[in] setmask mask of bits to be set
+ * @param[in] clrmask mask of bits to be cleared
+ * @param[in] verify comparison flag
+ * @return The check result.
+ * @retval false if the comparison succeeded.
+ * @retval true if the comparison failed.
+ *
+ * @xclass
+ */
+static inline bool seRegModify8X(volatile uint8_t *p,
+ uint8_t setmask,
+ uint8_t clrmask,
+ bool verify) {
+ uint8_t v = *p;
+ v |= setmask;
+ v &= ~clrmask;
+ *p = v;
+
+ if (verify) {
+ return (*p & (uint8_t)(setmask | clrmask)) != setmask;
+ }
+ return false;
+}
+
+/**
+ * @brief Modifies a 16 bits register.
+ * @note This code relies on compiler optimizations, the constant
+ * operations that cause no change to the final value are
+ * optimized out.
+ *
+ * @param[in] p address of the register
+ * @param[in] setmask mask of bits to be set
+ * @param[in] clrmask mask of bits to be cleared
+ * @param[in] verify comparison flag
+ * @return The check result.
+ * @retval false if the comparison succeeded.
+ * @retval true if the comparison failed.
+ *
+ * @xclass
+ */
+static inline bool seRegModify16X(volatile uint16_t *p,
+ uint16_t setmask,
+ uint16_t clrmask,
+ bool verify) {
+ uint16_t v = *p;
+ v |= setmask;
+ v &= ~clrmask;
+ *p = v;
+
+ if (verify) {
+ return (*p & (uint16_t)(setmask | clrmask)) != setmask;
+ }
+ return false;
+}
+
+/**
+ * @brief Modifies a 32 bits register.
+ * @note This code relies on compiler optimizations, the constant
+ * operations that cause no change to the final value are
+ * optimized out.
+ *
+ * @param[in] p address of the register
+ * @param[in] setmask mask of bits to be set
+ * @param[in] clrmask mask of bits to be cleared
+ * @param[in] verify comparison flag
+ * @return The check result.
+ * @retval false if the comparison succeeded.
+ * @retval true if the comparison failed.
+ *
+ * @xclass
+ */
+static inline bool seRegModify32X(volatile uint32_t *p,
+ uint32_t setmask,
+ uint32_t clrmask,
+ bool verify) {
+ uint32_t v = *p;
+ v |= setmask;
+ v &= ~clrmask;
+ *p = v;
+
+ if (verify) {
+ return (*p & (uint32_t)(setmask | clrmask)) != setmask;
+ }
+
+ return false;
+}
+
+#endif /* SEREGS_H */
+
+/** @} */
diff --git a/os/se/src/seloops.c b/os/se/src/seloops.c
index 52660ede3..32fae360a 100644
--- a/os/se/src/seloops.c
+++ b/os/se/src/seloops.c
@@ -1,534 +1,534 @@
-/*
- ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/**
- * @file seloops.c
- * @brief Safety Extensions Loops module code.
- *
- * @addtogroup SELOOPS
- * @{
- */
-
-#include "ch.h"
-
-/*===========================================================================*/
-/* Module local definitions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module exported variables. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module local types. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module local variables. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module local functions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Module exported functions. */
-/*===========================================================================*/
-
-/**
- * @brief Wait for all specified bits to be set or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAllSet8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint8_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) == mask) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for all specified bits to be set or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAllSet16X(volatile uint16_t *p, uint16_t mask,
- rtcnt_t tmo, uint16_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint16_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) == mask) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for all specified bits to be set or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAllSet32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint32_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) == mask) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for any of specified bits to be set or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAnySet8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint8_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) != (uint8_t)0) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for any of specified bits to be set or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAnySet16X(volatile uint16_t *p, uint16_t mask,
- rtcnt_t tmo, uint16_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint16_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) != (uint16_t)0) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for any of specified bits to be set or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAnySet32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint32_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) != (uint32_t)0) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for all specified bits to be cleared or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAllClear8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint8_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) == (uint8_t)0) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for all specified bits to be cleared or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAllClear16X(volatile uint16_t *p, uint32_t mask,
- rtcnt_t tmo, uint16_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint16_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) == (uint16_t)0) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for all specified bits to be cleared or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAllClear32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint32_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) == (uint32_t)0) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for any of specified bits to be cleared or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAnyClear8X(volatile uint8_t *p, uint8_t mask,
- rtcnt_t tmo, uint8_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint8_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) != mask) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for any of specified bits to be cleared or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAnyClear16X(volatile uint16_t *p, uint16_t mask,
- rtcnt_t tmo, uint16_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint16_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) != mask) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/**
- * @brief Wait for any of specified bits to be cleared or a timeout.
- *
- * @param[in] p address of the register
- * @param[in] mask mask of bits to be checked
- * @param[in] tmo timeout in counter cycles
- * @param[in] valp pointer to where to store the last read value
- * or @p NULL
- * @return The final result.
- * @retval false if the condition has been verified.
- * @retval true if a timeout occurred.
- *
- * @xclass
- */
-bool seRegWaitAnyClear32X(volatile uint32_t *p, uint32_t mask,
- rtcnt_t tmo, uint32_t *valp) {
- rtcnt_t start, end;
-
- /* Time window for the operation to complete.*/
- start = chSysGetRealtimeCounterX();
- end = start + tmo;
-
- /* Testing the condition continuously until it becomes true or the
- timeout expires, it is done at least once.*/
- do {
- /* Getting register value and storing it outside if required.*/
- uint32_t v = *p;
- if (valp != NULL) {
- *valp = v;
- }
-
- /* Condition check and end of the loop if met.*/
- if ((v & mask) != mask) {
- return false;
- }
- } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
-
- return true;
-}
-
-/** @} */
+/*
+ ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
+ 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation version 3 of the License.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * @file seloops.c
+ * @brief Safety Extensions Loops module code.
+ *
+ * @addtogroup SELOOPS
+ * @{
+ */
+
+#include "ch.h"
+
+/*===========================================================================*/
+/* Module local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module local types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module local variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module local functions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module exported functions. */
+/*===========================================================================*/
+
+/**
+ * @brief Wait for all specified bits to be set or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAllSet8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint8_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) == mask) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for all specified bits to be set or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAllSet16X(volatile uint16_t *p, uint16_t mask,
+ rtcnt_t tmo, uint16_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint16_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) == mask) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for all specified bits to be set or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAllSet32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint32_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) == mask) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for any of specified bits to be set or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAnySet8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint8_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) != (uint8_t)0) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for any of specified bits to be set or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAnySet16X(volatile uint16_t *p, uint16_t mask,
+ rtcnt_t tmo, uint16_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint16_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) != (uint16_t)0) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for any of specified bits to be set or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAnySet32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint32_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) != (uint32_t)0) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for all specified bits to be cleared or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAllClear8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint8_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) == (uint8_t)0) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for all specified bits to be cleared or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAllClear16X(volatile uint16_t *p, uint32_t mask,
+ rtcnt_t tmo, uint16_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint16_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) == (uint16_t)0) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for all specified bits to be cleared or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAllClear32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint32_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) == (uint32_t)0) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for any of specified bits to be cleared or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAnyClear8X(volatile uint8_t *p, uint8_t mask,
+ rtcnt_t tmo, uint8_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint8_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) != mask) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for any of specified bits to be cleared or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAnyClear16X(volatile uint16_t *p, uint16_t mask,
+ rtcnt_t tmo, uint16_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint16_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) != mask) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/**
+ * @brief Wait for any of specified bits to be cleared or a timeout.
+ *
+ * @param[in] p address of the register
+ * @param[in] mask mask of bits to be checked
+ * @param[in] tmo timeout in counter cycles
+ * @param[in] valp pointer to where to store the last read value
+ * or @p NULL
+ * @return The final result.
+ * @retval false if the condition has been verified.
+ * @retval true if a timeout occurred.
+ *
+ * @xclass
+ */
+bool seRegWaitAnyClear32X(volatile uint32_t *p, uint32_t mask,
+ rtcnt_t tmo, uint32_t *valp) {
+ rtcnt_t start, end;
+
+ /* Time window for the operation to complete.*/
+ start = chSysGetRealtimeCounterX();
+ end = start + tmo;
+
+ /* Testing the condition continuously until it becomes true or the
+ timeout expires, it is done at least once.*/
+ do {
+ /* Getting register value and storing it outside if required.*/
+ uint32_t v = *p;
+ if (valp != NULL) {
+ *valp = v;
+ }
+
+ /* Condition check and end of the loop if met.*/
+ if ((v & mask) != mask) {
+ return false;
+ }
+ } while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end));
+
+ return true;
+}
+
+/** @} */