diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-17 11:52:50 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-17 11:52:50 +0000 |
commit | 155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1 (patch) | |
tree | cb27035ab0b6a7c157f992d9edb6a2c7c5d669e9 /os/hal | |
parent | 120b97e07051b35a67be2a173b51b7edc2a0ae19 (diff) | |
download | ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.gz ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.bz2 ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6169 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/osal/chibios/osal.c | 29 | ||||
-rw-r--r-- | os/hal/osal/chibios/osal.h | 26 | ||||
-rw-r--r-- | os/hal/platforms/STM32/SPIv2/spi_lld.h | 2 | ||||
-rw-r--r-- | os/hal/platforms/STM32/USARTv2/uart_lld.h | 2 |
4 files changed, 26 insertions, 33 deletions
diff --git a/os/hal/osal/chibios/osal.c b/os/hal/osal/chibios/osal.c index ed291880b..52fc27041 100644 --- a/os/hal/osal/chibios/osal.c +++ b/os/hal/osal/chibios/osal.c @@ -36,13 +36,6 @@ /* Module exported variables. */
/*===========================================================================*/
-/**
- * @brief Pointer to a halt error message.
- * @note The message is meant to be retrieved by the debugger after the
- * system halt caused by an unexpected error.
- */
-const char *osal_halt_msg;
-
/*===========================================================================*/
/* Module local types. */
/*===========================================================================*/
@@ -59,26 +52,4 @@ const char *osal_halt_msg; /* Module exported functions. */
/*===========================================================================*/
-/**
- * @brief OSAL module initialization.
- *
- * @api
- */
-void osalInit(void) {
-
-}
-
-/**
- * @brief System halt with error message.
- *
- * @param[in] reason the halt message pointer
- *
- * @api
- */
-void osalSysHalt(const char *reason) {
-
- osal_halt_msg = reason;
- chSysHalt();
-}
-
/** @} */
diff --git a/os/hal/osal/chibios/osal.h b/os/hal/osal/chibios/osal.h index b3d0fae2b..3633a1f02 100644 --- a/os/hal/osal/chibios/osal.h +++ b/os/hal/osal/chibios/osal.h @@ -55,6 +55,7 @@ #define OSAL_FAILED TRUE
/** @} */
+#if 0
/**
* @name Messages
* @{
@@ -63,6 +64,7 @@ #define MSG_RESET RDY_RESET
#define MSG_TIMEOUT RDY_TIMEOUT
/** @} */
+#endif
#if 0
/**
@@ -257,8 +259,7 @@ typedef struct { #ifdef __cplusplus
extern "C" {
#endif
- void osalInit(void);
- void osalSysHalt(const char *reason);
+
#ifdef __cplusplus
}
#endif
@@ -268,6 +269,27 @@ extern "C" { /*===========================================================================*/
/**
+ * @brief OSAL module initialization.
+ *
+ * @api
+ */
+static inline void osalInit(void) {
+
+}
+
+/**
+ * @brief System halt with error message.
+ *
+ * @param[in] reason the halt message pointer
+ *
+ * @api
+ */
+static inline void osalSysHalt(const char *reason) {
+
+ chSysHalt(reason);
+}
+
+/**
* @brief Enters a critical zone from thread context.
* @note This function cannot be used for reentrant critical zones.
*
diff --git a/os/hal/platforms/STM32/SPIv2/spi_lld.h b/os/hal/platforms/STM32/SPIv2/spi_lld.h index fc2b39fa5..9f06fa5e5 100644 --- a/os/hal/platforms/STM32/SPIv2/spi_lld.h +++ b/os/hal/platforms/STM32/SPIv2/spi_lld.h @@ -121,7 +121,7 @@ * @brief SPI DMA error hook.
*/
#if !defined(STM32_SPI_DMA_ERROR_HOOK) || defined(__DOXYGEN__)
-#define STM32_SPI_DMA_ERROR_HOOK(spip) chSysHalt()
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
#endif
#if STM32_ADVANCED_DMA || defined(__DOXYGEN__)
diff --git a/os/hal/platforms/STM32/USARTv2/uart_lld.h b/os/hal/platforms/STM32/USARTv2/uart_lld.h index 6d44af0ba..c34123aca 100644 --- a/os/hal/platforms/STM32/USARTv2/uart_lld.h +++ b/os/hal/platforms/STM32/USARTv2/uart_lld.h @@ -123,7 +123,7 @@ * error can only happen because programming errors.
*/
#if !defined(STM32_UART_DMA_ERROR_HOOK) || defined(__DOXYGEN__)
-#define STM32_UART_DMA_ERROR_HOOK(uartp) chSysHalt()
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
#endif
#if STM32_ADVANCED_DMA || defined(__DOXYGEN__)
|