From 93dd54ecdcfce8ad063a4d951473f110e15c28df Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Fri, 24 Nov 2017 22:23:27 +0100 Subject: Fixed compile errors in demos --- demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile | 4 +++- demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h | 10 ++++++++++ demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c | 6 ++++-- demos/TIVA/RT-TM4C1294-LAUNCHPAD/Makefile | 4 +++- demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h | 10 ++++++++++ demos/TIVA/RT-TM4C1294-LAUNCHPAD/main.c | 6 ++++-- 6 files changed, 34 insertions(+), 6 deletions(-) (limited to 'demos') diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile index b393902..7c0ab70 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile @@ -99,7 +99,9 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). -include $(CHIBIOS)/test/rt/test.mk +include $(CHIBIOS)/test/lib/test.mk +include $(CHIBIOS)/test/rt/rt_test.mk +include $(CHIBIOS)/test/oslib/oslib_test.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/TM4C123xH6.ld diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h index 0d24275..9c9f341 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h @@ -182,6 +182,16 @@ */ #define CH_CFG_USE_MUTEXES TRUE +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + /** * @brief Conditional Variables APIs. * @details If enabled then the conditional variables APIs are included diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c index 2872f89..7feea14 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c @@ -16,7 +16,8 @@ #include "ch.h" #include "hal.h" -#include "ch_test.h" +#include "rt_test_root.h" +#include "oslib_test_root.h" typedef struct led_config { @@ -68,7 +69,8 @@ int main(void) sdStart(&SD1, NULL); if (!palReadLine(LINE_SW2)) { - test_execute((BaseSequentialStream *)&SD1); + test_execute((BaseSequentialStream *)&SD1, &rt_test_suite); + test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite); } ledRed.line = LINE_LED_RED; diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/Makefile b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/Makefile index 2542d28..da83f36 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/Makefile +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/Makefile @@ -99,7 +99,9 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). -include $(CHIBIOS)/test/rt/test.mk +include $(CHIBIOS)/test/lib/test.mk +include $(CHIBIOS)/test/rt/rt_test.mk +include $(CHIBIOS)/test/oslib/oslib_test.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/TM4C129xNC.ld diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h index cc0b2bd..1db198c 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h @@ -182,6 +182,16 @@ */ #define CH_CFG_USE_MUTEXES TRUE +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + /** * @brief Conditional Variables APIs. * @details If enabled then the conditional variables APIs are included diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/main.c b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/main.c index 22082fe..4afc71f 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/main.c +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/main.c @@ -16,7 +16,8 @@ #include "ch.h" #include "hal.h" -#include "ch_test.h" +#include "rt_test_root.h" +#include "oslib_test_root.h" typedef struct led_config { @@ -70,7 +71,8 @@ int main(void) sdStart(&SD1, NULL); if (!palReadLine(LINE_SW1)) { - test_execute((BaseSequentialStream *)&SD1); + test_execute((BaseSequentialStream *)&SD1, &rt_test_suite); + test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite); } led1.line = LINE_LED0; -- cgit v1.2.3 From a59f29723cd59cee72ed323316d968f53b8453e8 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Tue, 27 Feb 2018 20:46:18 +0100 Subject: Updated all chconf.h files --- demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h | 156 ++++++++++++++++----- demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h | 180 +++++++++++++++++++------ demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h | 156 ++++++++++++++++----- 3 files changed, 383 insertions(+), 109 deletions(-) (limited to 'demos') diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h index 9c9f341..7b3b83f 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,19 @@ limitations under the License. */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H #define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_VER_5_0_ @@ -40,6 +51,18 @@ */ #define CH_CFG_ST_FREQUENCY 10000 +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#define CH_CFG_INTERVALS_SIZE 32 + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_TIME_TYPES_SIZE 32 + /** * @brief Time delta constant for the tick-less mode. * @note If this value is zero then the system uses the classic @@ -48,14 +71,7 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** - * @brief Realtime Counter frequency. - * @details Frequency of the system counter used for realtime delays and - * measurements. - */ -#define CH_CFG_RTC_FREQUENCY 80000000 +#define CH_CFG_ST_TIMEDELTA 2 /** @} */ @@ -98,7 +114,8 @@ * @details When this option is activated the function @p chSysInit() * does not spawn the idle thread. The application @p main() * function becomes the idle thread and must implement an - * infinite loop. */ + * infinite loop. + */ #define CH_CFG_NO_IDLE_THREAD FALSE /** @} */ @@ -260,14 +277,6 @@ */ #define CH_CFG_USE_MAILBOXES TRUE -/** - * @brief I/O Queues APIs. - * @details If enabled then the I/O queues APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_QUEUES TRUE - /** * @brief Core Memory Manager APIs. * @details If enabled then the core memory manager APIs are included @@ -298,6 +307,15 @@ */ #define CH_CFG_USE_MEMPOOLS TRUE +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_OBJ_FIFOS TRUE + /** * @brief Dynamic Threads APIs. * @details If enabled then the dynamic threads creation APIs are included @@ -311,6 +329,56 @@ /** @} */ +/*===========================================================================*/ +/** + * @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. + */ +#define CH_CFG_USE_FACTORY TRUE + +/** + * @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. + */ +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 + +/** + * @brief Enables the registry of generic objects. + */ +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +/** + * @brief Enables factory for generic buffers. + */ +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +/** + * @brief Enables factory for semaphores. + */ +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +/** + * @brief Enables factory for mailboxes. + */ +#define CH_CFG_FACTORY_MAILBOXES TRUE + +/** + * @brief Enables factory for objects FIFOs. + */ +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +/** @} */ + /*===========================================================================*/ /** * @name Debug options @@ -355,12 +423,18 @@ /** * @brief Debug option, trace buffer. - * @details If enabled then the context switch circular trace buffer is - * activated. + * @details If enabled then the trace buffer is activated. * - * @note The default is @p FALSE. + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_ENABLE_TRACE FALSE +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 /** * @brief Debug option, stack checks. @@ -404,6 +478,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -413,9 +503,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ @@ -425,10 +515,6 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. - * - * @note It is inserted into lock zone. - * @note It is also invoked when the threads simply return in order to - * terminate. */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -439,7 +525,7 @@ * @details This hook is invoked just before switching between threads. */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* System halt code here.*/ \ + /* Context switch code here.*/ \ } /** @@ -462,7 +548,8 @@ * should be invoked from here. * @note This macro can be used to activate a power saving mode. */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ } /** @@ -471,7 +558,8 @@ * should be invoked from here. * @note This macro can be used to deactivate a power saving mode. */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ } /** @@ -515,6 +603,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */ diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h index 35f9abd..7b3b83f 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,19 @@ limitations under the License. */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H #define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_VER_5_0_ @@ -40,6 +51,18 @@ */ #define CH_CFG_ST_FREQUENCY 10000 +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#define CH_CFG_INTERVALS_SIZE 32 + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_TIME_TYPES_SIZE 32 + /** * @brief Time delta constant for the tick-less mode. * @note If this value is zero then the system uses the classic @@ -48,14 +71,7 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** - * @brief Realtime Counter frequency. - * @details Frequency of the system counter used for realtime delays and - * measurements. - */ -#define CH_CFG_RTC_FREQUENCY 80000000 +#define CH_CFG_ST_TIMEDELTA 2 /** @} */ @@ -98,7 +114,8 @@ * @details When this option is activated the function @p chSysInit() * does not spawn the idle thread. The application @p main() * function becomes the idle thread and must implement an - * infinite loop. */ + * infinite loop. + */ #define CH_CFG_NO_IDLE_THREAD FALSE /** @} */ @@ -182,6 +199,16 @@ */ #define CH_CFG_USE_MUTEXES TRUE +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + /** * @brief Conditional Variables APIs. * @details If enabled then the conditional variables APIs are included @@ -250,14 +277,6 @@ */ #define CH_CFG_USE_MAILBOXES TRUE -/** - * @brief I/O Queues APIs. - * @details If enabled then the I/O queues APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_QUEUES TRUE - /** * @brief Core Memory Manager APIs. * @details If enabled then the core memory manager APIs are included @@ -288,6 +307,15 @@ */ #define CH_CFG_USE_MEMPOOLS TRUE +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_OBJ_FIFOS TRUE + /** * @brief Dynamic Threads APIs. * @details If enabled then the dynamic threads creation APIs are included @@ -301,6 +329,56 @@ /** @} */ +/*===========================================================================*/ +/** + * @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. + */ +#define CH_CFG_USE_FACTORY TRUE + +/** + * @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. + */ +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 + +/** + * @brief Enables the registry of generic objects. + */ +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +/** + * @brief Enables factory for generic buffers. + */ +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +/** + * @brief Enables factory for semaphores. + */ +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +/** + * @brief Enables factory for mailboxes. + */ +#define CH_CFG_FACTORY_MAILBOXES TRUE + +/** + * @brief Enables factory for objects FIFOs. + */ +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +/** @} */ + /*===========================================================================*/ /** * @name Debug options @@ -313,7 +391,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_STATISTICS TRUE +#define CH_DBG_STATISTICS FALSE /** * @brief Debug option, system state check. @@ -322,7 +400,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_SYSTEM_STATE_CHECK TRUE +#define CH_DBG_SYSTEM_STATE_CHECK FALSE /** * @brief Debug option, parameters checks. @@ -331,7 +409,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_ENABLE_CHECKS TRUE +#define CH_DBG_ENABLE_CHECKS FALSE /** * @brief Debug option, consistency checks. @@ -341,16 +419,22 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_ENABLE_ASSERTS TRUE +#define CH_DBG_ENABLE_ASSERTS FALSE /** * @brief Debug option, trace buffer. - * @details If enabled then the context switch circular trace buffer is - * activated. + * @details If enabled then the trace buffer is activated. * - * @note The default is @p FALSE. + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_ENABLE_TRACE TRUE +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 /** * @brief Debug option, stack checks. @@ -362,7 +446,7 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ -#define CH_DBG_ENABLE_STACK_CHECK TRUE +#define CH_DBG_ENABLE_STACK_CHECK FALSE /** * @brief Debug option, stacks initialization. @@ -372,7 +456,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_FILL_THREADS TRUE +#define CH_DBG_FILL_THREADS FALSE /** * @brief Debug option, threads profiling. @@ -383,7 +467,7 @@ * @note This debug option is not currently compatible with the * tickless mode. */ -#define CH_DBG_THREADS_PROFILING TRUE +#define CH_DBG_THREADS_PROFILING FALSE /** @} */ @@ -394,6 +478,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -403,9 +503,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ @@ -415,10 +515,6 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. - * - * @note It is inserted into lock zone. - * @note It is also invoked when the threads simply return in order to - * terminate. */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -429,7 +525,7 @@ * @details This hook is invoked just before switching between threads. */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* System halt code here.*/ \ + /* Context switch code here.*/ \ } /** @@ -452,7 +548,8 @@ * should be invoked from here. * @note This macro can be used to activate a power saving mode. */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ } /** @@ -461,7 +558,8 @@ * should be invoked from here. * @note This macro can be used to deactivate a power saving mode. */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ } /** @@ -505,6 +603,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */ diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h index 1db198c..7b3b83f 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,19 @@ limitations under the License. */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H #define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_VER_5_0_ @@ -40,6 +51,18 @@ */ #define CH_CFG_ST_FREQUENCY 10000 +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#define CH_CFG_INTERVALS_SIZE 32 + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_TIME_TYPES_SIZE 32 + /** * @brief Time delta constant for the tick-less mode. * @note If this value is zero then the system uses the classic @@ -48,14 +71,7 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** - * @brief Realtime Counter frequency. - * @details Frequency of the system counter used for realtime delays and - * measurements. - */ -#define CH_CFG_RTC_FREQUENCY 120000000 +#define CH_CFG_ST_TIMEDELTA 2 /** @} */ @@ -98,7 +114,8 @@ * @details When this option is activated the function @p chSysInit() * does not spawn the idle thread. The application @p main() * function becomes the idle thread and must implement an - * infinite loop. */ + * infinite loop. + */ #define CH_CFG_NO_IDLE_THREAD FALSE /** @} */ @@ -260,14 +277,6 @@ */ #define CH_CFG_USE_MAILBOXES TRUE -/** - * @brief I/O Queues APIs. - * @details If enabled then the I/O queues APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_QUEUES TRUE - /** * @brief Core Memory Manager APIs. * @details If enabled then the core memory manager APIs are included @@ -298,6 +307,15 @@ */ #define CH_CFG_USE_MEMPOOLS TRUE +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_OBJ_FIFOS TRUE + /** * @brief Dynamic Threads APIs. * @details If enabled then the dynamic threads creation APIs are included @@ -311,6 +329,56 @@ /** @} */ +/*===========================================================================*/ +/** + * @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. + */ +#define CH_CFG_USE_FACTORY TRUE + +/** + * @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. + */ +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 + +/** + * @brief Enables the registry of generic objects. + */ +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +/** + * @brief Enables factory for generic buffers. + */ +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +/** + * @brief Enables factory for semaphores. + */ +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +/** + * @brief Enables factory for mailboxes. + */ +#define CH_CFG_FACTORY_MAILBOXES TRUE + +/** + * @brief Enables factory for objects FIFOs. + */ +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +/** @} */ + /*===========================================================================*/ /** * @name Debug options @@ -355,12 +423,18 @@ /** * @brief Debug option, trace buffer. - * @details If enabled then the context switch circular trace buffer is - * activated. + * @details If enabled then the trace buffer is activated. * - * @note The default is @p FALSE. + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_ENABLE_TRACE FALSE +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 /** * @brief Debug option, stack checks. @@ -404,6 +478,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -413,9 +503,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ @@ -425,10 +515,6 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. - * - * @note It is inserted into lock zone. - * @note It is also invoked when the threads simply return in order to - * terminate. */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -439,7 +525,7 @@ * @details This hook is invoked just before switching between threads. */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* System halt code here.*/ \ + /* Context switch code here.*/ \ } /** @@ -462,7 +548,8 @@ * should be invoked from here. * @note This macro can be used to activate a power saving mode. */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ } /** @@ -471,7 +558,8 @@ * should be invoked from here. * @note This macro can be used to deactivate a power saving mode. */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ } /** @@ -515,6 +603,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */ -- cgit v1.2.3 From bf1167e3c6fbb5d02f7d150e3fc4546783aaf1a2 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Tue, 27 Feb 2018 20:52:58 +0100 Subject: Updated all halconf.h files --- demos/TIVA/RT-TM4C123G-LAUNCHPAD/halconf.h | 133 ++++++++++++++++++++++- demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/halconf.h | 135 ++++++++++++++++++++++-- demos/TIVA/RT-TM4C1294-LAUNCHPAD/halconf.h | 133 ++++++++++++++++++++++- 3 files changed, 385 insertions(+), 16 deletions(-) (limited to 'demos') diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/halconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/halconf.h index cd6edf3..313a8e7 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/halconf.h +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,19 @@ limitations under the License. */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H #include "mcuconf.h" @@ -40,6 +51,20 @@ #define HAL_USE_CAN FALSE #endif +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + /** * @brief Enables the EXT subsystem. */ @@ -61,6 +86,13 @@ #define HAL_USE_I2C FALSE #endif +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + /** * @brief Enables the ICU subsystem. */ @@ -89,6 +121,13 @@ #define HAL_USE_PWM FALSE #endif +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + /** * @brief Enables the RTC subsystem. */ @@ -138,6 +177,13 @@ #define HAL_USE_USB FALSE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ @@ -169,6 +215,28 @@ #define CAN_USE_SLEEP_MODE TRUE #endif +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + /*===========================================================================*/ /* I2C driver related settings. */ /*===========================================================================*/ @@ -262,13 +330,36 @@ * @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 64 bytes for both the transmission and receive + * @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. */ /*===========================================================================*/ @@ -289,6 +380,38 @@ #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +/*===========================================================================*/ +/* 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 + +#endif /* HALCONF_H */ /** @} */ diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/halconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/halconf.h index 6e62629..42e69bb 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/halconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,19 @@ limitations under the License. */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H #include "mcuconf.h" @@ -40,6 +51,20 @@ #define HAL_USE_CAN FALSE #endif +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + /** * @brief Enables the EXT subsystem. */ @@ -61,6 +86,13 @@ #define HAL_USE_I2C FALSE #endif +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + /** * @brief Enables the ICU subsystem. */ @@ -89,6 +121,13 @@ #define HAL_USE_PWM FALSE #endif +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + /** * @brief Enables the RTC subsystem. */ @@ -138,6 +177,13 @@ #define HAL_USE_USB FALSE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ @@ -169,6 +215,28 @@ #define CAN_USE_SLEEP_MODE TRUE #endif +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + /*===========================================================================*/ /* I2C driver related settings. */ /*===========================================================================*/ @@ -262,11 +330,34 @@ * @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 64 bytes for both the transmission and receive + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 64 +#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 /*===========================================================================*/ @@ -289,6 +380,38 @@ #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +/*===========================================================================*/ +/* 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 + +#endif /* HALCONF_H */ /** @} */ diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/halconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/halconf.h index cd6edf3..313a8e7 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/halconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,19 @@ limitations under the License. */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H #include "mcuconf.h" @@ -40,6 +51,20 @@ #define HAL_USE_CAN FALSE #endif +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + /** * @brief Enables the EXT subsystem. */ @@ -61,6 +86,13 @@ #define HAL_USE_I2C FALSE #endif +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + /** * @brief Enables the ICU subsystem. */ @@ -89,6 +121,13 @@ #define HAL_USE_PWM FALSE #endif +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + /** * @brief Enables the RTC subsystem. */ @@ -138,6 +177,13 @@ #define HAL_USE_USB FALSE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ @@ -169,6 +215,28 @@ #define CAN_USE_SLEEP_MODE TRUE #endif +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + /*===========================================================================*/ /* I2C driver related settings. */ /*===========================================================================*/ @@ -262,13 +330,36 @@ * @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 64 bytes for both the transmission and receive + * @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. */ /*===========================================================================*/ @@ -289,6 +380,38 @@ #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +/*===========================================================================*/ +/* 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 + +#endif /* HALCONF_H */ /** @} */ -- cgit v1.2.3 From cae865f0b9cab08d3613c81e2db1f760de0ee5f8 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Wed, 28 Feb 2018 18:28:02 +0100 Subject: Changed PAL driver so that TM4C123x devices GPIO blocks always use AHB. --- demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'demos') diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h index 337e2e1..c484826 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h @@ -43,12 +43,6 @@ /* * GPIO driver system settings. */ -#define TIVA_GPIO_GPIOA_USE_AHB TRUE -#define TIVA_GPIO_GPIOB_USE_AHB TRUE -#define TIVA_GPIO_GPIOC_USE_AHB TRUE -#define TIVA_GPIO_GPIOD_USE_AHB TRUE -#define TIVA_GPIO_GPIOE_USE_AHB TRUE -#define TIVA_GPIO_GPIOF_USE_AHB TRUE /* * GPT driver system settings. -- cgit v1.2.3 From 2a01a63f86f4e9856818ddd96e8e1633b3679357 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Fri, 2 Mar 2018 18:40:55 +0100 Subject: Disabled tickless timer for TM4C129x demos. --- demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h | 2 +- demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'demos') diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h index 7b3b83f..400e5ff 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/chconf.h @@ -71,7 +71,7 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -#define CH_CFG_ST_TIMEDELTA 2 +#define CH_CFG_ST_TIMEDELTA 0 /** @} */ diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h index 7b3b83f..400e5ff 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/chconf.h @@ -71,7 +71,7 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -#define CH_CFG_ST_TIMEDELTA 2 +#define CH_CFG_ST_TIMEDELTA 0 /** @} */ -- cgit v1.2.3 From be0446c54977d2012079358e23a56b428614ac08 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Wed, 7 Mar 2018 20:44:42 +0100 Subject: Updated all mcuconf.h files to include PAL IRQ settings. --- demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h | 8 +++++- demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/mcuconf.h | 36 +++++++++++++++++++++++++ demos/TIVA/RT-TM4C1294-LAUNCHPAD/mcuconf.h | 36 +++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) (limited to 'demos') diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h index c484826..f695a4e 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h @@ -41,8 +41,14 @@ SYSCTL_RCC_PWMDIV_8) /* - * GPIO driver system settings. + * PAL driver system settings. */ +#define TIVA_PAL_GPIOA_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOB_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOC_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOD_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOE_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOF_IRQ_PRIORITY 3 /* * GPT driver system settings. diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/mcuconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/mcuconf.h index 81a0747..8ba860d 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/mcuconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/mcuconf.h @@ -53,6 +53,42 @@ #define TIVA_GPT_GPT6A_IRQ_PRIORITY 7 #define TIVA_GPT_GPT7A_IRQ_PRIORITY 7 +/* + * PAL driver system settings. + */ +#define TIVA_PAL_GPIOA_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOB_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOC_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOD_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOE_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOF_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOG_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOH_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOJ_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOK_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOL_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOM_IRQ_PRIORITY 3 +#define TIVA_PAL_GPION_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP0_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP1_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP2_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP3_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP4_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP5_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP6_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP7_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ0_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ1_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ2_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ3_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ4_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ5_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ6_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ7_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOR_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOS_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOT_IRQ_PRIORITY 3 + /* * I2C driver system settings. */ diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/mcuconf.h b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/mcuconf.h index 81a0747..8ba860d 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/mcuconf.h +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/mcuconf.h @@ -53,6 +53,42 @@ #define TIVA_GPT_GPT6A_IRQ_PRIORITY 7 #define TIVA_GPT_GPT7A_IRQ_PRIORITY 7 +/* + * PAL driver system settings. + */ +#define TIVA_PAL_GPIOA_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOB_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOC_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOD_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOE_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOF_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOG_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOH_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOJ_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOK_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOL_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOM_IRQ_PRIORITY 3 +#define TIVA_PAL_GPION_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP0_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP1_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP2_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP3_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP4_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP5_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP6_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOP7_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ0_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ1_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ2_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ3_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ4_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ5_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ6_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOQ7_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOR_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOS_IRQ_PRIORITY 3 +#define TIVA_PAL_GPIOT_IRQ_PRIORITY 3 + /* * I2C driver system settings. */ -- cgit v1.2.3