aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/icu.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-05-07 08:11:03 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-05-07 08:11:03 +0000
commitbec915e05274a94f2b1a5e2443f04de826dd1f6e (patch)
treecec2044911766f5dc5a7bd8b8c9ffe0fe81734f8 /os/hal/src/icu.c
parent4afa0b98dff9eac6a94c104acf900e15147d2da3 (diff)
parentb43c71424d201583822b26d13d11f7e3634cb515 (diff)
downloadChibiOS-bec915e05274a94f2b1a5e2443f04de826dd1f6e.tar.gz
ChibiOS-bec915e05274a94f2b1a5e2443f04de826dd1f6e.tar.bz2
ChibiOS-bec915e05274a94f2b1a5e2443f04de826dd1f6e.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6916 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/icu.c')
-rw-r--r--os/hal/src/icu.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/os/hal/src/icu.c b/os/hal/src/icu.c
index 65d5de907..291b6df9a 100644
--- a/os/hal/src/icu.c
+++ b/os/hal/src/icu.c
@@ -26,7 +26,6 @@
* @{
*/
-#include "ch.h"
#include "hal.h"
#if HAL_USE_ICU || defined(__DOXYGEN__)
@@ -86,15 +85,15 @@ void icuObjectInit(ICUDriver *icup) {
*/
void icuStart(ICUDriver *icup, const ICUConfig *config) {
- chDbgCheck((icup != NULL) && (config != NULL), "icuStart");
+ osalDbgCheck((icup != NULL) && (config != NULL));
- chSysLock();
- chDbgAssert((icup->state == ICU_STOP) || (icup->state == ICU_READY),
- "icuStart(), #1", "invalid state");
+ osalSysLock();
+ osalDbgAssert((icup->state == ICU_STOP) || (icup->state == ICU_READY),
+ "invalid state");
icup->config = config;
icu_lld_start(icup);
icup->state = ICU_READY;
- chSysUnlock();
+ osalSysUnlock();
}
/**
@@ -106,14 +105,14 @@ void icuStart(ICUDriver *icup, const ICUConfig *config) {
*/
void icuStop(ICUDriver *icup) {
- chDbgCheck(icup != NULL, "icuStop");
+ osalDbgCheck(icup != NULL);
- chSysLock();
- chDbgAssert((icup->state == ICU_STOP) || (icup->state == ICU_READY),
- "icuStop(), #1", "invalid state");
+ osalSysLock();
+ osalDbgAssert((icup->state == ICU_STOP) || (icup->state == ICU_READY),
+ "invalid state");
icu_lld_stop(icup);
icup->state = ICU_STOP;
- chSysUnlock();
+ osalSysUnlock();
}
/**
@@ -125,13 +124,13 @@ void icuStop(ICUDriver *icup) {
*/
void icuEnable(ICUDriver *icup) {
- chDbgCheck(icup != NULL, "icuEnable");
+ osalDbgCheck(icup != NULL);
- chSysLock();
- chDbgAssert(icup->state == ICU_READY, "icuEnable(), #1", "invalid state");
+ osalSysLock();
+ osalDbgAssert(icup->state == ICU_READY, "invalid state");
icu_lld_enable(icup);
icup->state = ICU_WAITING;
- chSysUnlock();
+ osalSysUnlock();
}
/**
@@ -143,15 +142,15 @@ void icuEnable(ICUDriver *icup) {
*/
void icuDisable(ICUDriver *icup) {
- chDbgCheck(icup != NULL, "icuDisable");
+ osalDbgCheck(icup != NULL);
- chSysLock();
- chDbgAssert((icup->state == ICU_READY) || (icup->state == ICU_WAITING) ||
- (icup->state == ICU_ACTIVE) || (icup->state == ICU_IDLE),
- "icuDisable(), #1", "invalid state");
+ osalSysLock();
+ osalDbgAssert((icup->state == ICU_READY) || (icup->state == ICU_WAITING) ||
+ (icup->state == ICU_ACTIVE) || (icup->state == ICU_IDLE),
+ "invalid state");
icu_lld_disable(icup);
icup->state = ICU_READY;
- chSysUnlock();
+ osalSysUnlock();
}
#endif /* HAL_USE_ICU */