Merge pull request #215 from ChibiOS/update

Fixes for 20.3.x
This commit is contained in:
Fabien Poussin 2020-04-08 21:13:01 +02:00 committed by GitHub
commit 1627dfa5af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
206 changed files with 76022 additions and 66669 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -108,12 +108,12 @@ include $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/mk/startup_ms
include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR5969/board.mk include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR5969/board.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk
include $(CHIBIOS)/os/hal/osal/nil/osal.mk include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional). # RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk
# Other files (optional). # Other files (optional).
include $(CHIBIOS)/test/nil/test.mk include $(CHIBIOS)/test/nil/nil_test.mk
# Define linker script file here # Define linker script file here
LDSCRIPT = $(STARTUPLD)/msp430fr5969.ld LDSCRIPT = $(STARTUPLD)/msp430fr5969.ld

View File

@ -1,275 +1,479 @@
/* /*
ChibiOS - Copyright (C) 2016 Andrew Wygle aka awygle ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/** /**
* @file nilconf.h * @file nil/templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it * @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings. * contains the application specific kernel settings.
* *
* @addtogroup config * @addtogroup NIL_CONFIG
* @details Kernel related settings and hooks. * @details Kernel related settings and hooks.
* @{ * @{
*/ */
#ifndef CHCONF_H #ifndef CHCONF_H
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_NIL_CONF_ #define _CHIBIOS_NIL_CONF_
#define _CHIBIOS_NIL_CONF_VER_5_0_ #define _CHIBIOS_NIL_CONF_VER_4_0_
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @name Kernel parameters and options * @name Kernel parameters and options
* @{ * @{
*/ */
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Number of user threads in the application. * @brief Maximum number of user threads in the application.
* @note This number is not inclusive of the idle thread which is * @note This number is not inclusive of the idle thread which is
* Implicitly handled. * implicitly handled.
*/ * @note Set this value to be exactly equal to the number of threads you
#define CH_CFG_NUM_THREADS 2 * will use or you would be wasting RAM and cycles.
* @note This values also defines the number of available priorities
/** @} */ * (0..CH_CFG_MAX_THREADS-1).
*/
/*===========================================================================*/ #if !defined(CH_CFG_MAX_THREADS)
/** #define CH_CFG_MAX_THREADS 8
* @name System timer settings #endif
* @{
*/ /**
/*===========================================================================*/ * @brief Auto starts threads when @p chSysInit() is invoked.
*/
/** #if !defined(CH_CFG_AUTOSTART_THREADS)
* @brief System time counter resolution. #define CH_CFG_AUTOSTART_THREADS TRUE
* @note Allowed values are 16 or 32 bits. #endif
*/
#define CH_CFG_ST_RESOLUTION 16 /** @} */
/** /*===========================================================================*/
* @brief System tick frequency. /**
* @note This value together with the @p CH_CFG_ST_RESOLUTION * @name System timer settings
* option defines the maximum amount of time allowed for * @{
* timeouts. */
*/ /*===========================================================================*/
#define CH_CFG_ST_FREQUENCY 1000
/**
/** * @brief System time counter resolution.
* @brief Time delta constant for the tick-less mode. * @note Allowed values are 16 or 32 bits.
* @note If this value is zero then the system uses the classic */
* periodic tick. This value represents the minimum number #if !defined(CH_CFG_ST_RESOLUTION)
* of ticks that is safe to specify in a timeout directive. #define CH_CFG_ST_RESOLUTION 16
* The value one is not valid, timeouts are rounded up to #endif
* this value.
*/ /**
#define CH_CFG_ST_TIMEDELTA 0 * @brief System tick frequency.
* @note This value together with the @p CH_CFG_ST_RESOLUTION
/** @} */ * option defines the maximum amount of time allowed for
* timeouts.
/*===========================================================================*/ */
/** #if !defined(CH_CFG_ST_FREQUENCY)
* @name Subsystem options #define CH_CFG_ST_FREQUENCY 1000
* @{ #endif
*/
/*===========================================================================*/ /**
* @brief Time delta constant for the tick-less mode.
/** * @note If this value is zero then the system uses the classic
* @brief Semaphores APIs. * periodic tick. This value represents the minimum number
* @details If enabled then the Semaphores APIs are included in the kernel. * of ticks that is safe to specify in a timeout directive.
* * The value one is not valid, timeouts are rounded up to
* @note The default is @p TRUE. * this value.
*/ */
#define CH_CFG_USE_SEMAPHORES TRUE #if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
/** #endif
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel. /** @} */
*
* @note Feature not currently implemented. /*===========================================================================*/
* @note The default is @p FALSE. /**
*/ * @name Subsystem options
#define CH_CFG_USE_MUTEXES FALSE * @{
*/
/** /*===========================================================================*/
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel. /**
* * @brief Threads synchronization APIs.
* @note The default is @p TRUE. * @details If enabled then the @p chThdWait() function is included in
*/ * the kernel.
#define CH_CFG_USE_EVENTS TRUE *
* @note The default is @p TRUE.
/** */
* @brief Mailboxes APIs. #if !defined(CH_CFG_USE_WAITEXIT)
* @details If enabled then the asynchronous messages (mailboxes) APIs are #define CH_CFG_USE_WAITEXIT TRUE
* included in the kernel. #endif
*
* @note The default is @p TRUE. /**
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @brief Semaphores APIs.
*/ * @details If enabled then the Semaphores APIs are included in the kernel.
#define CH_CFG_USE_MAILBOXES TRUE *
* @note The default is @p TRUE.
/** */
* @brief Core Memory Manager APIs. #if !defined(CH_CFG_USE_SEMAPHORES)
* @details If enabled then the core memory manager APIs are included #define CH_CFG_USE_SEMAPHORES TRUE
* in the kernel. #endif
*
* @note The default is @p TRUE. /**
*/ * @brief Mutexes APIs.
#define CH_CFG_USE_MEMCORE TRUE * @details If enabled then the mutexes APIs are included in the kernel.
*
/** * @note Feature not currently implemented.
* @brief Heap Allocator APIs. * @note The default is @p FALSE.
* @details If enabled then the memory heap allocator APIs are included */
* in the kernel. #if !defined(CH_CFG_USE_MUTEXES)
* #define CH_CFG_USE_MUTEXES FALSE
* @note The default is @p TRUE. #endif
*/
#define CH_CFG_USE_HEAP TRUE /**
* @brief Events Flags APIs.
/** * @details If enabled then the event flags APIs are included in the kernel.
* @brief Memory Pools Allocator APIs. *
* @details If enabled then the memory pools allocator APIs are included * @note The default is @p TRUE.
* in the kernel. */
* #if !defined(CH_CFG_USE_EVENTS)
* @note The default is @p TRUE. #define CH_CFG_USE_EVENTS TRUE
*/ #endif
#define CH_CFG_USE_MEMPOOLS TRUE
/**
/** * @brief Synchronous Messages APIs.
* @brief Managed RAM size. * @details If enabled then the synchronous messages APIs are included
* @details Size of the RAM area to be managed by the OS. If set to zero * in the kernel.
* then the whole available RAM is used. The core memory is made *
* available to the heap allocator and/or can be used directly through * @note The default is @p TRUE.
* the simplified core memory allocator. */
* #if !defined(CH_CFG_USE_MESSAGES)
* @note In order to let the OS manage the whole RAM the linker script must #define CH_CFG_USE_MESSAGES TRUE
* provide the @p __heap_base__ and @p __heap_end__ symbols. #endif
* @note Requires @p CH_CFG_USE_MEMCORE.
*/ /** @} */
#define CH_CFG_MEMCORE_SIZE 0
/*===========================================================================*/
/** @} */ /**
* @name OSLIB options
/*===========================================================================*/ * @{
/** */
* @name Debug options /*===========================================================================*/
* @{
*/ /**
/*===========================================================================*/ * @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
/** * included in the kernel.
* @brief Debug option, kernel statistics. *
* * @note The default is @p TRUE.
* @note Feature not currently implemented. * @note Requires @p CH_CFG_USE_SEMAPHORES.
* @note The default is @p FALSE. */
*/ #if !defined(CH_CFG_USE_MAILBOXES)
#define CH_DBG_STATISTICS FALSE #define CH_CFG_USE_MAILBOXES TRUE
#endif
/**
* @brief Debug option, system state check. /**
* * @brief Core Memory Manager APIs.
* @note The default is @p FALSE. * @details If enabled then the core memory manager APIs are included
*/ * in the kernel.
#define CH_DBG_SYSTEM_STATE_CHECK FALSE *
* @note The default is @p TRUE.
/** */
* @brief Debug option, parameters checks. #if !defined(CH_CFG_USE_MEMCORE)
* #define CH_CFG_USE_MEMCORE TRUE
* @note The default is @p FALSE. #endif
*/
#define CH_DBG_ENABLE_CHECKS FALSE /**
* @brief Managed RAM size.
/** * @details Size of the RAM area to be managed by the OS. If set to zero
* @brief System assertions. * then the whole available RAM is used. The core memory is made
* * available to the heap allocator and/or can be used directly through
* @note The default is @p FALSE. * the simplified core memory allocator.
*/ *
#define CH_DBG_ENABLE_ASSERTS FALSE * @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
/** * @note Requires @p CH_CFG_USE_MEMCORE.
* @brief Stack check. */
* #if !defined(CH_CFG_MEMCORE_SIZE)
*@note The default is @p FALSE. #define CH_CFG_MEMCORE_SIZE 0
*/ #endif
#define CH_DBG_ENABLE_STACK_CHECK TRUE
/**
/** @} */ * @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
/*===========================================================================*/ * in the kernel.
/** *
* @name Kernel hooks * @note The default is @p TRUE.
* @{ */
*/ #if !defined(CH_CFG_USE_HEAP)
/*===========================================================================*/ #define CH_CFG_USE_HEAP TRUE
#endif
/**
* @brief System initialization hook. /**
*/ * @brief Memory Pools Allocator APIs.
#if !defined(CH_CFG_SYSTEM_INIT_HOOK) || defined(__DOXYGEN__) * @details If enabled then the memory pools allocator APIs are included
#define CH_CFG_SYSTEM_INIT_HOOK() { \ * in the kernel.
} *
#endif * @note The default is @p TRUE.
*/
/** #if !defined(CH_CFG_USE_MEMPOOLS)
* @brief Threads descriptor structure extension. #define CH_CFG_USE_MEMPOOLS TRUE
* @details User fields added to the end of the @p thread_t structure. #endif
*/
#define CH_CFG_THREAD_EXT_FIELDS \ /**
/* Add threads custom fields here.*/ * @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included
/** * in the kernel.
* @brief Threads initialization hook. *
*/ * @note The default is @p TRUE.
#define CH_CFG_THREAD_EXT_INIT_HOOK(tr) { \ */
/* Add custom threads initialization code here.*/ \ #if !defined(CH_CFG_USE_OBJ_FIFOS)
} #define CH_CFG_USE_OBJ_FIFOS TRUE
#endif
/**
* @brief Idle thread enter hook. /**
* @note This hook is invoked within a critical zone, no OS functions * @brief Pipes APIs.
* should be invoked from here. * @details If enabled then the pipes APIs are included
* @note This macro can be used to activate a power saving mode. * in the kernel.
*/ *
#define CH_CFG_IDLE_ENTER_HOOK() { \ * @note The default is @p TRUE.
} */
#if !defined(CH_CFG_USE_PIPES)
/** #define CH_CFG_USE_PIPES TRUE
* @brief Idle thread leave hook. #endif
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here. /**
* @note This macro can be used to deactivate a power saving mode. * @brief Objects Caches APIs.
*/ * @details If enabled then the objects caches APIs are included
#define CH_CFG_IDLE_LEAVE_HOOK() { \ * in the kernel.
} *
* @note The default is @p TRUE.
/** */
* @brief System halt hook. #if !defined(CH_CFG_USE_OBJ_CACHES)
*/ #define CH_CFG_USE_OBJ_CACHES TRUE
#if !defined(CH_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__) #endif
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
} /**
#endif * @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
/** @} */ * in the kernel.
*
/*===========================================================================*/ * @note The default is @p TRUE.
/* Port-specific settings (override port settings defaulted in nilcore.h). */ */
/*===========================================================================*/ #if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif /* _CHCONF_H_ */ #endif
/** @} */ /**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Objects factory options
* @{
*/
/*===========================================================================*/
/**
* @brief Objects Factory APIs.
* @details If enabled then the objects factory APIs are included in the
* kernel.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_CFG_USE_FACTORY)
#define CH_CFG_USE_FACTORY TRUE
#endif
/**
* @brief Maximum length for object names.
* @details If the specified length is zero then the name is stored by
* pointer but this could have unintended side effects.
*/
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
#endif
/**
* @brief Enables the registry of generic objects.
*/
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
#endif
/**
* @brief Enables factory for generic buffers.
*/
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
#endif
/**
* @brief Enables factory for semaphores.
*/
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
#define CH_CFG_FACTORY_SEMAPHORES TRUE
#endif
/**
* @brief Enables factory for mailboxes.
*/
#if !defined(CH_CFG_FACTORY_MAILBOXES)
#define CH_CFG_FACTORY_MAILBOXES TRUE
#endif
/**
* @brief Enables factory for objects FIFOs.
*/
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES)
#define CH_CFG_FACTORY_PIPES TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, kernel statistics.
*
* @note Feature not currently implemented.
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
#endif
/**
* @brief Debug option, system state check.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
#endif
/**
* @brief Debug option, parameters checks.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
#endif
/**
* @brief System assertions.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/**
* @brief Stack check.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief System initialization hook.
*/
#define CH_CFG_SYSTEM_INIT_HOOK() { \
}
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
#define CH_CFG_THREAD_EXT_FIELDS \
/* Add threads custom fields here.*/
/**
* @brief Threads initialization hook.
*/
#define CH_CFG_THREAD_EXT_INIT_HOOK(tr) { \
/* Add custom threads initialization code here.*/ \
}
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) {}
/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
}
/**
* @brief Idle thread leave hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
}
/**
* @brief System halt hook.
*/
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
}
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in nilcore.h). */
/*===========================================================================*/
#endif /* CHCONF_H */
/** @} */

View File

