diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-05 10:11:06 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-05 10:11:06 +0000 |
commit | d54e8eb64d3a79872e55dc246f4adc85d476144f (patch) | |
tree | b3d8b2c21d86ef693d19e7880e0e195f52805313 /os/ports/RC | |
parent | 3da2df07a90526e9085c84ed8fab5e35eb8a68a5 (diff) | |
download | ChibiOS-d54e8eb64d3a79872e55dc246f4adc85d476144f.tar.gz ChibiOS-d54e8eb64d3a79872e55dc246f4adc85d476144f.tar.bz2 ChibiOS-d54e8eb64d3a79872e55dc246f4adc85d476144f.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2005 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/RC')
-rw-r--r-- | os/ports/RC/STM8/chcore.h | 23 |
1 files changed, 23 insertions, 0 deletions
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 <intrins.h>
+/*===========================================================================*/
+/* 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.
|