aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/osal/nil/osal.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/osal/nil/osal.h')
-rw-r--r--os/hal/osal/nil/osal.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/os/hal/osal/nil/osal.h b/os/hal/osal/nil/osal.h
index aac0d5e77..34249e74f 100644
--- a/os/hal/osal/nil/osal.h
+++ b/os/hal/osal/nil/osal.h
@@ -29,7 +29,7 @@
#include <stdint.h>
#include <stdbool.h>
-#include "nil.h"
+#include "ch.h"
#if defined(__SPC5_HAL__)
#include "platform.h"
@@ -92,17 +92,17 @@
/**
* @brief Size in bits of the @p systick_t type.
*/
-#define OSAL_ST_RESOLUTION NIL_CFG_ST_RESOLUTION
+#define OSAL_ST_RESOLUTION CH_CFG_ST_RESOLUTION
/**
* @brief Required systick frequency or resolution.
*/
-#define OSAL_ST_FREQUENCY NIL_CFG_ST_FREQUENCY
+#define OSAL_ST_FREQUENCY CH_CFG_ST_FREQUENCY
/**
* @brief Systick mode required by the underlying OS.
*/
-#if (NIL_CFG_ST_TIMEDELTA == 0) || defined(__DOXYGEN__)
+#if (CH_CFG_ST_TIMEDELTA == 0) || defined(__DOXYGEN__)
#define OSAL_ST_MODE OSAL_ST_MODE_PERIODIC
#else
#define OSAL_ST_MODE OSAL_ST_MODE_FREERUNNING
@@ -117,8 +117,12 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if NIL_CFG_USE_EVENTS == FALSE
-#error "OSAL requires NIL_CFG_USE_EVENTS=TRUE"
+#if CH_CFG_USE_SEMAPHORES == FALSE
+#error "OSAL requires CH_CFG_USE_SEMAPHORES=TRUE"
+#endif
+
+#if CH_CFG_USE_EVENTS == FALSE
+#error "OSAL requires CH_CFG_USE_EVENTS=TRUE"
#endif
#if !(OSAL_ST_MODE == OSAL_ST_MODE_NONE) && \
@@ -258,19 +262,17 @@ typedef struct {
*
* @api
*/
-#define osalDbgCheck(c) chDbgAssert(c, "parameter check")
+#define osalDbgCheck(c) chDbgCheck(c)
/**
* @brief I-Class state check.
- * @note Not implemented in this simplified OSAL.
*/
-#define osalDbgCheckClassI() /*chDbgCheckClassI()*/
+#define osalDbgCheckClassI() chDbgCheckClassI()
/**
* @brief S-Class state check.
- * @note Not implemented in this simplified OSAL.
*/
-#define osalDbgCheckClassS() /*chDbgCheckClassS()*/
+#define osalDbgCheckClassS() chDbgCheckClassS()
/** @} */
/**