@ -1,388 +1,533 @@
/* /*
ChibiOS - Copyright (C) 2016 Andrew Wygle aka awygle ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/** /**
* @file templates/halconf.h * @file templates/halconf.h
* @brief HAL configuration header. * @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the * @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use * various device drivers from your application. You may also use
* this file in order to override the device drivers default settings. * this file in order to override the device drivers default settings.
* *
* @addtogroup HAL_CONF * @addtogroup HAL_CONF
* @{ * @{
*/ */
#ifndef HALCONF_H #ifndef HALCONF_H
#define HALCONF_H #define HALCONF_H
#include "mcuconf.h" #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
/**
* @brief Enables the PAL subsystem. #include "mcuconf.h"
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) /**
#define HAL_USE_PAL TRUE * @brief Enables the PAL subsystem.
#endif */
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
/** #define HAL_USE_PAL TRUE
* @brief Enables the DMA subsystem. #endif
*/
#if !defined(HAL_USE_DMA) || defined(__DOXYGEN__) /**
#define HAL_USE_DMA FALSE * @brief Enables the ADC subsystem.
#endif */
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
/** #define HAL_USE_ADC FALSE
* @brief Enables the ADC subsystem. #endif
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) /**
#define HAL_USE_ADC FALSE * @brief Enables the CAN subsystem.
#endif */
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
/** #define HAL_USE_CAN FALSE
* @brief Enables the DAC subsystem. #endif
*/
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) /**
#define HAL_USE_DAC FALSE * @brief Enables the cryptographic subsystem.
#endif */
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
/** #define HAL_USE_CRY FALSE
* @brief Enables the CAN subsystem. #endif
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) /**
#define HAL_USE_CAN FALSE * @brief Enables the DAC subsystem.
#endif */
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
/** #define HAL_USE_DAC FALSE
* @brief Enables the EXT subsystem. #endif
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) /**
#define HAL_USE_EXT FALSE * @brief Enables the EFlash subsystem.
#endif */
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
/** #define HAL_USE_EFL FALSE
* @brief Enables the GPT subsystem. #endif
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) /**
#define HAL_USE_GPT FALSE * @brief Enables the GPT subsystem.
#endif */
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
/** #define HAL_USE_GPT FALSE
* @brief Enables the I2C subsystem. #endif
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) /**
#define HAL_USE_I2C FALSE * @brief Enables the I2C subsystem.
#endif */
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
/** #define HAL_USE_I2C FALSE
* @brief Enables the I2S subsystem. #endif
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) /**
#define HAL_USE_I2S FALSE * @brief Enables the I2S subsystem.
#endif */
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
/** #define HAL_USE_I2S FALSE
* @brief Enables the ICU subsystem. #endif
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) /**
#define HAL_USE_ICU FALSE * @brief Enables the ICU subsystem.
#endif */
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
/** #define HAL_USE_ICU FALSE
* @brief Enables the MAC subsystem. #endif
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) /**
#define HAL_USE_MAC FALSE * @brief Enables the MAC subsystem.
#endif */
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
/** #define HAL_USE_MAC FALSE
* @brief Enables the MMC_SPI subsystem. #endif
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) /**
#define HAL_USE_MMC_SPI FALSE * @brief Enables the MMC_SPI subsystem.
#endif */
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
/** #define HAL_USE_MMC_SPI FALSE
* @brief Enables the PWM subsystem. #endif
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) /**
#define HAL_USE_PWM FALSE * @brief Enables the PWM subsystem.
#endif */
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
/** #define HAL_USE_PWM FALSE
* @brief Enables the RTC subsystem. #endif
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) /**
#define HAL_USE_RTC FALSE * @brief Enables the RTC subsystem.
#endif */
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
/** #define HAL_USE_RTC FALSE
* @brief Enables the SDC subsystem. #endif
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) /**
#define HAL_USE_SDC FALSE * @brief Enables the SDC subsystem.
#endif */
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
/** #define HAL_USE_SDC FALSE
* @brief Enables the SERIAL subsystem. #endif
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) /**
#define HAL_USE_SERIAL TRUE * @brief Enables the SERIAL subsystem.
#endif */
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
/** #define HAL_USE_SERIAL TRUE
* @brief Enables the SERIAL over USB subsystem. #endif
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) /**
#define HAL_USE_SERIAL_USB FALSE * @brief Enables the SERIAL over USB subsystem.
#endif */
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
/** #define HAL_USE_SERIAL_USB FALSE
* @brief Enables the SPI subsystem. #endif
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) /**
#define HAL_USE_SPI FALSE * @brief Enables the SIO subsystem.
#endif */
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
/** #define HAL_USE_SIO FALSE
* @brief Enables the UART subsystem. #endif
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) /**
#define HAL_USE_UART FALSE * @brief Enables the SPI subsystem.
#endif */
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
/** #define HAL_USE_SPI FALSE
* @brief Enables the USB subsystem. #endif
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) /**
#define HAL_USE_USB FALSE * @brief Enables the TRNG subsystem.
#endif */
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
/** #define HAL_USE_TRNG FALSE
* @brief Enables the WDG subsystem. #endif
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) /**
#define HAL_USE_WDG FALSE * @brief Enables the UART subsystem.
#endif */
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
/*===========================================================================*/ #define HAL_USE_UART FALSE
/* ADC driver related settings. */ #endif
/*===========================================================================*/
/**
/** * @brief Enables the USB subsystem.
* @brief Enables synchronous APIs. */
* @note Disabling this option saves both code and data space. #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
*/ #define HAL_USE_USB FALSE
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) #endif
#define ADC_USE_WAIT FALSE
#endif /**
* @brief Enables the WDG subsystem.
/** */
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
* @note Disabling this option saves both code and data space. #define HAL_USE_WDG FALSE
*/ #endif
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION FALSE /**
#endif * @brief Enables the WSPI subsystem.
*/
/*===========================================================================*/ #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
/* CAN driver related settings. */ #define HAL_USE_WSPI FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Sleep mode related APIs inclusion switch. /* PAL driver related settings. */
*/ /*===========================================================================*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE FALSE /**
#endif * @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
/*===========================================================================*/ */
/* I2C driver related settings. */ #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
/*===========================================================================*/ #define PAL_USE_CALLBACKS FALSE
#endif
/**
* @brief Enables the mutual exclusion APIs on the I2C bus. /**
*/ * @brief Enables synchronous APIs.
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) * @note Disabling this option saves both code and data space.
#define I2C_USE_MUTUAL_EXCLUSION FALSE */
#endif #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT FALSE
/*===========================================================================*/ #endif
/* MAC driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
/* ADC driver related settings. */
/** /*===========================================================================*/
* @brief Enables an event sources for incoming packets.
*/ /**
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) * @brief Enables synchronous APIs.
#define MAC_USE_ZERO_COPY FALSE * @note Disabling this option saves both code and data space.
#endif */
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
/** #define ADC_USE_WAIT FALSE
* @brief Enables an event sources for incoming packets. #endif
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) /**
#define MAC_USE_EVENTS FALSE * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
#endif * @note Disabling this option saves both code and data space.
*/
/*===========================================================================*/ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
/* MMC_SPI driver related settings. */ #define ADC_USE_MUTUAL_EXCLUSION FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Delays insertions. /* CAN driver related settings. */
* @details If enabled this options inserts delays into the MMC waiting /*===========================================================================*/
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however. /**
* This option is recommended also if the SPI driver does not * @brief Sleep mode related APIs inclusion switch.
* use a DMA channel and heavily loads the CPU. */
*/ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) #define CAN_USE_SLEEP_MODE FALSE
#define MMC_NICE_WAITING FALSE #endif
#endif
/**
/*===========================================================================*/ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
/* SDC driver related settings. */ */
/*===========================================================================*/ #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#define CAN_ENFORCE_USE_CALLBACKS FALSE
/** #endif
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals. /*===========================================================================*/
*/ /* CRY driver related settings. */
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) /*===========================================================================*/
#define SDC_INIT_RETRY 100
#endif /**
* @brief Enables the SW fall-back of the cryptographic driver.
/** * @details When enabled, this option, activates a fall-back software
* @brief Include support for MMC cards. * implementation for algorithms not supported by the underlying
* @note MMC support is not yet implemented so this option must be kept * hardware.
* at @p FALSE. * @note Fall-back implementations may not be present for all algorithms.
*/ */
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE #define HAL_CRY_USE_FALLBACK FALSE
#endif #endif
/** /**
* @brief Delays insertions. * @brief Makes the driver forcibly use the fall-back implementations.
* @details If enabled this options inserts delays into the MMC waiting */
* routines releasing some extra CPU time for the threads with #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
* lower priority, this may slow down the driver a bit however. #define HAL_CRY_ENFORCE_FALLBACK FALSE
*/ #endif
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING FALSE /*===========================================================================*/
#endif /* DAC driver related settings. */
/*===========================================================================*/
/*===========================================================================*/
/* SERIAL driver related settings. */ /**
/*===========================================================================*/ * @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
/** */
* @brief Default bit rate. #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
* @details Configuration parameter, this is the baud rate selected for the #define DAC_USE_WAIT TRUE
* default configuration. #endif
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) /**
#define SERIAL_DEFAULT_BITRATE 38400 * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
#endif * @note Disabling this option saves both code and data space.
*/
/** #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
* @brief Serial buffers size. #define DAC_USE_MUTUAL_EXCLUSION TRUE
* @details Configuration parameter, you can change the depth of the queue #endif
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive /*===========================================================================*/
* buffers. /* I2C driver related settings. */
*/ /*===========================================================================*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16 /**
#endif * @brief Enables the mutual exclusion APIs on the I2C bus.
*/
/*===========================================================================*/ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
/* SERIAL_USB driver related setting. */ #define I2C_USE_MUTUAL_EXCLUSION FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Serial over USB buffers size. /* MAC driver related settings. */
* @details Configuration parameter, the buffer size must be a multiple of /*===========================================================================*/
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive /**
* buffers. * @brief Enables the zero-copy API.
*/ */
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256 #define MAC_USE_ZERO_COPY FALSE
#endif #endif
/** /**
* @brief Serial over USB number of buffers. * @brief Enables an event sources for incoming packets.
* @note The default is 2 buffers. */
*/ #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) #define MAC_USE_EVENTS FALSE
#define SERIAL_USB_BUFFERS_NUMBER 2 #endif
#endif
/*===========================================================================*/
/*===========================================================================*/ /* MMC_SPI driver related settings. */
/* SPI driver related settings. */ /*===========================================================================*/
/*===========================================================================*/
/**
/** * @brief Delays insertions.
* @brief Enables synchronous APIs. * @details If enabled this options inserts delays into the MMC waiting
* @note Disabling this option saves both code and data space. * routines releasing some extra CPU time for the threads with
*/ * lower priority, this may slow down the driver a bit however.
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) * This option is recommended also if the SPI driver does not
#define SPI_USE_WAIT FALSE * use a DMA channel and heavily loads the CPU.
#endif */
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
/** #define MMC_NICE_WAITING FALSE
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. #endif
* @note Disabling this option saves both code and data space.
*/ /*===========================================================================*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) /* SDC driver related settings. */
#define SPI_USE_MUTUAL_EXCLUSION FALSE /*===========================================================================*/
#endif
/**
/*===========================================================================*/ * @brief Number of initialization attempts before rejecting the card.
/* UART driver related settings. */ * @note Attempts are performed at 10mS intervals.
/*===========================================================================*/ */
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
/** #define SDC_INIT_RETRY 100
* @brief Enables synchronous APIs. #endif
* @note Disabling this option saves both code and data space.
*/ /**
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) * @brief Include support for MMC cards.
#define UART_USE_WAIT FALSE * @note MMC support is not yet implemented so this option must be kept
#endif * at @p FALSE.
*/
/** #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. #define SDC_MMC_SUPPORT FALSE
* @note Disabling this option saves both code and data space. #endif
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) /**
#define UART_USE_MUTUAL_EXCLUSION FALSE * @brief Delays insertions.
#endif * @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
/*===========================================================================*/ * lower priority, this may slow down the driver a bit however.
/* USB driver related settings. */ */
/*===========================================================================*/ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING FALSE
/** #endif
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space. /**
*/ * @brief OCR initialization constant for V20 cards.
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) */
#define USB_USE_WAIT FALSE #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#endif #define SDC_INIT_OCR_V20 0x50FF8000U
#endif
#endif /* _HALCONF_H_ */
/**
/** @} */ * @brief OCR initialization constant for non-V20 cards.
*/
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SERIAL_USB driver related setting. */
/*===========================================================================*/
/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
/**
* @brief Serial over USB number of buffers.
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT FALSE
#endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION FALSE
#endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
/* UART driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
#define UART_USE_WAIT FALSE
#endif
/**
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
/* USB driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
#define USB_USE_WAIT FALSE
#endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#include "halconf_community.h"
#endif /* HALCONF_H */
/** @} */

View File

@ -108,12 +108,12 @@ include $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/mk/startup_ms
include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR6989/board.mk include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR6989/board.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk
include $(CHIBIOS)/os/hal/osal/nil/osal.mk include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional). # RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk
# Other files (optional). # Other files (optional).
include $(CHIBIOS)/test/nil/test.mk include $(CHIBIOS)/test/nil/nil_test.mk
# Define linker script file here # Define linker script file here
LDSCRIPT = $(STARTUPLD)/msp430fr6989.ld LDSCRIPT = $(STARTUPLD)/msp430fr6989.ld

View File

