diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/stm32/chconf.h | |
parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) |
clang-format changes
Diffstat (limited to 'quantum/stm32/chconf.h')
-rw-r--r-- | quantum/stm32/chconf.h | 132 |
1 files changed, 60 insertions, 72 deletions
diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h index 1d9f12ff1f..f7b1b077d3 100644 --- a/quantum/stm32/chconf.h +++ b/quantum/stm32/chconf.h @@ -26,9 +26,9 @@ */ #ifndef CHCONF_H -#define CHCONF_H +# define CHCONF_H -#define _CHIBIOS_RT_CONF_ +# define _CHIBIOS_RT_CONF_ /*===========================================================================*/ /** @@ -41,14 +41,14 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ -#define CH_CFG_ST_RESOLUTION 32 +# define CH_CFG_ST_RESOLUTION 32 /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#define CH_CFG_ST_FREQUENCY 100000 +# define CH_CFG_ST_FREQUENCY 100000 /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +58,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 2 /** @} */ @@ -81,7 +81,7 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ -#define CH_CFG_TIME_QUANTUM 0 +# define CH_CFG_TIME_QUANTUM 0 /** * @brief Managed RAM size. @@ -94,7 +94,7 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ -#define CH_CFG_MEMCORE_SIZE 0 +# define CH_CFG_MEMCORE_SIZE 0 /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +103,7 @@ * function becomes the idle thread and must implement an * infinite loop. */ -#define CH_CFG_NO_IDLE_THREAD FALSE +# define CH_CFG_NO_IDLE_THREAD FALSE /** @} */ @@ -122,7 +122,7 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ -#define CH_CFG_OPTIMIZE_SPEED TRUE +# define CH_CFG_OPTIMIZE_SPEED TRUE /** @} */ @@ -140,7 +140,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_TM TRUE +# define CH_CFG_USE_TM TRUE /** * @brief Threads registry APIs. @@ -148,7 +148,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_REGISTRY TRUE +# define CH_CFG_USE_REGISTRY TRUE /** * @brief Threads synchronization APIs. @@ -157,7 +157,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_WAITEXIT TRUE +# define CH_CFG_USE_WAITEXIT TRUE /** * @brief Semaphores APIs. @@ -165,7 +165,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_SEMAPHORES TRUE +# define CH_CFG_USE_SEMAPHORES TRUE /** * @brief Semaphores queuing mode. @@ -176,7 +176,7 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE /** * @brief Mutexes APIs. @@ -184,7 +184,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_MUTEXES TRUE +# define CH_CFG_USE_MUTEXES TRUE /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +194,7 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE /** * @brief Conditional Variables APIs. @@ -204,7 +204,7 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ -#define CH_CFG_USE_CONDVARS TRUE +# define CH_CFG_USE_CONDVARS TRUE /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +214,7 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE /** * @brief Events Flags APIs. @@ -222,7 +222,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_EVENTS TRUE +# define CH_CFG_USE_EVENTS TRUE /** * @brief Events Flags APIs with timeout. @@ -232,7 +232,7 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +# define CH_CFG_USE_EVENTS_TIMEOUT TRUE /** * @brief Synchronous Messages APIs. @@ -241,7 +241,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_MESSAGES TRUE +# define CH_CFG_USE_MESSAGES TRUE /** * @brief Synchronous Messages queuing mode. @@ -252,7 +252,7 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ -#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +# define CH_CFG_USE_MESSAGES_PRIORITY TRUE /** * @brief Mailboxes APIs. @@ -262,7 +262,7 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -#define CH_CFG_USE_MAILBOXES TRUE +# define CH_CFG_USE_MAILBOXES TRUE /** * @brief Core Memory Manager APIs. @@ -271,7 +271,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_MEMCORE TRUE +# define CH_CFG_USE_MEMCORE TRUE /** * @brief Heap Allocator APIs. @@ -283,7 +283,7 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ -#define CH_CFG_USE_HEAP TRUE +# define CH_CFG_USE_HEAP TRUE /** * @brief Memory Pools Allocator APIs. @@ -292,7 +292,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_MEMPOOLS TRUE +# define CH_CFG_USE_MEMPOOLS TRUE /** * @brief Dynamic Threads APIs. @@ -303,7 +303,7 @@ * @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 +# define CH_CFG_USE_DYNAMIC TRUE /** @} */ @@ -319,7 +319,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_STATISTICS FALSE +# define CH_DBG_STATISTICS FALSE /** * @brief Debug option, system state check. @@ -328,7 +328,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_SYSTEM_STATE_CHECK FALSE +# define CH_DBG_SYSTEM_STATE_CHECK FALSE /** * @brief Debug option, parameters checks. @@ -337,7 +337,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_ENABLE_CHECKS FALSE +# define CH_DBG_ENABLE_CHECKS FALSE /** * @brief Debug option, consistency checks. @@ -347,7 +347,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_ENABLE_ASSERTS FALSE +# define CH_DBG_ENABLE_ASSERTS FALSE /** * @brief Debug option, trace buffer. @@ -355,14 +355,14 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +# 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 +# define CH_DBG_TRACE_BUFFER_SIZE 128 /** * @brief Debug option, stack checks. @@ -374,7 +374,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 TRUE /** * @brief Debug option, stacks initialization. @@ -384,7 +384,7 @@ * * @note The default is @p FALSE. */ -#define CH_DBG_FILL_THREADS FALSE +# define CH_DBG_FILL_THREADS FALSE /** * @brief Debug option, threads profiling. @@ -395,7 +395,7 @@ * @note This debug option is not currently compatible with the * tickless mode. */ -#define CH_DBG_THREADS_PROFILING FALSE +# define CH_DBG_THREADS_PROFILING FALSE /** @} */ @@ -410,8 +410,7 @@ * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ +# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/ /** * @brief Threads initialization hook. @@ -420,39 +419,34 @@ * @note It is invoked from within @p chThdInit() and implicitly from all * the threads creation APIs. */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} +# define CH_CFG_THREAD_INIT_HOOK(tp) \ + { /* Add 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) { \ - /* Add threads finalization code here.*/ \ -} +# define CH_CFG_THREAD_EXIT_HOOK(tp) \ + { /* Add threads finalization code here.*/ } /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} +# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ + { /* Context switch code here.*/ } /** * @brief ISR enter hook. */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} +# define CH_CFG_IRQ_PROLOGUE_HOOK() \ + { /* IRQ prologue code here.*/ } /** * @brief ISR exit hook. */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} +# define CH_CFG_IRQ_EPILOGUE_HOOK() \ + { /* IRQ epilogue code here.*/ } /** * @brief Idle thread enter hook. @@ -460,9 +454,8 @@ * should be invoked from here. * @note This macro can be used to activate a power saving mode. */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} +# define CH_CFG_IDLE_ENTER_HOOK() \ + { /* Idle-enter code here.*/ } /** * @brief Idle thread leave hook. @@ -470,44 +463,39 @@ * should be invoked from here. * @note This macro can be used to deactivate a power saving mode. */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} +# define CH_CFG_IDLE_LEAVE_HOOK() \ + { /* Idle-leave code here.*/ } /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} +# define CH_CFG_IDLE_LOOP_HOOK() \ + { /* Idle loop code here.*/ } /** * @brief System tick event hook. * @details This hook is invoked in the system tick handler immediately * after processing the virtual timers queue. */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} +# define CH_CFG_SYSTEM_TICK_HOOK() \ + { /* System tick event code here.*/ } /** * @brief System halt hook. * @details This hook is invoked in case to a system halting error before * the system is halted. */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} +# define CH_CFG_SYSTEM_HALT_HOOK(reason) \ + { /* System halt code here.*/ } /** * @brief Trace hook. * @details This hook is invoked each time a new record is written in the * trace buffer. */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} +# define CH_CFG_TRACE_HOOK(tep) \ + { /* Trace code here.*/ } /** @} */ @@ -515,6 +503,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* CHCONF_H */ +#endif /* CHCONF_H */ /** @} */ |