git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7496 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
493cd18458
commit
ceb9e5e6e8
|
@ -173,7 +173,7 @@ typedef thread_t * thread_reference_t;
|
||||||
typedef uint32_t eventflags_t;
|
typedef uint32_t eventflags_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if !CH_CFG_USE_EVENTS
|
||||||
/**
|
/**
|
||||||
* @brief Type of an event flags object.
|
* @brief Type of an event flags object.
|
||||||
* @note The content of this structure is not part of the API and should
|
* @note The content of this structure is not part of the API and should
|
||||||
|
@ -743,6 +743,7 @@ static inline void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg) {
|
||||||
chThdDequeueAllI(tqp, msg);
|
chThdDequeueAllI(tqp, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @brief Initializes an event flags object.
|
* @brief Initializes an event flags object.
|
||||||
*
|
*
|
||||||
|
@ -754,7 +755,14 @@ static inline void osalEventObjectInit(event_source_t *esp) {
|
||||||
|
|
||||||
chEvtObjectInit(esp);
|
chEvtObjectInit(esp);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void osalEventObjectInit(event_source_t *esp) {
|
||||||
|
|
||||||
|
esp->flags = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @brief Add flags to an event source object.
|
* @brief Add flags to an event source object.
|
||||||
*
|
*
|
||||||
|
@ -768,7 +776,15 @@ static inline void osalEventBroadcastFlagsI(event_source_t *esp,
|
||||||
|
|
||||||
chEvtBroadcastFlagsI(esp, flags);
|
chEvtBroadcastFlagsI(esp, flags);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void osalEventBroadcastFlagsI(event_source_t *esp,
|
||||||
|
eventflags_t flags) {
|
||||||
|
|
||||||
|
esp->flags |= flags;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @brief Add flags to an event source object.
|
* @brief Add flags to an event source object.
|
||||||
*
|
*
|
||||||
|
@ -782,6 +798,14 @@ static inline void osalEventBroadcastFlags(event_source_t *esp,
|
||||||
|
|
||||||
chEvtBroadcastFlags(esp, flags);
|
chEvtBroadcastFlags(esp, flags);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void osalEventBroadcastFlags(event_source_t *esp,
|
||||||
|
eventflags_t flags) {
|
||||||
|
osalSysLock();
|
||||||
|
esp->flags |= flags;
|
||||||
|
osalSysUnlock();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes s @p mutex_t object.
|
* @brief Initializes s @p mutex_t object.
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#if CH_CFG_USE_SEMAPHORES_PRIORITY
|
#if CH_CFG_USE_SEMAPHORES_PRIORITY
|
||||||
#define sem_insert(tp, qp) prio_insert(tp, qp)
|
#define sem_insert(tp, qp) queue_prio_insert(tp, qp)
|
||||||
#else
|
#else
|
||||||
#define sem_insert(tp, qp) queue_insert(tp, qp)
|
#define sem_insert(tp, qp) queue_insert(tp, qp)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,7 +56,9 @@
|
||||||
* @brief Kernel Benchmarks header file
|
* @brief Kernel Benchmarks header file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
|
||||||
static semaphore_t sem1;
|
static semaphore_t sem1;
|
||||||
|
#endif
|
||||||
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
|
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
|
||||||
static mutex_t mtx1;
|
static mutex_t mtx1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -328,6 +330,7 @@ ROMCONST struct testcase testbmk6 = {
|
||||||
bmk6_execute
|
bmk6_execute
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @page test_benchmarks_007 Mass reschedule performance
|
* @page test_benchmarks_007 Mass reschedule performance
|
||||||
*
|
*
|
||||||
|
@ -388,6 +391,7 @@ ROMCONST struct testcase testbmk7 = {
|
||||||
NULL,
|
NULL,
|
||||||
bmk7_execute
|
bmk7_execute
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @page test_benchmarks_008 I/O Round-Robin voluntary reschedule.
|
* @page test_benchmarks_008 I/O Round-Robin voluntary reschedule.
|
||||||
|
@ -532,6 +536,7 @@ ROMCONST struct testcase testbmk10 = {
|
||||||
bmk10_execute
|
bmk10_execute
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @page test_benchmarks_011 Semaphores wait/signal performance
|
* @page test_benchmarks_011 Semaphores wait/signal performance
|
||||||
*
|
*
|
||||||
|
@ -577,6 +582,7 @@ ROMCONST struct testcase testbmk11 = {
|
||||||
NULL,
|
NULL,
|
||||||
bmk11_execute
|
bmk11_execute
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
|
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
|
@ -648,9 +654,11 @@ static void bmk13_execute(void) {
|
||||||
test_print("--- Timer : ");
|
test_print("--- Timer : ");
|
||||||
test_printn(sizeof(virtual_timer_t));
|
test_printn(sizeof(virtual_timer_t));
|
||||||
test_println(" bytes");
|
test_println(" bytes");
|
||||||
|
#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
|
||||||
test_print("--- Semaph: ");
|
test_print("--- Semaph: ");
|
||||||
test_printn(sizeof(semaphore_t));
|
test_printn(sizeof(semaphore_t));
|
||||||
test_println(" bytes");
|
test_println(" bytes");
|
||||||
|
#endif
|
||||||
#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
|
#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
|
||||||
test_print("--- EventS: ");
|
test_print("--- EventS: ");
|
||||||
test_printn(sizeof(event_source_t));
|
test_printn(sizeof(event_source_t));
|
||||||
|
@ -699,13 +707,17 @@ ROMCONST struct testcase * ROMCONST patternbmk[] = {
|
||||||
&testbmk4,
|
&testbmk4,
|
||||||
&testbmk5,
|
&testbmk5,
|
||||||
&testbmk6,
|
&testbmk6,
|
||||||
|
#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
|
||||||
&testbmk7,
|
&testbmk7,
|
||||||
|
#endif
|
||||||
&testbmk8,
|
&testbmk8,
|
||||||
#if CH_CFG_USE_QUEUES || defined(__DOXYGEN__)
|
#if CH_CFG_USE_QUEUES || defined(__DOXYGEN__)
|
||||||
&testbmk9,
|
&testbmk9,
|
||||||
#endif
|
#endif
|
||||||
&testbmk10,
|
&testbmk10,
|
||||||
|
#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
|
||||||
&testbmk11,
|
&testbmk11,
|
||||||
|
#endif
|
||||||
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
|
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
|
||||||
&testbmk12,
|
&testbmk12,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,14 +39,18 @@
|
||||||
* @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) || defined(__DOXIGEN__)
|
||||||
#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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_ST_FREQUENCY 1000
|
#define CH_CFG_ST_FREQUENCY 1000
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Time delta constant for the tick-less mode.
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
@ -56,7 +60,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_ST_TIMEDELTA 0
|
#define CH_CFG_ST_TIMEDELTA 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -79,7 +85,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_TIME_QUANTUM 20
|
#define CH_CFG_TIME_QUANTUM 20
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Managed RAM size.
|
* @brief Managed RAM size.
|
||||||
|
@ -92,7 +100,9 @@
|
||||||
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
* @note Requires @p CH_CFG_USE_MEMCORE.
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_MEMCORE_SIZE) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_MEMCORE_SIZE 0x20000
|
#define CH_CFG_MEMCORE_SIZE 0x20000
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Idle thread automatic spawn suppression.
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
@ -100,7 +110,9 @@
|
||||||
* does not spawn the idle thread. The application @p main()
|
* does not spawn the idle thread. The application @p main()
|
||||||
* 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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -119,7 +131,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -137,7 +151,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_TM) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_TM FALSE
|
#define CH_CFG_USE_TM FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Threads registry APIs.
|
* @brief Threads registry APIs.
|
||||||
|
@ -145,7 +161,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_REGISTRY) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_REGISTRY TRUE
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Threads synchronization APIs.
|
* @brief Threads synchronization APIs.
|
||||||
|
@ -154,7 +172,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_WAITEXIT) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_WAITEXIT TRUE
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Semaphores APIs.
|
* @brief Semaphores APIs.
|
||||||
|
@ -162,7 +182,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_SEMAPHORES) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_SEMAPHORES TRUE
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Semaphores queuing mode.
|
* @brief Semaphores queuing mode.
|
||||||
|
@ -173,7 +195,9 @@
|
||||||
* requirements.
|
* requirements.
|
||||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mutexes APIs.
|
* @brief Mutexes APIs.
|
||||||
|
@ -181,7 +205,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MUTEXES) || defined(__DOXIGEN__)
|
||||||
#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.
|
||||||
|
@ -191,7 +217,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Conditional Variables APIs.
|
* @brief Conditional Variables APIs.
|
||||||
|
@ -201,7 +229,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) || defined(__DOXIGEN__)
|
||||||
#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.
|
||||||
|
@ -211,7 +241,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Events Flags APIs.
|
* @brief Events Flags APIs.
|
||||||
|
@ -219,7 +251,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_EVENTS) || defined(__DOXIGEN__)
|
||||||
#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.
|
||||||
|
@ -229,7 +263,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Synchronous Messages APIs.
|
* @brief Synchronous Messages APIs.
|
||||||
|
@ -238,7 +274,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MESSAGES) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_MESSAGES TRUE
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Synchronous Messages queuing mode.
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
@ -249,7 +287,9 @@
|
||||||
* requirements.
|
* requirements.
|
||||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mailboxes APIs.
|
* @brief Mailboxes APIs.
|
||||||
|
@ -259,7 +299,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_MAILBOXES TRUE
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief I/O Queues APIs.
|
* @brief I/O Queues APIs.
|
||||||
|
@ -267,7 +309,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_QUEUES) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_QUEUES TRUE
|
#define CH_CFG_USE_QUEUES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Core Memory Manager APIs.
|
* @brief Core Memory Manager APIs.
|
||||||
|
@ -276,7 +320,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MEMCORE) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_MEMCORE TRUE
|
#define CH_CFG_USE_MEMCORE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Heap Allocator APIs.
|
* @brief Heap Allocator APIs.
|
||||||
|
@ -288,7 +334,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) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_HEAP TRUE
|
#define CH_CFG_USE_HEAP TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Memory Pools Allocator APIs.
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
@ -297,7 +345,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MEMPOOLS) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Dynamic Threads APIs.
|
* @brief Dynamic Threads APIs.
|
||||||
|
@ -308,7 +358,9 @@
|
||||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_DYNAMIC) || defined(__DOXIGEN__)
|
||||||
#define CH_CFG_USE_DYNAMIC TRUE
|
#define CH_CFG_USE_DYNAMIC TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -324,7 +376,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_DBG_STATISTICS) || defined(__DOXIGEN__)
|
||||||
#define CH_DBG_STATISTICS FALSE
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, system state check.
|
* @brief Debug option, system state check.
|
||||||
|
@ -333,7 +387,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXIGEN__)
|
||||||
#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.
|
||||||
|
@ -342,7 +398,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXIGEN__)
|
||||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, consistency checks.
|
* @brief Debug option, consistency checks.
|
||||||
|
@ -352,7 +410,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXIGEN__)
|
||||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, trace buffer.
|
* @brief Debug option, trace buffer.
|
||||||
|
@ -361,7 +421,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXIGEN__)
|
||||||
#define CH_DBG_ENABLE_TRACE FALSE
|
#define CH_DBG_ENABLE_TRACE FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, stack checks.
|
* @brief Debug option, stack checks.
|
||||||
|
@ -373,7 +435,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) || defined(__DOXIGEN__)
|
||||||
#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.
|
||||||
|
@ -383,7 +447,9 @@
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(CH_DBG_FILL_THREADS) || defined(__DOXIGEN__)
|
||||||
#define CH_DBG_FILL_THREADS FALSE
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, threads profiling.
|
* @brief Debug option, threads profiling.
|
||||||
|
@ -394,7 +460,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) || defined(__DOXIGEN__)
|
||||||
#define CH_DBG_THREADS_PROFILING TRUE
|
#define CH_DBG_THREADS_PROFILING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -34,3 +34,59 @@ function execute_test() {
|
||||||
echo "Default maximum settings"
|
echo "Default maximum settings"
|
||||||
compile
|
compile
|
||||||
execute_test
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_OPTIMIZE_SPEED=FALSE"
|
||||||
|
XDEFS=-DCH_CFG_OPTIMIZE_SPEED=FALSE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_TIME_QUANTUM=0"
|
||||||
|
XDEFS=-DCH_CFG_TIME_QUANTUM=0
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_REGISTRY=FALSE"
|
||||||
|
XDEFS=-DCH_CFG_USE_REGISTRY=FALSE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_SEMAPHORES=FALSE CH_CFG_USE_MAILBOXES=FALSE"
|
||||||
|
XDEFS="-DCH_CFG_USE_SEMAPHORES=FALSE -DCH_CFG_USE_MAILBOXES=FALSE"
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_SEMAPHORES_PRIORITY=TRUE"
|
||||||
|
XDEFS=-DCH_CFG_USE_SEMAPHORES_PRIORITY=TRUE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_MUTEXES=FALSE CH_CFG_USE_CONDVARS=FALSE"
|
||||||
|
XDEFS="-DCH_CFG_USE_MUTEXES=FALSE -DCH_CFG_USE_CONDVARS=FALSE"
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_MUTEXES_RECURSIVE=TRUE"
|
||||||
|
XDEFS=-DCH_CFG_USE_MUTEXES_RECURSIVE=TRUE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_CONDVARS=FALSE"
|
||||||
|
XDEFS=-DCH_CFG_USE_CONDVARS=FALSE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_CONDVARS_TIMEOUT=FALSE"
|
||||||
|
XDEFS=-DCH_CFG_USE_CONDVARS_TIMEOUT=FALSE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_EVENTS=FALSE"
|
||||||
|
XDEFS=-DCH_CFG_USE_EVENTS=FALSE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
echo "CH_CFG_USE_EVENTS_TIMEOUT=FALSE"
|
||||||
|
XDEFS=-DCH_CFG_USE_EVENTS_TIMEOUT=FALSE
|
||||||
|
compile
|
||||||
|
execute_test
|
||||||
|
|
||||||
|
|
|
@ -277,8 +277,11 @@ ROMCONST struct testcase testevt3 = {
|
||||||
NULL,
|
NULL,
|
||||||
evt3_execute
|
evt3_execute
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CH_CFG_USE_EVENTS_TIMEOUT */
|
#endif /* CH_CFG_USE_EVENTS_TIMEOUT */
|
||||||
|
|
||||||
|
#endif /* CH_CFG_USE_EVENTS */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Test sequence for events.
|
* @brief Test sequence for events.
|
||||||
*/
|
*/
|
||||||
|
@ -292,5 +295,3 @@ ROMCONST struct testcase * ROMCONST patternevt[] = {
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CH_CFG_USE_EVENTS */
|
|
||||||
|
|
Loading…
Reference in New Issue