@ -1,275 +1,479 @@
/* /*
ChibiOS - Copyright (C) 2016 Andrew Wygle aka awygle ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/** /**
* @file nilconf.h * @file nil/templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it * @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings. * contains the application specific kernel settings.
* *
* @addtogroup config * @addtogroup NIL_CONFIG
* @details Kernel related settings and hooks. * @details Kernel related settings and hooks.
* @{ * @{
*/ */
#ifndef CHCONF_H #ifndef CHCONF_H
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_NIL_CONF_ #define _CHIBIOS_NIL_CONF_
#define _CHIBIOS_NIL_CONF_VER_5_0_ #define _CHIBIOS_NIL_CONF_VER_4_0_
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @name Kernel parameters and options * @name Kernel parameters and options
* @{ * @{
*/ */
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Number of user threads in the application. * @brief Maximum number of user threads in the application.
* @note This number is not inclusive of the idle thread which is * @note This number is not inclusive of the idle thread which is
* Implicitly handled. * implicitly handled.
*/ * @note Set this value to be exactly equal to the number of threads you
#define CH_CFG_NUM_THREADS 2 * will use or you would be wasting RAM and cycles.
* @note This values also defines the number of available priorities
/** @} */ * (0..CH_CFG_MAX_THREADS-1).
*/
/*===========================================================================*/ #if !defined(CH_CFG_MAX_THREADS)
/** #define CH_CFG_MAX_THREADS 8
* @name System timer settings #endif
* @{
*/ /**
/*===========================================================================*/ * @brief Auto starts threads when @p chSysInit() is invoked.
*/
/** #if !defined(CH_CFG_AUTOSTART_THREADS)
* @brief System time counter resolution. #define CH_CFG_AUTOSTART_THREADS TRUE
* @note Allowed values are 16 or 32 bits. #endif
*/
#define CH_CFG_ST_RESOLUTION 16 /** @} */
/** /*===========================================================================*/
* @brief System tick frequency. /**
* @note This value together with the @p CH_CFG_ST_RESOLUTION * @name System timer settings
* option defines the maximum amount of time allowed for * @{
* timeouts. */
*/ /*===========================================================================*/
#define CH_CFG_ST_FREQUENCY 1000
/**
/** * @brief System time counter resolution.
* @brief Time delta constant for the tick-less mode. * @note Allowed values are 16 or 32 bits.
* @note If this value is zero then the system uses the classic */
* periodic tick. This value represents the minimum number #if !defined(CH_CFG_ST_RESOLUTION)
* of ticks that is safe to specify in a timeout directive. #define CH_CFG_ST_RESOLUTION 16
* The value one is not valid, timeouts are rounded up to #endif
* this value.
*/ /**
#define CH_CFG_ST_TIMEDELTA 0 * @brief System tick frequency.
* @note This value together with the @p CH_CFG_ST_RESOLUTION
/** @} */ * option defines the maximum amount of time allowed for
* timeouts.
/*===========================================================================*/ */
/** #if !defined(CH_CFG_ST_FREQUENCY)
* @name Subsystem options #define CH_CFG_ST_FREQUENCY 1000
* @{ #endif
*/
/*===========================================================================*/ /**
* @brief Time delta constant for the tick-less mode.
/** * @note If this value is zero then the system uses the classic
* @brief Semaphores APIs. * periodic tick. This value represents the minimum number
* @details If enabled then the Semaphores APIs are included in the kernel. * of ticks that is safe to specify in a timeout directive.
* * The value one is not valid, timeouts are rounded up to
* @note The default is @p TRUE. * this value.
*/ */
#define CH_CFG_USE_SEMAPHORES TRUE #if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
/** #endif
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel. /** @} */
*
* @note Feature not currently implemented. /*===========================================================================*/
* @note The default is @p FALSE. /**
*/ * @name Subsystem options
#define CH_CFG_USE_MUTEXES FALSE * @{
*/
/** /*===========================================================================*/
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel. /**
* * @brief Threads synchronization APIs.
* @note The default is @p TRUE. * @details If enabled then the @p chThdWait() function is included in
*/ * the kernel.
#define CH_CFG_USE_EVENTS TRUE *
* @note The default is @p TRUE.
/** */
* @brief Mailboxes APIs. #if !defined(CH_CFG_USE_WAITEXIT)
* @details If enabled then the asynchronous messages (mailboxes) APIs are #define CH_CFG_USE_WAITEXIT TRUE
* included in the kernel. #endif
*
* @note The default is @p TRUE. /**
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @brief Semaphores APIs.
*/ * @details If enabled then the Semaphores APIs are included in the kernel.
#define CH_CFG_USE_MAILBOXES TRUE *
* @note The default is @p TRUE.
/** */
* @brief Core Memory Manager APIs. #if !defined(CH_CFG_USE_SEMAPHORES)
* @details If enabled then the core memory manager APIs are included #define CH_CFG_USE_SEMAPHORES TRUE
* in the kernel. #endif
*
* @note The default is @p TRUE. /**
*/ * @brief Mutexes APIs.
#define CH_CFG_USE_MEMCORE TRUE * @details If enabled then the mutexes APIs are included in the kernel.
*
/** * @note Feature not currently implemented.
* @brief Heap Allocator APIs. * @note The default is @p FALSE.
* @details If enabled then the memory heap allocator APIs are included */
* in the kernel. #if !defined(CH_CFG_USE_MUTEXES)
* #define CH_CFG_USE_MUTEXES FALSE
* @note The default is @p TRUE. #endif
*/
#define CH_CFG_USE_HEAP TRUE /**
* @brief Events Flags APIs.
/** * @details If enabled then the event flags APIs are included in the kernel.
* @brief Memory Pools Allocator APIs. *
* @details If enabled then the memory pools allocator APIs are included * @note The default is @p TRUE.
* in the kernel. */
* #if !defined(CH_CFG_USE_EVENTS)
* @note The default is @p TRUE. #define CH_CFG_USE_EVENTS TRUE
*/ #endif
#define CH_CFG_USE_MEMPOOLS TRUE
/**
/** * @brief Synchronous Messages APIs.
* @brief Managed RAM size. * @details If enabled then the synchronous messages APIs are included
* @details Size of the RAM area to be managed by the OS. If set to zero * in the kernel.
* then the whole available RAM is used. The core memory is made *
* available to the heap allocator and/or can be used directly through * @note The default is @p TRUE.
* the simplified core memory allocator. */
* #if !defined(CH_CFG_USE_MESSAGES)
* @note In order to let the OS manage the whole RAM the linker script must #define CH_CFG_USE_MESSAGES TRUE
* provide the @p __heap_base__ and @p __heap_end__ symbols. #endif
* @note Requires @p CH_CFG_USE_MEMCORE.
*/ /** @} */
#define CH_CFG_MEMCORE_SIZE 0
/*===========================================================================*/
/** @} */ /**
* @name OSLIB options
/*===========================================================================*/ * @{
/** */
* @name Debug options /*===========================================================================*/
* @{
*/ /**
/*===========================================================================*/ * @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
/** * included in the kernel.
* @brief Debug option, kernel statistics. *
* * @note The default is @p TRUE.
* @note Feature not currently implemented. * @note Requires @p CH_CFG_USE_SEMAPHORES.
* @note The default is @p FALSE. */
*/ #if !defined(CH_CFG_USE_MAILBOXES)
#define CH_DBG_STATISTICS FALSE #define CH_CFG_USE_MAILBOXES TRUE
#endif
/**
* @brief Debug option, system state check. /**
* * @brief Core Memory Manager APIs.
* @note The default is @p FALSE. * @details If enabled then the core memory manager APIs are included
*/ * in the kernel.
#define CH_DBG_SYSTEM_STATE_CHECK FALSE *
* @note The default is @p TRUE.
/** */
* @brief Debug option, parameters checks. #if !defined(CH_CFG_USE_MEMCORE)
* #define CH_CFG_USE_MEMCORE TRUE
* @note The default is @p FALSE. #endif
*/
#define CH_DBG_ENABLE_CHECKS FALSE /**
* @brief Managed RAM size.
/** * @details Size of the RAM area to be managed by the OS. If set to zero
* @brief System assertions. * then the whole available RAM is used. The core memory is made
* * available to the heap allocator and/or can be used directly through
* @note The default is @p FALSE. * the simplified core memory allocator.
*/ *
#define CH_DBG_ENABLE_ASSERTS FALSE * @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
/** * @note Requires @p CH_CFG_USE_MEMCORE.
* @brief Stack check. */
* #if !defined(CH_CFG_MEMCORE_SIZE)
*@note The default is @p FALSE. #define CH_CFG_MEMCORE_SIZE 0
*/ #endif
#define CH_DBG_ENABLE_STACK_CHECK TRUE
/**
/** @} */ * @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
/*===========================================================================*/ * in the kernel.
/** *
* @name Kernel hooks * @note The default is @p TRUE.
* @{ */
*/ #if !defined(CH_CFG_USE_HEAP)
/*===========================================================================*/ #define CH_CFG_USE_HEAP TRUE
#endif
/**
* @brief System initialization hook. /**
*/ * @brief Memory Pools Allocator APIs.
#if !defined(CH_CFG_SYSTEM_INIT_HOOK) || defined(__DOXYGEN__) * @details If enabled then the memory pools allocator APIs are included
#define CH_CFG_SYSTEM_INIT_HOOK() { \ * in the kernel.
} *
#endif * @note The default is @p TRUE.
*/
/** #if !defined(CH_CFG_USE_MEMPOOLS)
* @brief Threads descriptor structure extension. #define CH_CFG_USE_MEMPOOLS TRUE
* @details User fields added to the end of the @p thread_t structure. #endif
*/
#define CH_CFG_THREAD_EXT_FIELDS \ /**
/* Add threads custom fields here.*/ * @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included
/** * in the kernel.
* @brief Threads initialization hook. *
*/ * @note The default is @p TRUE.
#define CH_CFG_THREAD_EXT_INIT_HOOK(tr) { \ */
/* Add custom threads initialization code here.*/ \ #if !defined(CH_CFG_USE_OBJ_FIFOS)
} #define CH_CFG_USE_OBJ_FIFOS TRUE
#endif
/**
* @brief Idle thread enter hook. /**
* @note This hook is invoked within a critical zone, no OS functions * @brief Pipes APIs.
* should be invoked from here. * @details If enabled then the pipes APIs are included
* @note This macro can be used to activate a power saving mode. * in the kernel.
*/ *
#define CH_CFG_IDLE_ENTER_HOOK() { \ * @note The default is @p TRUE.
} */
#if !defined(CH_CFG_USE_PIPES)
/** #define CH_CFG_USE_PIPES TRUE
* @brief Idle thread leave hook. #endif
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here. /**
* @note This macro can be used to deactivate a power saving mode. * @brief Objects Caches APIs.
*/ * @details If enabled then the objects caches APIs are included
#define CH_CFG_IDLE_LEAVE_HOOK() { \ * in the kernel.
} *
* @note The default is @p TRUE.
/** */
* @brief System halt hook. #if !defined(CH_CFG_USE_OBJ_CACHES)
*/ #define CH_CFG_USE_OBJ_CACHES TRUE
#if !defined(CH_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__) #endif
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
} /**
#endif * @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
/** @} */ * in the kernel.
*
/*===========================================================================*/ * @note The default is @p TRUE.
/* Port-specific settings (override port settings defaulted in nilcore.h). */ */
/*===========================================================================*/ #if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif /* _CHCONF_H_ */ #endif
/** @} */ /**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Objects factory options
* @{
*/
/*===========================================================================*/
/**
* @brief Objects Factory APIs.
* @details If enabled then the objects factory APIs are included in the
* kernel.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_CFG_USE_FACTORY)
#define CH_CFG_USE_FACTORY TRUE
#endif
/**
* @brief Maximum length for object names.
* @details If the specified length is zero then the name is stored by
* pointer but this could have unintended side effects.
*/
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
#endif
/**
* @brief Enables the registry of generic objects.
*/
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
#endif
/**
* @brief Enables factory for generic buffers.
*/
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
#endif
/**
* @brief Enables factory for semaphores.
*/
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
#define CH_CFG_FACTORY_SEMAPHORES TRUE
#endif
/**
* @brief Enables factory for mailboxes.
*/
#if !defined(CH_CFG_FACTORY_MAILBOXES)
#define CH_CFG_FACTORY_MAILBOXES TRUE
#endif
/**
* @brief Enables factory for objects FIFOs.
*/
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES)
#define CH_CFG_FACTORY_PIPES TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, kernel statistics.
*
* @note Feature not currently implemented.
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
#endif
/**
* @brief Debug option, system state check.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
#endif
/**
* @brief Debug option, parameters checks.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
#endif
/**
* @brief System assertions.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/**
* @brief Stack check.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief System initialization hook.
*/
#define CH_CFG_SYSTEM_INIT_HOOK() { \
}
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
#define CH_CFG_THREAD_EXT_FIELDS \
/* Add threads custom fields here.*/
/**
* @brief Threads initialization hook.
*/
#define CH_CFG_THREAD_EXT_INIT_HOOK(tr) { \
/* Add custom threads initialization code here.*/ \
}
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) {}
/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
}
/**
* @brief Idle thread leave hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
}
/**
* @brief System halt hook.
*/
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
}
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in nilcore.h). */
/*===========================================================================*/
#endif /* CHCONF_H */
/** @} */

View File

