X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=keyboard%2Fstm32_f103_onekey%2Fchconf.h;h=dfb1f9dfb9e65e2e5d79ec13a9c5c1db3aca79a7;hb=ad1c5594928ce952f5205b0f9aaf3e8c04771336;hp=689d4b3991efdcf06b9424bb39c051a288d7578d;hpb=39c0c27587a76e94996f2f17fef94c8b90c73bf6;p=max%2Ftmk_keyboard.git diff --git a/keyboard/stm32_f103_onekey/chconf.h b/keyboard/stm32_f103_onekey/chconf.h index 689d4b39..dfb1f9df 100644 --- a/keyboard/stm32_f103_onekey/chconf.h +++ b/keyboard/stm32_f103_onekey/chconf.h @@ -25,8 +25,10 @@ * @{ */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ /*===========================================================================*/ /** @@ -46,7 +48,7 @@ * @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 10000 +#define CH_CFG_ST_FREQUENCY 2000 /** * @brief Time delta constant for the tick-less mode. @@ -124,7 +126,7 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ -#define CH_CFG_OPTIMIZE_SPEED FALSE +#define CH_CFG_OPTIMIZE_SPEED TRUE /** @} */ @@ -266,14 +268,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 @@ -281,7 +275,7 @@ * * @note The default is @p TRUE. */ -#define CH_CFG_USE_MEMCORE FALSE +#define CH_CFG_USE_MEMCORE TRUE /** * @brief Heap Allocator APIs. @@ -293,7 +287,7 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ -#define CH_CFG_USE_HEAP FALSE +#define CH_CFG_USE_HEAP TRUE /** * @brief Memory Pools Allocator APIs. @@ -361,12 +355,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_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_ENABLE_TRACE FALSE +#define CH_DBG_TRACE_BUFFER_SIZE 128 /** * @brief Debug option, stack checks. @@ -431,10 +431,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.*/ \ @@ -448,6 +444,20 @@ /* Context switch code here.*/ \ } +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + /** * @brief Idle thread enter hook. * @note This hook is invoked within a critical zone, no OS functions @@ -455,6 +465,7 @@ * @note This macro can be used to activate a power saving mode. */ #define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ } /** @@ -464,6 +475,7 @@ * @note This macro can be used to deactivate a power saving mode. */ #define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ } /** @@ -492,12 +504,21 @@ /* 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.*/ \ +} + /** @} */ /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */