From d54e8eb64d3a79872e55dc246f4adc85d476144f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 5 Jun 2010 10:11:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2005 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/RC/STM8/chcore.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'os/ports/RC') diff --git a/os/ports/RC/STM8/chcore.h b/os/ports/RC/STM8/chcore.h index c4f490edc..bc6d43971 100644 --- a/os/ports/RC/STM8/chcore.h +++ b/os/ports/RC/STM8/chcore.h @@ -30,6 +30,21 @@ #include +/*===========================================================================*/ +/* Port configurable parameters. */ +/*===========================================================================*/ + +/** + * @brief Enables the use of the WFI instruction in the idle thread loop. + */ +#ifndef STM8_ENABLE_WFI_IDLE +#define STM8_ENABLE_WFI_IDLE FALSE +#endif + +/*===========================================================================*/ +/* Port exported info. */ +/*===========================================================================*/ + /** * @brief Unique macro for the implemented architecture. */ @@ -40,6 +55,10 @@ */ #define CH_ARCHITECTURE_NAME "STM8" +/*===========================================================================*/ +/* Port implementation part. */ +/*===========================================================================*/ + /** * @brief Base type for stack alignment. * @note No alignment constraints so uint8_t. @@ -250,7 +269,11 @@ struct stm8_startctx { * @brief Enters an architecture-dependent halt mode. * @note Implemented with the specific "wfi" instruction. */ +#if STM8_ENABLE_WFI_IDLE || defined(__DOXYGEN__) #define port_wait_for_interrupt() _wfi_() +#else +#define port_wait_for_interrupt() +#endif /** * @brief Performs a context switch between two threads. -- cgit v1.2.3