@ -1,388 +1,533 @@
/* /*
ChibiOS - Copyright (C) 2016 Andrew Wygle aka awygle ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/** /**
* @file templates/halconf.h * @file templates/halconf.h
* @brief HAL configuration header. * @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the * @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use * various device drivers from your application. You may also use
* this file in order to override the device drivers default settings. * this file in order to override the device drivers default settings.
* *
* @addtogroup HAL_CONF * @addtogroup HAL_CONF
* @{ * @{
*/ */
#ifndef HALCONF_H #ifndef HALCONF_H
#define HALCONF_H #define HALCONF_H
#include "mcuconf.h" #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
/**
* @brief Enables the PAL subsystem. #include "mcuconf.h"
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) /**
#define HAL_USE_PAL TRUE * @brief Enables the PAL subsystem.
#endif */
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
/** #define HAL_USE_PAL TRUE
* @brief Enables the DMA subsystem. #endif
*/
#if !defined(HAL_USE_DMA) || defined(__DOXYGEN__) /**
#define HAL_USE_DMA FALSE * @brief Enables the ADC subsystem.
#endif */
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
/** #define HAL_USE_ADC FALSE
* @brief Enables the ADC subsystem. #endif
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) /**
#define HAL_USE_ADC FALSE * @brief Enables the CAN subsystem.
#endif */
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
/** #define HAL_USE_CAN FALSE
* @brief Enables the DAC subsystem. #endif
*/
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) /**
#define HAL_USE_DAC FALSE * @brief Enables the cryptographic subsystem.
#endif */
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
/** #define HAL_USE_CRY FALSE
* @brief Enables the CAN subsystem. #endif
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) /**
#define HAL_USE_CAN FALSE * @brief Enables the DAC subsystem.
#endif */
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
/** #define HAL_USE_DAC FALSE
* @brief Enables the EXT subsystem. #endif
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) /**
#define HAL_USE_EXT FALSE * @brief Enables the EFlash subsystem.
#endif */
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
/** #define HAL_USE_EFL FALSE
* @brief Enables the GPT subsystem. #endif
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) /**
#define HAL_USE_GPT FALSE * @brief Enables the GPT subsystem.
#endif */
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
/** #define HAL_USE_GPT FALSE
* @brief Enables the I2C subsystem. #endif
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) /**
#define HAL_USE_I2C FALSE * @brief Enables the I2C subsystem.
#endif */
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
/** #define HAL_USE_I2C FALSE
* @brief Enables the I2S subsystem. #endif
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) /**
#define HAL_USE_I2S FALSE * @brief Enables the I2S subsystem.
#endif */
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
/** #define HAL_USE_I2S FALSE
* @brief Enables the ICU subsystem. #endif
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) /**
#define HAL_USE_ICU FALSE * @brief Enables the ICU subsystem.
#endif */
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
/** #define HAL_USE_ICU FALSE
* @brief Enables the MAC subsystem. #endif
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) /**
#define HAL_USE_MAC FALSE * @brief Enables the MAC subsystem.
#endif */
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
/** #define HAL_USE_MAC FALSE
* @brief Enables the MMC_SPI subsystem. #endif
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) /**
#define HAL_USE_MMC_SPI FALSE * @brief Enables the MMC_SPI subsystem.
#endif */
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
/** #define HAL_USE_MMC_SPI FALSE
* @brief Enables the PWM subsystem. #endif
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) /**
#define HAL_USE_PWM FALSE * @brief Enables the PWM subsystem.
#endif */
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
/** #define HAL_USE_PWM FALSE
* @brief Enables the RTC subsystem. #endif
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) /**
#define HAL_USE_RTC FALSE * @brief Enables the RTC subsystem.
#endif */
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
/** #define HAL_USE_RTC FALSE
* @brief Enables the SDC subsystem. #endif
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) /**
#define HAL_USE_SDC FALSE * @brief Enables the SDC subsystem.
#endif */
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
/** #define HAL_USE_SDC FALSE
* @brief Enables the SERIAL subsystem. #endif
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) /**
#define HAL_USE_SERIAL TRUE * @brief Enables the SERIAL subsystem.
#endif */
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
/** #define HAL_USE_SERIAL TRUE
* @brief Enables the SERIAL over USB subsystem. #endif
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) /**
#define HAL_USE_SERIAL_USB FALSE * @brief Enables the SERIAL over USB subsystem.
#endif */
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
/** #define HAL_USE_SERIAL_USB FALSE
* @brief Enables the SPI subsystem. #endif
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) /**
#define HAL_USE_SPI FALSE * @brief Enables the SIO subsystem.
#endif */
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
/** #define HAL_USE_SIO FALSE
* @brief Enables the UART subsystem. #endif
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) /**
#define HAL_USE_UART FALSE * @brief Enables the SPI subsystem.
#endif */
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
/** #define HAL_USE_SPI FALSE
* @brief Enables the USB subsystem. #endif
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) /**
#define HAL_USE_USB FALSE * @brief Enables the TRNG subsystem.
#endif */
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
/** #define HAL_USE_TRNG FALSE
* @brief Enables the WDG subsystem. #endif
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) /**
#define HAL_USE_WDG FALSE * @brief Enables the UART subsystem.
#endif */
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
/*===========================================================================*/ #define HAL_USE_UART FALSE
/* ADC driver related settings. */ #endif
/*===========================================================================*/
/**
/** * @brief Enables the USB subsystem.
* @brief Enables synchronous APIs. */
* @note Disabling this option saves both code and data space. #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
*/ #define HAL_USE_USB FALSE
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) #endif
#define ADC_USE_WAIT FALSE
#endif /**
* @brief Enables the WDG subsystem.
/** */
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
* @note Disabling this option saves both code and data space. #define HAL_USE_WDG FALSE
*/ #endif
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION FALSE /**
#endif * @brief Enables the WSPI subsystem.
*/
/*===========================================================================*/ #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
/* CAN driver related settings. */ #define HAL_USE_WSPI FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Sleep mode related APIs inclusion switch. /* PAL driver related settings. */
*/ /*===========================================================================*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE FALSE /**
#endif * @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
/*===========================================================================*/ */
/* I2C driver related settings. */ #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
/*===========================================================================*/ #define PAL_USE_CALLBACKS FALSE
#endif
/**
* @brief Enables the mutual exclusion APIs on the I2C bus. /**
*/ * @brief Enables synchronous APIs.
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) * @note Disabling this option saves both code and data space.
#define I2C_USE_MUTUAL_EXCLUSION FALSE */
#endif #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT FALSE
/*===========================================================================*/ #endif
/* MAC driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
/* ADC driver related settings. */
/** /*===========================================================================*/
* @brief Enables an event sources for incoming packets.
*/ /**
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) * @brief Enables synchronous APIs.
#define MAC_USE_ZERO_COPY FALSE * @note Disabling this option saves both code and data space.
#endif */
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
/** #define ADC_USE_WAIT FALSE
* @brief Enables an event sources for incoming packets. #endif
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) /**
#define MAC_USE_EVENTS FALSE * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
#endif * @note Disabling this option saves both code and data space.
*/
/*===========================================================================*/ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
/* MMC_SPI driver related settings. */ #define ADC_USE_MUTUAL_EXCLUSION FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Delays insertions. /* CAN driver related settings. */
* @details If enabled this options inserts delays into the MMC waiting /*===========================================================================*/
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however. /**
* This option is recommended also if the SPI driver does not * @brief Sleep mode related APIs inclusion switch.
* use a DMA channel and heavily loads the CPU. */
*/ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) #define CAN_USE_SLEEP_MODE FALSE
#define MMC_NICE_WAITING FALSE #endif
#endif
/**
/*===========================================================================*/ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
/* SDC driver related settings. */ */
/*===========================================================================*/ #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#define CAN_ENFORCE_USE_CALLBACKS FALSE
/** #endif
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals. /*===========================================================================*/
*/ /* CRY driver related settings. */
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) /*===========================================================================*/
#define SDC_INIT_RETRY 100
#endif /**
* @brief Enables the SW fall-back of the cryptographic driver.
/** * @details When enabled, this option, activates a fall-back software
* @brief Include support for MMC cards. * implementation for algorithms not supported by the underlying
* @note MMC support is not yet implemented so this option must be kept * hardware.
* at @p FALSE. * @note Fall-back implementations may not be present for all algorithms.
*/ */
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE #define HAL_CRY_USE_FALLBACK FALSE
#endif #endif
/** /**
* @brief Delays insertions. * @brief Makes the driver forcibly use the fall-back implementations.
* @details If enabled this options inserts delays into the MMC waiting */
* routines releasing some extra CPU time for the threads with #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
* lower priority, this may slow down the driver a bit however. #define HAL_CRY_ENFORCE_FALLBACK FALSE
*/ #endif
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING FALSE /*===========================================================================*/
#endif /* DAC driver related settings. */
/*===========================================================================*/
/*===========================================================================*/
/* SERIAL driver related settings. */ /**
/*===========================================================================*/ * @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
/** */
* @brief Default bit rate. #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
* @details Configuration parameter, this is the baud rate selected for the #define DAC_USE_WAIT TRUE
* default configuration. #endif
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) /**
#define SERIAL_DEFAULT_BITRATE 38400 * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
#endif * @note Disabling this option saves both code and data space.
*/
/** #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
* @brief Serial buffers size. #define DAC_USE_MUTUAL_EXCLUSION TRUE
* @details Configuration parameter, you can change the depth of the queue #endif
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive /*===========================================================================*/
* buffers. /* I2C driver related settings. */
*/ /*===========================================================================*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16 /**
#endif * @brief Enables the mutual exclusion APIs on the I2C bus.
*/
/*===========================================================================*/ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
/* SERIAL_USB driver related setting. */ #define I2C_USE_MUTUAL_EXCLUSION FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Serial over USB buffers size. /* MAC driver related settings. */
* @details Configuration parameter, the buffer size must be a multiple of /*===========================================================================*/
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive /**
* buffers. * @brief Enables the zero-copy API.
*/ */
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256 #define MAC_USE_ZERO_COPY FALSE
#endif #endif
/** /**
* @brief Serial over USB number of buffers. * @brief Enables an event sources for incoming packets.
* @note The default is 2 buffers. */
*/ #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) #define MAC_USE_EVENTS FALSE
#define SERIAL_USB_BUFFERS_NUMBER 2 #endif
#endif
/*===========================================================================*/
/*===========================================================================*/ /* MMC_SPI driver related settings. */
/* SPI driver related settings. */ /*===========================================================================*/
/*===========================================================================*/
/**
/** * @brief Delays insertions.
* @brief Enables synchronous APIs. * @details If enabled this options inserts delays into the MMC waiting
* @note Disabling this option saves both code and data space. * routines releasing some extra CPU time for the threads with
*/ * lower priority, this may slow down the driver a bit however.
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) * This option is recommended also if the SPI driver does not
#define SPI_USE_WAIT FALSE * use a DMA channel and heavily loads the CPU.
#endif */
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
/** #define MMC_NICE_WAITING FALSE
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. #endif
* @note Disabling this option saves both code and data space.
*/ /*===========================================================================*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) /* SDC driver related settings. */
#define SPI_USE_MUTUAL_EXCLUSION FALSE /*===========================================================================*/
#endif
/**
/*===========================================================================*/ * @brief Number of initialization attempts before rejecting the card.
/* UART driver related settings. */ * @note Attempts are performed at 10mS intervals.
/*===========================================================================*/ */
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
/** #define SDC_INIT_RETRY 100
* @brief Enables synchronous APIs. #endif
* @note Disabling this option saves both code and data space.
*/ /**
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) * @brief Include support for MMC cards.
#define UART_USE_WAIT FALSE * @note MMC support is not yet implemented so this option must be kept
#endif * at @p FALSE.
*/
/** #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. #define SDC_MMC_SUPPORT FALSE
* @note Disabling this option saves both code and data space. #endif
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) /**
#define UART_USE_MUTUAL_EXCLUSION FALSE * @brief Delays insertions.
#endif * @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
/*===========================================================================*/ * lower priority, this may slow down the driver a bit however.
/* USB driver related settings. */ */
/*===========================================================================*/ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING FALSE
/** #endif
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space. /**
*/ * @brief OCR initialization constant for V20 cards.
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) */
#define USB_USE_WAIT FALSE #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#endif #define SDC_INIT_OCR_V20 0x50FF8000U
#endif
#endif /* _HALCONF_H_ */
/**
/** @} */ * @brief OCR initialization constant for non-V20 cards.
*/
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SERIAL_USB driver related setting. */
/*===========================================================================*/
/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
/**
* @brief Serial over USB number of buffers.
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT FALSE
#endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION FALSE
#endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
/* UART driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
#define UART_USE_WAIT FALSE
#endif
/**
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
/* USB driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
#define USB_USE_WAIT FALSE
#endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#include "halconf_community.h"
#endif /* HALCONF_H */
/** @} */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_6_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -108,21 +108,6 @@
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit() * @details When this option is activated the function @p chSysInit()
@ -311,6 +296,28 @@
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif #endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are * @details If enabled then the asynchronous messages (mailboxes) APIs are
@ -334,6 +341,21 @@
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included * @details If enabled then the memory heap allocator APIs are included
@ -382,16 +404,36 @@
#endif #endif
/** /**
* @brief Dynamic Threads APIs. * @brief Objects Caches APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the objects caches APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#if !defined(CH_CFG_USE_DYNAMIC) #if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_DYNAMIC TRUE #define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif #endif
/** @} */ /** @} */
@ -703,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -29,7 +29,7 @@
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_ #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_0_ #define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
@ -68,6 +68,13 @@
#define HAL_USE_DAC TRUE #define HAL_USE_DAC TRUE
#endif #endif
/**
* @brief Enables the EFlash subsystem.
*/
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EFL FALSE
#endif
/** /**
* @brief Enables the GPT subsystem. * @brief Enables the GPT subsystem.
*/ */
@ -451,7 +458,6 @@
#define SPI_USE_CIRCULAR FALSE #define SPI_USE_CIRCULAR FALSE
#endif #endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.

View File

@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_6_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -108,21 +108,6 @@
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit() * @details When this option is activated the function @p chSysInit()
@ -311,6 +296,28 @@
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif #endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are * @details If enabled then the asynchronous messages (mailboxes) APIs are
@ -334,6 +341,21 @@
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included * @details If enabled then the memory heap allocator APIs are included
@ -382,16 +404,36 @@
#endif #endif
/** /**
* @brief Dynamic Threads APIs. * @brief Objects Caches APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the objects caches APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#if !defined(CH_CFG_USE_DYNAMIC) #if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_DYNAMIC TRUE #define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif #endif
/** @} */ /** @} */
@ -614,7 +656,7 @@
* @note It is invoked from within @p _thread_init() and implicitly from all * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs. * the threads creation APIs.
*/ */
#define _CH_CFG_THREAD_INIT_HOOK(tp) { \ #define _CH_CFG_THREAD_INIT_HOOK(tp) { \
/* Add threads initialization code here.*/ \ /* Add threads initialization code here.*/ \
} }
@ -622,7 +664,7 @@
* @brief Threads finalization hook. * @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API. * @details User finalization code added to the @p chThdExit() API.
*/ */
#define _CH_CFG_THREAD_EXIT_HOOK(tp) { \ #define _CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \ /* Add threads finalization code here.*/ \
} }
@ -630,21 +672,21 @@
* @brief Context switch hook. * @brief Context switch hook.
* @details This hook is invoked just before switching between threads. * @details This hook is invoked just before switching between threads.
*/ */
#define _CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ #define _CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
/* Context switch code here.*/ \ /* Context switch code here.*/ \
} }
/** /**
* @brief ISR enter hook. * @brief ISR enter hook.
*/ */
#define _CH_CFG_IRQ_PROLOGUE_HOOK() { \ #define _CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \ /* IRQ prologue code here.*/ \
} }
/** /**
* @brief ISR exit hook. * @brief ISR exit hook.
*/ */
#define _CH_CFG_IRQ_EPILOGUE_HOOK() { \ #define _CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \ /* IRQ epilogue code here.*/ \
} }
@ -690,7 +732,7 @@
* @details This hook is invoked in case to a system halting error before * @details This hook is invoked in case to a system halting error before
* the system is halted. * the system is halted.
*/ */
#define _CH_CFG_SYSTEM_HALT_HOOK(reason) { \ #define _CH_CFG_SYSTEM_HALT_HOOK(reason) { \
/* System halt code here.*/ \ /* System halt code here.*/ \
} }
@ -703,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -29,7 +29,7 @@
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_ #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_0_ #define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
@ -68,6 +68,13 @@
#define HAL_USE_DAC FALSE #define HAL_USE_DAC FALSE
#endif #endif
/**
* @brief Enables the EFlash subsystem.
*/
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EFL FALSE
#endif
/** /**
* @brief Enables the GPT subsystem. * @brief Enables the GPT subsystem.
*/ */
@ -451,7 +458,6 @@
#define SPI_USE_CIRCULAR FALSE #define SPI_USE_CIRCULAR FALSE
#endif #endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.

View File

@ -33,6 +33,7 @@
#define STM32F4xx_MCUCONF #define STM32F4xx_MCUCONF
#define STM32F405_MCUCONF #define STM32F405_MCUCONF
#define STM32F407_MCUCONF
#define STM32F415_MCUCONF #define STM32F415_MCUCONF
#define STM32F407_MCUCONF #define STM32F407_MCUCONF
#define STM32F417_MCUCONF #define STM32F417_MCUCONF

View File

