aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/osal/nil
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-16 10:32:43 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-16 10:32:43 +0000
commitdc5964f59f591bffdbe875cea33b419000cd3568 (patch)
tree5a51f5891342c2c76469962d739d3724fbd9e1a5 /os/hal/osal/nil
parentcf204e72ea5fd6e4be8b3295cb148fde5fdd47d2 (diff)
downloadChibiOS-dc5964f59f591bffdbe875cea33b419000cd3568.tar.gz
ChibiOS-dc5964f59f591bffdbe875cea33b419000cd3568.tar.bz2
ChibiOS-dc5964f59f591bffdbe875cea33b419000cd3568.zip
RT4 and NIL2 merged. All demos and test applications to be updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8901 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/osal/nil')
-rw-r--r--os/hal/osal/nil/osal.c4
-rw-r--r--os/hal/osal/nil/osal.h24
2 files changed, 15 insertions, 13 deletions
diff --git a/os/hal/osal/nil/osal.c b/os/hal/osal/nil/osal.c
index f1d8c5e2a..e33747149 100644
--- a/os/hal/osal/nil/osal.c
+++ b/os/hal/osal/nil/osal.c
@@ -73,7 +73,7 @@ void osalThreadDequeueNextI(threads_queue_t *tqp, msg_t msg) {
}
tp++;
- chDbgAssert(tp < &nil.threads[NIL_CFG_NUM_THREADS],
+ chDbgAssert(tp < &nil.threads[CH_CFG_NUM_THREADS],
"pointer out of range");
}
}
@@ -97,7 +97,7 @@ void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg) {
tp = nil.threads;
while (cnt < (cnt_t)0) {
- chDbgAssert(tp < &nil.threads[NIL_CFG_NUM_THREADS],
+ chDbgAssert(tp < &nil.threads[CH_CFG_NUM_THREADS],
"pointer out of range");
/* Is this thread waiting on this semaphore?*/
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()
/** @} */
/**