aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/icu.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src/icu.c')
-rw-r--r--os/hal/src/icu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/src/icu.c b/os/hal/src/icu.c
index 3be67448e..c73ea5106 100644
--- a/os/hal/src/icu.c
+++ b/os/hal/src/icu.c
@@ -32,6 +32,10 @@
#if HAL_USE_ICU || defined(__DOXYGEN__)
/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/
@@ -121,6 +125,8 @@ void icuStop(ICUDriver *icup) {
*/
void icuEnable(ICUDriver *icup) {
+ chDbgCheck(icup != NULL, "icuEnable");
+
chSysLock();
chDbgAssert(icup->state == ICU_READY, "icuEnable(), #1", "invalid state");
icu_lld_enable(icup);
@@ -137,6 +143,8 @@ void icuEnable(ICUDriver *icup) {
*/
void icuDisable(ICUDriver *icup) {
+ chDbgCheck(icup != NULL, "icuDisable");
+
chSysLock();
chDbgAssert((icup->state == ICU_READY) || (icup->state == ICU_WAITING) ||
(icup->state == ICU_ACTIVE) || (icup->state == ICU_IDLE),