@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_6_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -108,21 +108,6 @@
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit() * @details When this option is activated the function @p chSysInit()
@ -311,6 +296,28 @@
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif #endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are * @details If enabled then the asynchronous messages (mailboxes) APIs are
@ -334,6 +341,21 @@
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included * @details If enabled then the memory heap allocator APIs are included
@ -382,16 +404,36 @@
#endif #endif
/** /**
* @brief Dynamic Threads APIs. * @brief Objects Caches APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the objects caches APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#if !defined(CH_CFG_USE_DYNAMIC) #if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_DYNAMIC TRUE #define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif #endif
/** @} */ /** @} */
@ -703,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -29,7 +29,7 @@
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_ #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_0_ #define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
@ -68,6 +68,13 @@
#define HAL_USE_DAC FALSE #define HAL_USE_DAC FALSE
#endif #endif
/**
* @brief Enables the EFlash subsystem.
*/
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EFL FALSE
#endif
/** /**
* @brief Enables the GPT subsystem. * @brief Enables the GPT subsystem.
*/ */
@ -451,7 +458,6 @@
#define SPI_USE_CIRCULAR FALSE #define SPI_USE_CIRCULAR FALSE
#endif #endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.

View File

@ -32,6 +32,7 @@
*/ */
#define STM32F4xx_MCUCONF #define STM32F4xx_MCUCONF
#define STM32F407_MCUCONF
/* /*
* HAL driver system settings. * HAL driver system settings.

View File

@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_6_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -108,21 +108,6 @@
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit() * @details When this option is activated the function @p chSysInit()
@ -311,6 +296,28 @@
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif #endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are * @details If enabled then the asynchronous messages (mailboxes) APIs are
@ -334,6 +341,21 @@
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif #endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included * @details If enabled then the memory heap allocator APIs are included
@ -382,16 +404,36 @@
#endif #endif
/** /**
* @brief Dynamic Threads APIs. * @brief Objects Caches APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the objects caches APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#if !defined(CH_CFG_USE_DYNAMIC) #if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_DYNAMIC TRUE #define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif #endif
/** @} */ /** @} */
@ -703,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -29,7 +29,7 @@
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_ #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_0_ #define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
@ -68,6 +68,13 @@
#define HAL_USE_DAC FALSE #define HAL_USE_DAC FALSE
#endif #endif
/**
* @brief Enables the EFlash subsystem.
*/
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EFL FALSE
#endif
/** /**
* @brief Enables the GPT subsystem. * @brief Enables the GPT subsystem.
*/ */
@ -451,7 +458,6 @@
#define SPI_USE_CIRCULAR FALSE #define SPI_USE_CIRCULAR FALSE
#endif #endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
*/ */
/** /**
* @file templates/chconf.h * @file rt/templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it * @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings. * contains the application specific kernel settings.
@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -42,26 +42,34 @@
* @brief System time counter resolution. * @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32 #define CH_CFG_ST_RESOLUTION 32
#endif
/** /**
* @brief System tick frequency. * @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This * @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit. * setting also defines the system tick time unit.
*/ */
#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#endif
/** /**
* @brief Time intervals data size. * @brief Time intervals data size.
* @note Allowed values are 16, 32 or 64 bits. * @note Allowed values are 16, 32 or 64 bits.
*/ */
#if !defined(CH_CFG_INTERVALS_SIZE)
#define CH_CFG_INTERVALS_SIZE 32 #define CH_CFG_INTERVALS_SIZE 32
#endif
/** /**
* @brief Time types data size. * @brief Time types data size.
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_TIME_TYPES_SIZE)
#define CH_CFG_TIME_TYPES_SIZE 32 #define CH_CFG_TIME_TYPES_SIZE 32
#endif
/** /**
* @brief Time delta constant for the tick-less mode. * @brief Time delta constant for the tick-less mode.
@ -71,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to * The value one is not valid, timeouts are rounded up to
* this value. * this value.
*/ */
#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2 #define CH_CFG_ST_TIMEDELTA 2
#endif
/** @} */ /** @} */
@ -94,20 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and * @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case. * must be set to zero in that case.
*/ */
#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#define CH_CFG_MEMCORE_SIZE 0
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
@ -116,7 +115,9 @@
* function becomes the idle thread and must implement an * function becomes the idle thread and must implement an
* infinite loop. * infinite loop.
*/ */
#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE #define CH_CFG_NO_IDLE_THREAD FALSE
#endif
/** @} */ /** @} */
@ -135,7 +136,9 @@
* @note This is not related to the compiler optimization options. * @note This is not related to the compiler optimization options.
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE #define CH_CFG_OPTIMIZE_SPEED TRUE
#endif
/** @} */ /** @} */
@ -153,7 +156,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE #define CH_CFG_USE_TM TRUE
#endif
/** /**
* @brief Threads registry APIs. * @brief Threads registry APIs.
@ -161,7 +166,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE #define CH_CFG_USE_REGISTRY TRUE
#endif
/** /**
* @brief Threads synchronization APIs. * @brief Threads synchronization APIs.
@ -170,7 +177,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE #define CH_CFG_USE_WAITEXIT TRUE
#endif
/** /**
* @brief Semaphores APIs. * @brief Semaphores APIs.
@ -178,7 +187,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE #define CH_CFG_USE_SEMAPHORES TRUE
#endif
/** /**
* @brief Semaphores queuing mode. * @brief Semaphores queuing mode.
@ -189,7 +200,9 @@
* requirements. * requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @note Requires @p CH_CFG_USE_SEMAPHORES.
*/ */
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
#endif
/** /**
* @brief Mutexes APIs. * @brief Mutexes APIs.
@ -197,7 +210,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE #define CH_CFG_USE_MUTEXES TRUE
#endif
/** /**
* @brief Enables recursive behavior on mutexes. * @brief Enables recursive behavior on mutexes.
@ -207,7 +222,9 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES. * @note Requires @p CH_CFG_USE_MUTEXES.
*/ */
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
#endif
/** /**
* @brief Conditional Variables APIs. * @brief Conditional Variables APIs.
@ -217,7 +234,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES. * @note Requires @p CH_CFG_USE_MUTEXES.
*/ */
#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE #define CH_CFG_USE_CONDVARS TRUE
#endif
/** /**
* @brief Conditional Variables APIs with timeout. * @brief Conditional Variables APIs with timeout.
@ -227,7 +246,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS. * @note Requires @p CH_CFG_USE_CONDVARS.
*/ */
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
#endif
/** /**
* @brief Events Flags APIs. * @brief Events Flags APIs.
@ -235,7 +256,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE #define CH_CFG_USE_EVENTS TRUE
#endif
/** /**
* @brief Events Flags APIs with timeout. * @brief Events Flags APIs with timeout.
@ -245,7 +268,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS. * @note Requires @p CH_CFG_USE_EVENTS.
*/ */
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE #define CH_CFG_USE_EVENTS_TIMEOUT TRUE
#endif
/** /**
* @brief Synchronous Messages APIs. * @brief Synchronous Messages APIs.
@ -254,7 +279,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE #define CH_CFG_USE_MESSAGES TRUE
#endif
/** /**
* @brief Synchronous Messages queuing mode. * @brief Synchronous Messages queuing mode.
@ -265,7 +292,31 @@
* requirements. * requirements.
* @note Requires @p CH_CFG_USE_MESSAGES. * @note Requires @p CH_CFG_USE_MESSAGES.
*/ */
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
@ -275,7 +326,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @note Requires @p CH_CFG_USE_SEMAPHORES.
*/ */
#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE #define CH_CFG_USE_MAILBOXES TRUE
#endif
/** /**
* @brief Core Memory Manager APIs. * @brief Core Memory Manager APIs.
@ -284,7 +337,24 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
@ -296,7 +366,9 @@
* @p CH_CFG_USE_SEMAPHORES. * @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended. * @note Mutexes are recommended.
*/ */
#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE #define CH_CFG_USE_HEAP TRUE
#endif
/** /**
* @brief Memory Pools Allocator APIs. * @brief Memory Pools Allocator APIs.
@ -305,27 +377,64 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE #define CH_CFG_USE_MEMPOOLS TRUE
#endif
/** /**
* @brief Objects FIFOs APIs. * @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included * @details If enabled then the objects FIFOs APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_OBJ_FIFOS)
#define CH_CFG_USE_OBJ_FIFOS TRUE #define CH_CFG_USE_OBJ_FIFOS TRUE
#endif
/** /**
* @brief Dynamic Threads APIs. * @brief Pipes APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the pipes APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#define CH_CFG_USE_DYNAMIC TRUE #if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES TRUE
#endif
/**
* @brief Objects Caches APIs.
* @details If enabled then the objects caches APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif
/** @} */ /** @} */
@ -343,39 +452,60 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_CFG_USE_FACTORY)
#define CH_CFG_USE_FACTORY TRUE #define CH_CFG_USE_FACTORY TRUE
#endif
/** /**
* @brief Maximum length for object names. * @brief Maximum length for object names.
* @details If the specified length is zero then the name is stored by * @details If the specified length is zero then the name is stored by
* pointer but this could have unintended side effects. * pointer but this could have unintended side effects.
*/ */
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
#endif
/** /**
* @brief Enables the registry of generic objects. * @brief Enables the registry of generic objects.
*/ */
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE #define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
#endif
/** /**
* @brief Enables factory for generic buffers. * @brief Enables factory for generic buffers.
*/ */
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE #define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
#endif
/** /**
* @brief Enables factory for semaphores. * @brief Enables factory for semaphores.
*/ */
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
#define CH_CFG_FACTORY_SEMAPHORES TRUE #define CH_CFG_FACTORY_SEMAPHORES TRUE
#endif
/** /**
* @brief Enables factory for mailboxes. * @brief Enables factory for mailboxes.
*/ */
#if !defined(CH_CFG_FACTORY_MAILBOXES)
#define CH_CFG_FACTORY_MAILBOXES TRUE #define CH_CFG_FACTORY_MAILBOXES TRUE
#endif
/** /**
* @brief Enables factory for objects FIFOs. * @brief Enables factory for objects FIFOs.
*/ */
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE #define CH_CFG_FACTORY_OBJ_FIFOS TRUE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
#define CH_CFG_FACTORY_PIPES TRUE
#endif
/** @} */ /** @} */
@ -391,7 +521,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE #define CH_DBG_STATISTICS FALSE
#endif
/** /**
* @brief Debug option, system state check. * @brief Debug option, system state check.
@ -400,7 +532,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE #define CH_DBG_SYSTEM_STATE_CHECK FALSE
#endif
/** /**
* @brief Debug option, parameters checks. * @brief Debug option, parameters checks.
@ -409,7 +543,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE #define CH_DBG_ENABLE_CHECKS FALSE
#endif
/** /**
* @brief Debug option, consistency checks. * @brief Debug option, consistency checks.
@ -419,7 +555,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE #define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/** /**
* @brief Debug option, trace buffer. * @brief Debug option, trace buffer.
@ -427,14 +565,18 @@
* *
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED. * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/ */
#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
#endif
/** /**
* @brief Trace buffer entries. * @brief Trace buffer entries.
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
* different from @p CH_DBG_TRACE_MASK_DISABLED. * different from @p CH_DBG_TRACE_MASK_DISABLED.
*/ */
#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128 #define CH_DBG_TRACE_BUFFER_SIZE 128
#endif
/** /**
* @brief Debug option, stack checks. * @brief Debug option, stack checks.
@ -446,7 +588,9 @@
* @note The default failure mode is to halt the system with the global * @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL. * @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE
#endif
/** /**
* @brief Debug option, stacks initialization. * @brief Debug option, stacks initialization.
@ -456,7 +600,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE #define CH_DBG_FILL_THREADS FALSE
#endif
/** /**
* @brief Debug option, threads profiling. * @brief Debug option, threads profiling.
@ -467,7 +613,9 @@
* @note This debug option is not currently compatible with the * @note This debug option is not currently compatible with the
* tickless mode. * tickless mode.
*/ */
#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE #define CH_DBG_THREADS_PROFILING FALSE
#endif
/** @} */ /** @} */
@ -490,7 +638,7 @@
* @details User initialization code added to the @p chSysInit() function * @details User initialization code added to the @p chSysInit() function
* just before interrupts are enabled globally. * just before interrupts are enabled globally.
*/ */
#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \ #define CH_CFG_SYSTEM_INIT_HOOK() { \
/* Add threads initialization code here.*/ \ /* Add threads initialization code here.*/ \
} }
@ -597,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -28,6 +28,9 @@
#ifndef HALCONF_H #ifndef HALCONF_H
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
/** /**
@ -66,10 +69,10 @@
#endif #endif
/** /**
* @brief Enables the EXT subsystem. * @brief Enables the EFlash subsystem.
*/ */
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) #if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE #define HAL_USE_EFL FALSE
#endif #endif
/** /**
@ -121,13 +124,6 @@
#define HAL_USE_PWM FALSE #define HAL_USE_PWM FALSE
#endif #endif
/**
* @brief Enables the QSPI subsystem.
*/
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
#define HAL_USE_QSPI FALSE
#endif
/** /**
* @brief Enables the RTC subsystem. * @brief Enables the RTC subsystem.
*/ */
@ -156,6 +152,13 @@
#define HAL_USE_SERIAL_USB FALSE #define HAL_USE_SERIAL_USB FALSE
#endif #endif
/**
* @brief Enables the SIO subsystem.
*/
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
#define HAL_USE_SIO FALSE
#endif
/** /**
* @brief Enables the SPI subsystem. * @brief Enables the SPI subsystem.
*/ */
@ -163,6 +166,13 @@
#define HAL_USE_SPI FALSE #define HAL_USE_SPI FALSE
#endif #endif
/**
* @brief Enables the TRNG subsystem.
*/
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
#define HAL_USE_TRNG FALSE
#endif
/** /**
* @brief Enables the UART subsystem. * @brief Enables the UART subsystem.
*/ */
@ -184,6 +194,33 @@
#define HAL_USE_WDG FALSE #define HAL_USE_WDG FALSE
#endif #endif
/**
* @brief Enables the WSPI subsystem.
*/
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
#define HAL_USE_WSPI FALSE
#endif
/*===========================================================================*/
/* PAL driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
#define PAL_USE_CALLBACKS FALSE
#endif
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* ADC driver related settings. */ /* ADC driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -215,6 +252,13 @@
#define CAN_USE_SLEEP_MODE TRUE #define CAN_USE_SLEEP_MODE TRUE
#endif #endif
/**
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
*/
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#define CAN_ENFORCE_USE_CALLBACKS FALSE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* CRY driver related settings. */ /* CRY driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -237,6 +281,26 @@
#define HAL_CRY_ENFORCE_FALLBACK FALSE #define HAL_CRY_ENFORCE_FALLBACK FALSE
#endif #endif
/*===========================================================================*/
/* DAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
#define DAC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* I2C driver related settings. */ /* I2C driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -253,7 +317,7 @@
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Enables an event sources for incoming packets. * @brief Enables the zero-copy API.
*/ */
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE #define MAC_USE_ZERO_COPY FALSE
@ -313,6 +377,20 @@
#define SDC_NICE_WAITING TRUE #define SDC_NICE_WAITING TRUE
#endif #endif
/**
* @brief OCR initialization constant for V20 cards.
*/
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#define SDC_INIT_OCR_V20 0x50FF8000U
#endif
/**
* @brief OCR initialization constant for non-V20 cards.
*/
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/ /*===========================================================================*/
/* SERIAL driver related settings. */ /* SERIAL driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -372,6 +450,14 @@
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#endif #endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
@ -380,6 +466,14 @@
#define SPI_USE_MUTUAL_EXCLUSION TRUE #define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/ /*===========================================================================*/
/* UART driver related settings. */ /* UART driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -412,6 +506,28 @@
#define USB_USE_WAIT FALSE #define USB_USE_WAIT FALSE
#endif #endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#include "halconf_community.h"
#endif /* HALCONF_H */ #endif /* HALCONF_H */
/** @} */ /** @} */

View File

@ -15,7 +15,7 @@
*/ */
/** /**
* @file templates/chconf.h * @file rt/templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it * @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings. * contains the application specific kernel settings.
@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -42,26 +42,34 @@
* @brief System time counter resolution. * @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32 #define CH_CFG_ST_RESOLUTION 32
#endif
/** /**
* @brief System tick frequency. * @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This * @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit. * setting also defines the system tick time unit.
*/ */
#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#endif
/** /**
* @brief Time intervals data size. * @brief Time intervals data size.
* @note Allowed values are 16, 32 or 64 bits. * @note Allowed values are 16, 32 or 64 bits.
*/ */
#if !defined(CH_CFG_INTERVALS_SIZE)
#define CH_CFG_INTERVALS_SIZE 32 #define CH_CFG_INTERVALS_SIZE 32
#endif
/** /**
* @brief Time types data size. * @brief Time types data size.
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_TIME_TYPES_SIZE)
#define CH_CFG_TIME_TYPES_SIZE 32 #define CH_CFG_TIME_TYPES_SIZE 32
#endif
/** /**
* @brief Time delta constant for the tick-less mode. * @brief Time delta constant for the tick-less mode.
@ -71,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to * The value one is not valid, timeouts are rounded up to
* this value. * this value.
*/ */
#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0 #define CH_CFG_ST_TIMEDELTA 0
#endif
/** @} */ /** @} */
@ -94,20 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and * @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case. * must be set to zero in that case.
*/ */
#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#define CH_CFG_MEMCORE_SIZE 0
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
@ -116,7 +115,9 @@
* function becomes the idle thread and must implement an * function becomes the idle thread and must implement an
* infinite loop. * infinite loop.
*/ */
#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE #define CH_CFG_NO_IDLE_THREAD FALSE
#endif
/** @} */ /** @} */
@ -135,7 +136,9 @@
* @note This is not related to the compiler optimization options. * @note This is not related to the compiler optimization options.
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE #define CH_CFG_OPTIMIZE_SPEED TRUE
#endif
/** @} */ /** @} */
@ -153,7 +156,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE #define CH_CFG_USE_TM TRUE
#endif
/** /**
* @brief Threads registry APIs. * @brief Threads registry APIs.
@ -161,7 +166,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE #define CH_CFG_USE_REGISTRY TRUE
#endif
/** /**
* @brief Threads synchronization APIs. * @brief Threads synchronization APIs.
@ -170,7 +177,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE #define CH_CFG_USE_WAITEXIT TRUE
#endif
/** /**
* @brief Semaphores APIs. * @brief Semaphores APIs.
@ -178,7 +187,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE #define CH_CFG_USE_SEMAPHORES TRUE
#endif
/** /**
* @brief Semaphores queuing mode. * @brief Semaphores queuing mode.
@ -189,7 +200,9 @@
* requirements. * requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @note Requires @p CH_CFG_USE_SEMAPHORES.
*/ */
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
#endif
/** /**
* @brief Mutexes APIs. * @brief Mutexes APIs.
@ -197,7 +210,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE #define CH_CFG_USE_MUTEXES TRUE
#endif
/** /**
* @brief Enables recursive behavior on mutexes. * @brief Enables recursive behavior on mutexes.
@ -207,7 +222,9 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES. * @note Requires @p CH_CFG_USE_MUTEXES.
*/ */
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
#endif
/** /**
* @brief Conditional Variables APIs. * @brief Conditional Variables APIs.
@ -217,7 +234,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES. * @note Requires @p CH_CFG_USE_MUTEXES.
*/ */
#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE #define CH_CFG_USE_CONDVARS TRUE
#endif
/** /**
* @brief Conditional Variables APIs with timeout. * @brief Conditional Variables APIs with timeout.
@ -227,7 +246,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS. * @note Requires @p CH_CFG_USE_CONDVARS.
*/ */
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
#endif
/** /**
* @brief Events Flags APIs. * @brief Events Flags APIs.
@ -235,7 +256,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE #define CH_CFG_USE_EVENTS TRUE
#endif
/** /**
* @brief Events Flags APIs with timeout. * @brief Events Flags APIs with timeout.
@ -245,7 +268,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS. * @note Requires @p CH_CFG_USE_EVENTS.
*/ */
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE #define CH_CFG_USE_EVENTS_TIMEOUT TRUE
#endif
/** /**
* @brief Synchronous Messages APIs. * @brief Synchronous Messages APIs.
@ -254,7 +279,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE #define CH_CFG_USE_MESSAGES TRUE
#endif
/** /**
* @brief Synchronous Messages queuing mode. * @brief Synchronous Messages queuing mode.
@ -265,7 +292,31 @@
* requirements. * requirements.
* @note Requires @p CH_CFG_USE_MESSAGES. * @note Requires @p CH_CFG_USE_MESSAGES.
*/ */
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
@ -275,7 +326,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @note Requires @p CH_CFG_USE_SEMAPHORES.
*/ */
#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE #define CH_CFG_USE_MAILBOXES TRUE
#endif
/** /**
* @brief Core Memory Manager APIs. * @brief Core Memory Manager APIs.
@ -284,7 +337,24 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
@ -296,7 +366,9 @@
* @p CH_CFG_USE_SEMAPHORES. * @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended. * @note Mutexes are recommended.
*/ */
#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE #define CH_CFG_USE_HEAP TRUE
#endif
/** /**
* @brief Memory Pools Allocator APIs. * @brief Memory Pools Allocator APIs.
@ -305,27 +377,64 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE #define CH_CFG_USE_MEMPOOLS TRUE
#endif
/** /**
* @brief Objects FIFOs APIs. * @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included * @details If enabled then the objects FIFOs APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_OBJ_FIFOS)
#define CH_CFG_USE_OBJ_FIFOS TRUE #define CH_CFG_USE_OBJ_FIFOS TRUE
#endif
/** /**
* @brief Dynamic Threads APIs. * @brief Pipes APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the pipes APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#define CH_CFG_USE_DYNAMIC TRUE #if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES TRUE
#endif
/**
* @brief Objects Caches APIs.
* @details If enabled then the objects caches APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif
/** @} */ /** @} */
@ -343,39 +452,60 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_CFG_USE_FACTORY)
#define CH_CFG_USE_FACTORY TRUE #define CH_CFG_USE_FACTORY TRUE
#endif
/** /**
* @brief Maximum length for object names. * @brief Maximum length for object names.
* @details If the specified length is zero then the name is stored by * @details If the specified length is zero then the name is stored by
* pointer but this could have unintended side effects. * pointer but this could have unintended side effects.
*/ */
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
#endif
/** /**
* @brief Enables the registry of generic objects. * @brief Enables the registry of generic objects.
*/ */
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE #define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
#endif
/** /**
* @brief Enables factory for generic buffers. * @brief Enables factory for generic buffers.
*/ */
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE #define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
#endif
/** /**
* @brief Enables factory for semaphores. * @brief Enables factory for semaphores.
*/ */
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
#define CH_CFG_FACTORY_SEMAPHORES TRUE #define CH_CFG_FACTORY_SEMAPHORES TRUE
#endif
/** /**
* @brief Enables factory for mailboxes. * @brief Enables factory for mailboxes.
*/ */
#if !defined(CH_CFG_FACTORY_MAILBOXES)
#define CH_CFG_FACTORY_MAILBOXES TRUE #define CH_CFG_FACTORY_MAILBOXES TRUE
#endif
/** /**
* @brief Enables factory for objects FIFOs. * @brief Enables factory for objects FIFOs.
*/ */
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE #define CH_CFG_FACTORY_OBJ_FIFOS TRUE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
#define CH_CFG_FACTORY_PIPES TRUE
#endif
/** @} */ /** @} */
@ -391,7 +521,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE #define CH_DBG_STATISTICS FALSE
#endif
/** /**
* @brief Debug option, system state check. * @brief Debug option, system state check.
@ -400,7 +532,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE #define CH_DBG_SYSTEM_STATE_CHECK FALSE
#endif
/** /**
* @brief Debug option, parameters checks. * @brief Debug option, parameters checks.
@ -409,7 +543,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE #define CH_DBG_ENABLE_CHECKS FALSE
#endif
/** /**
* @brief Debug option, consistency checks. * @brief Debug option, consistency checks.
@ -419,7 +555,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE #define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/** /**
* @brief Debug option, trace buffer. * @brief Debug option, trace buffer.
@ -427,14 +565,18 @@
* *
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED. * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/ */
#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
#endif
/** /**
* @brief Trace buffer entries. * @brief Trace buffer entries.
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
* different from @p CH_DBG_TRACE_MASK_DISABLED. * different from @p CH_DBG_TRACE_MASK_DISABLED.
*/ */
#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128 #define CH_DBG_TRACE_BUFFER_SIZE 128
#endif
/** /**
* @brief Debug option, stack checks. * @brief Debug option, stack checks.
@ -446,7 +588,9 @@
* @note The default failure mode is to halt the system with the global * @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL. * @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE
#endif
/** /**
* @brief Debug option, stacks initialization. * @brief Debug option, stacks initialization.
@ -456,7 +600,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE #define CH_DBG_FILL_THREADS FALSE
#endif
/** /**
* @brief Debug option, threads profiling. * @brief Debug option, threads profiling.
@ -467,7 +613,9 @@
* @note This debug option is not currently compatible with the * @note This debug option is not currently compatible with the
* tickless mode. * tickless mode.
*/ */
#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE #define CH_DBG_THREADS_PROFILING FALSE
#endif
/** @} */ /** @} */
@ -490,7 +638,7 @@
* @details User initialization code added to the @p chSysInit() function * @details User initialization code added to the @p chSysInit() function
* just before interrupts are enabled globally. * just before interrupts are enabled globally.
*/ */
#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \ #define CH_CFG_SYSTEM_INIT_HOOK() { \
/* Add threads initialization code here.*/ \ /* Add threads initialization code here.*/ \
} }
@ -597,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -28,6 +28,9 @@
#ifndef HALCONF_H #ifndef HALCONF_H
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
/** /**
@ -66,10 +69,10 @@
#endif #endif
/** /**
* @brief Enables the EXT subsystem. * @brief Enables the EFlash subsystem.
*/ */
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) #if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE #define HAL_USE_EFL FALSE
#endif #endif
/** /**
@ -121,13 +124,6 @@
#define HAL_USE_PWM FALSE #define HAL_USE_PWM FALSE
#endif #endif
/**
* @brief Enables the QSPI subsystem.
*/
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
#define HAL_USE_QSPI FALSE
#endif
/** /**
* @brief Enables the RTC subsystem. * @brief Enables the RTC subsystem.
*/ */
@ -156,6 +152,13 @@
#define HAL_USE_SERIAL_USB FALSE #define HAL_USE_SERIAL_USB FALSE
#endif #endif
/**
* @brief Enables the SIO subsystem.
*/
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
#define HAL_USE_SIO FALSE
#endif
/** /**
* @brief Enables the SPI subsystem. * @brief Enables the SPI subsystem.
*/ */
@ -163,6 +166,13 @@
#define HAL_USE_SPI FALSE #define HAL_USE_SPI FALSE
#endif #endif
/**
* @brief Enables the TRNG subsystem.
*/
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
#define HAL_USE_TRNG FALSE
#endif
/** /**
* @brief Enables the UART subsystem. * @brief Enables the UART subsystem.
*/ */
@ -184,6 +194,33 @@
#define HAL_USE_WDG FALSE #define HAL_USE_WDG FALSE
#endif #endif
/**
* @brief Enables the WSPI subsystem.
*/
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
#define HAL_USE_WSPI FALSE
#endif
/*===========================================================================*/
/* PAL driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
#define PAL_USE_CALLBACKS FALSE
#endif
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* ADC driver related settings. */ /* ADC driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -215,6 +252,13 @@
#define CAN_USE_SLEEP_MODE TRUE #define CAN_USE_SLEEP_MODE TRUE
#endif #endif
/**
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
*/
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#define CAN_ENFORCE_USE_CALLBACKS FALSE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* CRY driver related settings. */ /* CRY driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -237,6 +281,26 @@
#define HAL_CRY_ENFORCE_FALLBACK FALSE #define HAL_CRY_ENFORCE_FALLBACK FALSE
#endif #endif
/*===========================================================================*/
/* DAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
#define DAC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* I2C driver related settings. */ /* I2C driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -253,7 +317,7 @@
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Enables an event sources for incoming packets. * @brief Enables the zero-copy API.
*/ */
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE #define MAC_USE_ZERO_COPY FALSE
@ -313,6 +377,20 @@
#define SDC_NICE_WAITING TRUE #define SDC_NICE_WAITING TRUE
#endif #endif
/**
* @brief OCR initialization constant for V20 cards.
*/
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#define SDC_INIT_OCR_V20 0x50FF8000U
#endif
/**
* @brief OCR initialization constant for non-V20 cards.
*/
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/ /*===========================================================================*/
/* SERIAL driver related settings. */ /* SERIAL driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -372,6 +450,14 @@
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#endif #endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
@ -380,6 +466,14 @@
#define SPI_USE_MUTUAL_EXCLUSION TRUE #define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/ /*===========================================================================*/
/* UART driver related settings. */ /* UART driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -412,6 +506,28 @@
#define USB_USE_WAIT FALSE #define USB_USE_WAIT FALSE
#endif #endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#include "halconf_community.h"
#endif /* HALCONF_H */ #endif /* HALCONF_H */
/** @} */ /** @} */

View File

@ -15,7 +15,7 @@
*/ */
/** /**
* @file templates/chconf.h * @file rt/templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it * @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings. * contains the application specific kernel settings.
@ -29,7 +29,7 @@
#define CHCONF_H #define CHCONF_H
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_0_ #define _CHIBIOS_RT_CONF_VER_6_1_
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -42,26 +42,34 @@
* @brief System time counter resolution. * @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32 #define CH_CFG_ST_RESOLUTION 32
#endif
/** /**
* @brief System tick frequency. * @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This * @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit. * setting also defines the system tick time unit.
*/ */
#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#endif
/** /**
* @brief Time intervals data size. * @brief Time intervals data size.
* @note Allowed values are 16, 32 or 64 bits. * @note Allowed values are 16, 32 or 64 bits.
*/ */
#if !defined(CH_CFG_INTERVALS_SIZE)
#define CH_CFG_INTERVALS_SIZE 32 #define CH_CFG_INTERVALS_SIZE 32
#endif
/** /**
* @brief Time types data size. * @brief Time types data size.
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_TIME_TYPES_SIZE)
#define CH_CFG_TIME_TYPES_SIZE 32 #define CH_CFG_TIME_TYPES_SIZE 32
#endif
/** /**
* @brief Time delta constant for the tick-less mode. * @brief Time delta constant for the tick-less mode.
@ -71,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to * The value one is not valid, timeouts are rounded up to
* this value. * this value.
*/ */
#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0 #define CH_CFG_ST_TIMEDELTA 0
#endif
/** @} */ /** @} */
@ -94,20 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and * @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case. * must be set to zero in that case.
*/ */
#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0 #define CH_CFG_TIME_QUANTUM 0
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#define CH_CFG_MEMCORE_SIZE 0
/** /**
* @brief Idle thread automatic spawn suppression. * @brief Idle thread automatic spawn suppression.
@ -116,7 +115,9 @@
* function becomes the idle thread and must implement an * function becomes the idle thread and must implement an
* infinite loop. * infinite loop.
*/ */
#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE #define CH_CFG_NO_IDLE_THREAD FALSE
#endif
/** @} */ /** @} */
@ -135,7 +136,9 @@
* @note This is not related to the compiler optimization options. * @note This is not related to the compiler optimization options.
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE #define CH_CFG_OPTIMIZE_SPEED TRUE
#endif
/** @} */ /** @} */
@ -153,7 +156,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE #define CH_CFG_USE_TM TRUE
#endif
/** /**
* @brief Threads registry APIs. * @brief Threads registry APIs.
@ -161,7 +166,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE #define CH_CFG_USE_REGISTRY TRUE
#endif
/** /**
* @brief Threads synchronization APIs. * @brief Threads synchronization APIs.
@ -170,7 +177,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE #define CH_CFG_USE_WAITEXIT TRUE
#endif
/** /**
* @brief Semaphores APIs. * @brief Semaphores APIs.
@ -178,7 +187,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE #define CH_CFG_USE_SEMAPHORES TRUE
#endif
/** /**
* @brief Semaphores queuing mode. * @brief Semaphores queuing mode.
@ -189,7 +200,9 @@
* requirements. * requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @note Requires @p CH_CFG_USE_SEMAPHORES.
*/ */
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
#endif
/** /**
* @brief Mutexes APIs. * @brief Mutexes APIs.
@ -197,7 +210,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE #define CH_CFG_USE_MUTEXES TRUE
#endif
/** /**
* @brief Enables recursive behavior on mutexes. * @brief Enables recursive behavior on mutexes.
@ -207,7 +222,9 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES. * @note Requires @p CH_CFG_USE_MUTEXES.
*/ */
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
#endif
/** /**
* @brief Conditional Variables APIs. * @brief Conditional Variables APIs.
@ -217,7 +234,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES. * @note Requires @p CH_CFG_USE_MUTEXES.
*/ */
#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE #define CH_CFG_USE_CONDVARS TRUE
#endif
/** /**
* @brief Conditional Variables APIs with timeout. * @brief Conditional Variables APIs with timeout.
@ -227,7 +246,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS. * @note Requires @p CH_CFG_USE_CONDVARS.
*/ */
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
#endif
/** /**
* @brief Events Flags APIs. * @brief Events Flags APIs.
@ -235,7 +256,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE #define CH_CFG_USE_EVENTS TRUE
#endif
/** /**
* @brief Events Flags APIs with timeout. * @brief Events Flags APIs with timeout.
@ -245,7 +268,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS. * @note Requires @p CH_CFG_USE_EVENTS.
*/ */
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE #define CH_CFG_USE_EVENTS_TIMEOUT TRUE
#endif
/** /**
* @brief Synchronous Messages APIs. * @brief Synchronous Messages APIs.
@ -254,7 +279,9 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE #define CH_CFG_USE_MESSAGES TRUE
#endif
/** /**
* @brief Synchronous Messages queuing mode. * @brief Synchronous Messages queuing mode.
@ -265,7 +292,31 @@
* requirements. * requirements.
* @note Requires @p CH_CFG_USE_MESSAGES. * @note Requires @p CH_CFG_USE_MESSAGES.
*/ */
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/** /**
* @brief Mailboxes APIs. * @brief Mailboxes APIs.
@ -275,7 +326,9 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES. * @note Requires @p CH_CFG_USE_SEMAPHORES.
*/ */
#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE #define CH_CFG_USE_MAILBOXES TRUE
#endif
/** /**
* @brief Core Memory Manager APIs. * @brief Core Memory Manager APIs.
@ -284,7 +337,24 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/** /**
* @brief Heap Allocator APIs. * @brief Heap Allocator APIs.
@ -296,7 +366,9 @@
* @p CH_CFG_USE_SEMAPHORES. * @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended. * @note Mutexes are recommended.
*/ */
#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE #define CH_CFG_USE_HEAP TRUE
#endif
/** /**
* @brief Memory Pools Allocator APIs. * @brief Memory Pools Allocator APIs.
@ -305,27 +377,64 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE #define CH_CFG_USE_MEMPOOLS TRUE
#endif
/** /**
* @brief Objects FIFOs APIs. * @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included * @details If enabled then the objects FIFOs APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_OBJ_FIFOS)
#define CH_CFG_USE_OBJ_FIFOS TRUE #define CH_CFG_USE_OBJ_FIFOS TRUE
#endif
/** /**
* @brief Dynamic Threads APIs. * @brief Pipes APIs.
* @details If enabled then the dynamic threads creation APIs are included * @details If enabled then the pipes APIs are included
* in the kernel. * in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#define CH_CFG_USE_DYNAMIC TRUE #if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES TRUE
#endif
/**
* @brief Objects Caches APIs.
* @details If enabled then the objects caches APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES TRUE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES TRUE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS TRUE
#endif
/** @} */ /** @} */
@ -343,39 +452,60 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_CFG_USE_FACTORY)
#define CH_CFG_USE_FACTORY TRUE #define CH_CFG_USE_FACTORY TRUE
#endif
/** /**
* @brief Maximum length for object names. * @brief Maximum length for object names.
* @details If the specified length is zero then the name is stored by * @details If the specified length is zero then the name is stored by
* pointer but this could have unintended side effects. * pointer but this could have unintended side effects.
*/ */
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
#endif
/** /**
* @brief Enables the registry of generic objects. * @brief Enables the registry of generic objects.
*/ */
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE #define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
#endif
/** /**
* @brief Enables factory for generic buffers. * @brief Enables factory for generic buffers.
*/ */
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE #define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
#endif
/** /**
* @brief Enables factory for semaphores. * @brief Enables factory for semaphores.
*/ */
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
#define CH_CFG_FACTORY_SEMAPHORES TRUE #define CH_CFG_FACTORY_SEMAPHORES TRUE
#endif
/** /**
* @brief Enables factory for mailboxes. * @brief Enables factory for mailboxes.
*/ */
#if !defined(CH_CFG_FACTORY_MAILBOXES)
#define CH_CFG_FACTORY_MAILBOXES TRUE #define CH_CFG_FACTORY_MAILBOXES TRUE
#endif
/** /**
* @brief Enables factory for objects FIFOs. * @brief Enables factory for objects FIFOs.
*/ */
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE #define CH_CFG_FACTORY_OBJ_FIFOS TRUE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
#define CH_CFG_FACTORY_PIPES TRUE
#endif
/** @} */ /** @} */
@ -391,7 +521,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE #define CH_DBG_STATISTICS FALSE
#endif
/** /**
* @brief Debug option, system state check. * @brief Debug option, system state check.
@ -400,7 +532,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE #define CH_DBG_SYSTEM_STATE_CHECK FALSE
#endif
/** /**
* @brief Debug option, parameters checks. * @brief Debug option, parameters checks.
@ -409,7 +543,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE #define CH_DBG_ENABLE_CHECKS FALSE
#endif
/** /**
* @brief Debug option, consistency checks. * @brief Debug option, consistency checks.
@ -419,7 +555,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE #define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/** /**
* @brief Debug option, trace buffer. * @brief Debug option, trace buffer.
@ -427,14 +565,18 @@
* *
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED. * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/ */
#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
#endif
/** /**
* @brief Trace buffer entries. * @brief Trace buffer entries.
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
* different from @p CH_DBG_TRACE_MASK_DISABLED. * different from @p CH_DBG_TRACE_MASK_DISABLED.
*/ */
#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128 #define CH_DBG_TRACE_BUFFER_SIZE 128
#endif
/** /**
* @brief Debug option, stack checks. * @brief Debug option, stack checks.
@ -446,7 +588,9 @@
* @note The default failure mode is to halt the system with the global * @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL. * @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE
#endif
/** /**
* @brief Debug option, stacks initialization. * @brief Debug option, stacks initialization.
@ -456,7 +600,9 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE #define CH_DBG_FILL_THREADS FALSE
#endif
/** /**
* @brief Debug option, threads profiling. * @brief Debug option, threads profiling.
@ -467,7 +613,9 @@
* @note This debug option is not currently compatible with the * @note This debug option is not currently compatible with the
* tickless mode. * tickless mode.
*/ */
#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE #define CH_DBG_THREADS_PROFILING FALSE
#endif
/** @} */ /** @} */
@ -490,7 +638,7 @@
* @details User initialization code added to the @p chSysInit() function * @details User initialization code added to the @p chSysInit() function
* just before interrupts are enabled globally. * just before interrupts are enabled globally.
*/ */
#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \ #define CH_CFG_SYSTEM_INIT_HOOK() { \
/* Add threads initialization code here.*/ \ /* Add threads initialization code here.*/ \
} }
@ -597,6 +745,7 @@
/* Trace code here.*/ \ /* Trace code here.*/ \
} }
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -28,6 +28,9 @@
#ifndef HALCONF_H #ifndef HALCONF_H
#define HALCONF_H #define HALCONF_H
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h" #include "mcuconf.h"
/** /**
@ -66,10 +69,10 @@
#endif #endif
/** /**
* @brief Enables the EXT subsystem. * @brief Enables the EFlash subsystem.
*/ */
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) #if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE #define HAL_USE_EFL FALSE
#endif #endif
/** /**
@ -121,13 +124,6 @@
#define HAL_USE_PWM FALSE #define HAL_USE_PWM FALSE
#endif #endif
/**
* @brief Enables the QSPI subsystem.
*/
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
#define HAL_USE_QSPI FALSE
#endif
/** /**
* @brief Enables the RTC subsystem. * @brief Enables the RTC subsystem.
*/ */
@ -156,6 +152,13 @@
#define HAL_USE_SERIAL_USB FALSE #define HAL_USE_SERIAL_USB FALSE
#endif #endif
/**
* @brief Enables the SIO subsystem.
*/
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
#define HAL_USE_SIO FALSE
#endif
/** /**
* @brief Enables the SPI subsystem. * @brief Enables the SPI subsystem.
*/ */
@ -163,6 +166,13 @@
#define HAL_USE_SPI FALSE #define HAL_USE_SPI FALSE
#endif #endif
/**
* @brief Enables the TRNG subsystem.
*/
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
#define HAL_USE_TRNG FALSE
#endif
/** /**
* @brief Enables the UART subsystem. * @brief Enables the UART subsystem.
*/ */
@ -184,6 +194,33 @@
#define HAL_USE_WDG FALSE #define HAL_USE_WDG FALSE
#endif #endif
/**
* @brief Enables the WSPI subsystem.
*/
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
#define HAL_USE_WSPI FALSE
#endif
/*===========================================================================*/
/* PAL driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
#define PAL_USE_CALLBACKS FALSE
#endif
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* ADC driver related settings. */ /* ADC driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -215,6 +252,13 @@
#define CAN_USE_SLEEP_MODE TRUE #define CAN_USE_SLEEP_MODE TRUE
#endif #endif
/**
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
*/
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#define CAN_ENFORCE_USE_CALLBACKS FALSE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* CRY driver related settings. */ /* CRY driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -237,6 +281,26 @@
#define HAL_CRY_ENFORCE_FALLBACK FALSE #define HAL_CRY_ENFORCE_FALLBACK FALSE
#endif #endif
/*===========================================================================*/
/* DAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
#define DAC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/ /*===========================================================================*/
/* I2C driver related settings. */ /* I2C driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -253,7 +317,7 @@
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Enables an event sources for incoming packets. * @brief Enables the zero-copy API.
*/ */
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE #define MAC_USE_ZERO_COPY FALSE
@ -313,6 +377,20 @@
#define SDC_NICE_WAITING TRUE #define SDC_NICE_WAITING TRUE
#endif #endif
/**
* @brief OCR initialization constant for V20 cards.
*/
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#define SDC_INIT_OCR_V20 0x50FF8000U
#endif
/**
* @brief OCR initialization constant for non-V20 cards.
*/
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/ /*===========================================================================*/
/* SERIAL driver related settings. */ /* SERIAL driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -372,6 +450,14 @@
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#endif #endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#endif
/** /**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
@ -380,6 +466,14 @@
#define SPI_USE_MUTUAL_EXCLUSION TRUE #define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/ /*===========================================================================*/
/* UART driver related settings. */ /* UART driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -412,6 +506,28 @@
#define USB_USE_WAIT FALSE #define USB_USE_WAIT FALSE
#endif #endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#include "halconf_community.h"
#endif /* HALCONF_H */ #endif /* HALCONF_H */
/** @} */ /** @} */

File diff suppressed because it is too large Load Diff

View File

@ -1,326 +1,533 @@
/* /*
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/** /**
* @file templates/halconf.h * @file templates/halconf.h
* @brief HAL configuration header. * @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the * @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use * various device drivers from your application. You may also use
* this file in order to override the device drivers default settings. * this file in order to override the device drivers default settings.
* *
* @addtogroup HAL_CONF * @addtogroup HAL_CONF
* @{ * @{
*/ */
#ifndef _HALCONF_H_ #ifndef HALCONF_H
#define _HALCONF_H_ #define HALCONF_H
/*#include "mcuconf.h"*/ #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
/**
* @brief Enables the TM subsystem. #include "mcuconf.h"
*/
#if !defined(HAL_USE_TM) || defined(__DOXYGEN__) /**
#define HAL_USE_TM FALSE * @brief Enables the PAL subsystem.
#endif */
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
/** #define HAL_USE_PAL FALSE
* @brief Enables the PAL subsystem. #endif
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) /**
#define HAL_USE_PAL FALSE * @brief Enables the ADC subsystem.
#endif */
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
/** #define HAL_USE_ADC FALSE
* @brief Enables the ADC subsystem. #endif
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) /**
#define HAL_USE_ADC FALSE * @brief Enables the CAN subsystem.
#endif */
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
/** #define HAL_USE_CAN FALSE
* @brief Enables the CAN subsystem. #endif
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) /**
#define HAL_USE_CAN FALSE * @brief Enables the cryptographic subsystem.
#endif */
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
/** #define HAL_USE_CRY FALSE
* @brief Enables the DAC subsystem. #endif
*/
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) /**
#define HAL_USE_DAC FALSE * @brief Enables the DAC subsystem.
#endif */
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
/** #define HAL_USE_DAC FALSE
* @brief Enables the EXT subsystem. #endif
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) /**
#define HAL_USE_EXT FALSE * @brief Enables the EFlash subsystem.
#endif */
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
/** #define HAL_USE_EFL FALSE
* @brief Enables the GPT subsystem. #endif
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) /**
#define HAL_USE_GPT FALSE * @brief Enables the GPT subsystem.
#endif */
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
/** #define HAL_USE_GPT FALSE
* @brief Enables the I2C subsystem. #endif
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) /**
#define HAL_USE_I2C FALSE * @brief Enables the I2C subsystem.
#endif */
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
/** #define HAL_USE_I2C FALSE
* @brief Enables the I2S subsystem. #endif
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) /**
#define HAL_USE_I2S FALSE * @brief Enables the I2S subsystem.
#endif */
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
/** #define HAL_USE_I2S FALSE
* @brief Enables the ICU subsystem. #endif
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) /**
#define HAL_USE_ICU FALSE * @brief Enables the ICU subsystem.
#endif */
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
/** #define HAL_USE_ICU FALSE
* @brief Enables the MAC subsystem. #endif
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) /**
#define HAL_USE_MAC FALSE * @brief Enables the MAC subsystem.
#endif */
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
/** #define HAL_USE_MAC FALSE
* @brief Enables the MMC_SPI subsystem. #endif
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) /**
#define HAL_USE_MMC_SPI FALSE * @brief Enables the MMC_SPI subsystem.
#endif */
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
/** #define HAL_USE_MMC_SPI FALSE
* @brief Enables the PWM subsystem. #endif
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) /**
#define HAL_USE_PWM FALSE * @brief Enables the PWM subsystem.
#endif */
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
/** #define HAL_USE_PWM FALSE
* @brief Enables the RTC subsystem. #endif
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) /**
#define HAL_USE_RTC FALSE * @brief Enables the RTC subsystem.
#endif */
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
/** #define HAL_USE_RTC FALSE
* @brief Enables the SDC subsystem. #endif
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) /**
#define HAL_USE_SDC FALSE * @brief Enables the SDC subsystem.
#endif */
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
/** #define HAL_USE_SDC FALSE
* @brief Enables the SERIAL subsystem. #endif
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) /**
#define HAL_USE_SERIAL FALSE * @brief Enables the SERIAL subsystem.
#endif */
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
/** #define HAL_USE_SERIAL FALSE
* @brief Enables the SERIAL over USB subsystem. #endif
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) /**
#define HAL_USE_SERIAL_USB FALSE * @brief Enables the SERIAL over USB subsystem.
#endif */
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
/** #define HAL_USE_SERIAL_USB FALSE
* @brief Enables the SPI subsystem. #endif
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) /**
#define HAL_USE_SPI FALSE * @brief Enables the SIO subsystem.
#endif */
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
/** #define HAL_USE_SIO FALSE
* @brief Enables the UART subsystem. #endif
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) /**
#define HAL_USE_UART FALSE * @brief Enables the SPI subsystem.
#endif */
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
/** #define HAL_USE_SPI FALSE
* @brief Enables the USB subsystem. #endif
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) /**
#define HAL_USE_USB FALSE * @brief Enables the TRNG subsystem.
#endif */
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
/*===========================================================================*/ #define HAL_USE_TRNG FALSE
/* ADC driver related settings. */ #endif
/*===========================================================================*/
/**
/** * @brief Enables the UART subsystem.
* @brief Enables synchronous APIs. */
* @note Disabling this option saves both code and data space. #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
*/ #define HAL_USE_UART FALSE
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) #endif
#define ADC_USE_WAIT TRUE
#endif /**
* @brief Enables the USB subsystem.
/** */
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
* @note Disabling this option saves both code and data space. #define HAL_USE_USB FALSE
*/ #endif
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE /**
#endif * @brief Enables the WDG subsystem.
*/
/*===========================================================================*/ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
/* CAN driver related settings. */ #define HAL_USE_WDG FALSE
/*===========================================================================*/ #endif
/** /**
* @brief Sleep mode related APIs inclusion switch. * @brief Enables the WSPI subsystem.
*/ */
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE #define HAL_USE_WSPI FALSE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* I2C driver related settings. */ /* PAL driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Enables the mutual exclusion APIs on the I2C bus. * @brief Enables synchronous APIs.
*/ * @note Disabling this option saves both code and data space.
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) */
#define I2C_USE_MUTUAL_EXCLUSION TRUE #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
#endif #define PAL_USE_CALLBACKS FALSE
#endif
/*===========================================================================*/
/* MAC driver related settings. */ /**
/*===========================================================================*/ * @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
/** */
* @brief Enables an event sources for incoming packets. #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
*/ #define PAL_USE_WAIT FALSE
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) #endif
#define MAC_USE_ZERO_COPY FALSE
#endif /*===========================================================================*/
/* ADC driver related settings. */
/** /*===========================================================================*/
* @brief Enables an event sources for incoming packets.
*/ /**
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) * @brief Enables synchronous APIs.
#define MAC_USE_EVENTS TRUE * @note Disabling this option saves both code and data space.
#endif */
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
/*===========================================================================*/ #define ADC_USE_WAIT TRUE
/* MMC_SPI driver related settings. */ #endif
/*===========================================================================*/
/**
/** * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @brief Delays insertions. * @note Disabling this option saves both code and data space.
* @details If enabled this options inserts delays into the MMC waiting */
* routines releasing some extra CPU time for the threads with #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
* lower priority, this may slow down the driver a bit however. #define ADC_USE_MUTUAL_EXCLUSION TRUE
* This option is recommended also if the SPI driver does not #endif
* use a DMA channel and heavily loads the CPU.
*/ /*===========================================================================*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) /* CAN driver related settings. */
#define MMC_NICE_WAITING TRUE /*===========================================================================*/
#endif
/**
/*===========================================================================*/ * @brief Sleep mode related APIs inclusion switch.
/* SDC driver related settings. */ */
/*===========================================================================*/ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE
/** #endif
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals. /**
*/ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) */
#define SDC_INIT_RETRY 100 #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#endif #define CAN_ENFORCE_USE_CALLBACKS FALSE
#endif
/**
* @brief Include support for MMC cards. /*===========================================================================*/
* @note MMC support is not yet implemented so this option must be kept /* CRY driver related settings. */
* at @p FALSE. /*===========================================================================*/
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) /**
#define SDC_MMC_SUPPORT FALSE * @brief Enables the SW fall-back of the cryptographic driver.
#endif * @details When enabled, this option, activates a fall-back software
* implementation for algorithms not supported by the underlying
/** * hardware.
* @brief Delays insertions. * @note Fall-back implementations may not be present for all algorithms.
* @details If enabled this options inserts delays into the MMC waiting */
* routines releasing some extra CPU time for the threads with #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
* lower priority, this may slow down the driver a bit however. #define HAL_CRY_USE_FALLBACK FALSE
*/ #endif
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE /**
#endif * @brief Makes the driver forcibly use the fall-back implementations.
*/
/*===========================================================================*/ #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
/* SERIAL driver related settings. */ #define HAL_CRY_ENFORCE_FALLBACK FALSE
/*===========================================================================*/ #endif
/** /*===========================================================================*/
* @brief Default bit rate. /* DAC driver related settings. */
* @details Configuration parameter, this is the baud rate selected for the /*===========================================================================*/
* default configuration.
*/ /**
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) * @brief Enables synchronous APIs.
#define SERIAL_DEFAULT_BITRATE 38400 * @note Disabling this option saves both code and data space.
#endif */
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
/** #define DAC_USE_WAIT TRUE
* @brief Serial buffers size. #endif
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application. /**
* @note The default is 64 bytes for both the transmission and receive * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
* buffers. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 32 #define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* SPI driver related settings. */ /* I2C driver related settings. */
/*===========================================================================*/ /*===========================================================================*/
/** /**
* @brief Enables synchronous APIs. * @brief Enables the mutual exclusion APIs on the I2C bus.
* @note Disabling this option saves both code and data space. */
*/ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) #define I2C_USE_MUTUAL_EXCLUSION TRUE
#define SPI_USE_WAIT TRUE #endif
#endif
/*===========================================================================*/
/** /* MAC driver related settings. */
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. /*===========================================================================*/
* @note Disabling this option saves both code and data space.
*/ /**
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) * @brief Enables the zero-copy API.
#define SPI_USE_MUTUAL_EXCLUSION TRUE */
#endif #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE
#endif /* _HALCONF_H_ */ #endif
/** @} */ /**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100
#endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
/**
* @brief OCR initialization constant for V20 cards.
*/
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#define SDC_INIT_OCR_V20 0x50FF8000U
#endif
/**
* @brief OCR initialization constant for non-V20 cards.
*/
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 32
#endif
/*===========================================================================*/
/* SERIAL_USB driver related setting. */
/*===========================================================================*/
/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
/**
* @brief Serial over USB number of buffers.
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE
#endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
/* UART driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
#define UART_USE_WAIT FALSE
#endif
/**
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
/* USB driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
#define USB_USE_WAIT FALSE
#endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#include "halconf_community.h"
#endif /* HALCONF_H */
/** @} */

View File

@ -5,3 +5,7 @@ PORTASM =
PORTINC = ${CHIBIOS_CONTRIB}/os/common/ports/MSP430X \ PORTINC = ${CHIBIOS_CONTRIB}/os/common/ports/MSP430X \
${CHIBIOS_CONTRIB}/os/common/ports/MSP430X/compilers/GCC ${CHIBIOS_CONTRIB}/os/common/ports/MSP430X/compilers/GCC
ALLINC += $(PORTINC)
ALLSRC += $(PORTSRC)
ALLASMSRC += $(PORTASM)

View File

@ -9,3 +9,6 @@ $(CHIBIOS_CONTRIB)/os/common/ext/MSP430/inc
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/ld STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/ld
ALLINC += $(STARTUPINC)
ALLSRC += $(STARTUPSRC)
ALLASMSRC += $(STARTUPASM)

View File

@ -3,3 +3,6 @@ BOARDSRC = ${CHIBIOS_CONTRIB}/os/hal/boards/EXP430FR5969/board.c
# Required include directories # Required include directories
BOARDINC = ${CHIBIOS_CONTRIB}/os/hal/boards/EXP430FR5969 BOARDINC = ${CHIBIOS_CONTRIB}/os/hal/boards/EXP430FR5969
ALLINC += $(BOARDINC)
ALLSRC += $(BOARDSRC)

View File

@ -3,3 +3,7 @@ BOARDSRC = ${CHIBIOS_CONTRIB}/os/hal/boards/EXP430FR6989/board.c
# Required include directories # Required include directories
BOARDINC = ${CHIBIOS_CONTRIB}/os/hal/boards/EXP430FR6989 BOARDINC = ${CHIBIOS_CONTRIB}/os/hal/boards/EXP430FR6989
ALLINC += $(BOARDINC)
ALLSRC += $(BOARDSRC)

View File

@ -9,3 +9,6 @@ PLATFORMSRC = ${CHIBIOS_CONTRIB}/os/hal/ports/MSP430X/hal_lld.c \
# Required include directories # Required include directories
PLATFORMINC = ${CHIBIOS_CONTRIB}/os/hal/ports/MSP430X PLATFORMINC = ${CHIBIOS_CONTRIB}/os/hal/ports/MSP430X
ALLINC += $(PLATFORMINC)
ALLSRC += $(PLATFORMSRC)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -102,13 +102,15 @@ PROJECT = nil
# Imported source files and paths # Imported source files and paths
CHIBIOS = ../../../../../ChibiOS CHIBIOS = ../../../../../ChibiOS
CHIBIOS_CONTRIB = ../../../.. CHIBIOS_CONTRIB = ../../../..
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
# Startup files. # Startup files.
include $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/mk/startup_msp430fr5xxx.mk include $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/mk/startup_msp430fr5xxx.mk
# HAL-OSAL files (optional). # HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR5969/board.mk include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR5969/board.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk
include $(CHIBIOS)/os/hal/osal/nil/osal.mk include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional). # RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk
@ -118,27 +120,18 @@ include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk
LDSCRIPT = $(STARTUPLD)/msp430fr5969.ld LDSCRIPT = $(STARTUPLD)/msp430fr5969.ld
# C sources # C sources
CSRC = $(STARTUPSRC) \ CSRC = $(ALLCSRC) \
$(KERNSRC) \
$(PORTSRC) \
$(OSALSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(TESTSRC) \ $(TESTSRC) \
msp_vectors.c \ msp_vectors.c \
main.c main.c
# C++ sources # C++ sources
CPPSRC = CPPSRC = $(ALLCPPSRC)
# List ASM source files here # List ASM source files here
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) ASMSRC = $(ALLASMSRC)
INCDIR = $(CHIBIOS)/os/license \ INCDIR = $(ALLINC) $(TESTINC)
$(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
# #
# Project, sources and paths # Project, sources and paths

Some files were not shown because too many files have changed in this diff Show More