aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/STM32/pwm_lld.c4
-rw-r--r--os/hal/platforms/STM32/pwm_lld.h4
-rw-r--r--os/hal/templates/meta/driver.c4
-rw-r--r--os/hal/templates/meta/driver.h4
-rw-r--r--os/hal/templates/meta/driver_lld.c4
-rw-r--r--os/hal/templates/meta/driver_lld.h4
6 files changed, 24 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.c b/os/hal/platforms/STM32/pwm_lld.c
index 308556251..894123676 100644
--- a/os/hal/platforms/STM32/pwm_lld.c
+++ b/os/hal/platforms/STM32/pwm_lld.c
@@ -27,6 +27,8 @@
#include "ch.h"
#include "hal.h"
+#if CH_HAL_USE_PWM || defined(__DOXYGEN__)
+
/*===========================================================================*/
/* Low Level Driver exported variables. */
/*===========================================================================*/
@@ -130,4 +132,6 @@ void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) {
}
+#endif /* CH_HAL_USE_PWM */
+
/** @} */
diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h
index 8e57830f6..c5b7cedc6 100644
--- a/os/hal/platforms/STM32/pwm_lld.h
+++ b/os/hal/platforms/STM32/pwm_lld.h
@@ -27,6 +27,8 @@
#ifndef _PWM_LLD_H_
#define _PWM_LLD_H_
+#if CH_HAL_USE_PWM || defined(__DOXYGEN__)
+
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@@ -100,6 +102,8 @@ extern "C" {
}
#endif
+#endif /* CH_HAL_USE_PWM */
+
#endif /* _PWM_LLD_H_ */
/** @} */
diff --git a/os/hal/templates/meta/driver.c b/os/hal/templates/meta/driver.c
index 7fe2f9406..5618a6cb4 100644
--- a/os/hal/templates/meta/driver.c
+++ b/os/hal/templates/meta/driver.c
@@ -27,6 +27,8 @@
#include "ch.h"
#include "hal.h"
+#if CH_HAL_USE_XXX || defined(__DOXYGEN__)
+
/**
* @brief XXX Driver initialization.
*/
@@ -84,4 +86,6 @@ void xxxStop(XXXDriver *xxxp) {
chSysUnlock();
}
+#endif /* CH_HAL_USE_XXX */
+
/** @} */
diff --git a/os/hal/templates/meta/driver.h b/os/hal/templates/meta/driver.h
index 675bc6689..f9a1d52dd 100644
--- a/os/hal/templates/meta/driver.h
+++ b/os/hal/templates/meta/driver.h
@@ -27,6 +27,8 @@
#ifndef _XXX_H_
#define _XXX_H_
+#if CH_HAL_USE_XXX || defined(__DOXYGEN__)
+
/**
* @brief Driver state machine possible states.
*/
@@ -49,6 +51,8 @@ extern "C" {
}
#endif
+#endif /* CH_HAL_USE_XXX */
+
#endif /* _XXX_H_ */
/** @} */
diff --git a/os/hal/templates/meta/driver_lld.c b/os/hal/templates/meta/driver_lld.c
index 0413ffa31..012ef1c56 100644
--- a/os/hal/templates/meta/driver_lld.c
+++ b/os/hal/templates/meta/driver_lld.c
@@ -27,6 +27,8 @@
#include "ch.h"
#include "hal.h"
+#if CH_HAL_USE_XXX || defined(__DOXYGEN__)
+
/*===========================================================================*/
/* Low Level Driver exported variables. */
/*===========================================================================*/
@@ -76,4 +78,6 @@ void xxx_lld_stop(XXXDriver *xxxp) {
}
+#endif /* CH_HAL_USE_XXX */
+
/** @} */
diff --git a/os/hal/templates/meta/driver_lld.h b/os/hal/templates/meta/driver_lld.h
index fe3786244..c2fa670cb 100644
--- a/os/hal/templates/meta/driver_lld.h
+++ b/os/hal/templates/meta/driver_lld.h
@@ -27,6 +27,8 @@
#ifndef _XXX_LLD_H_
#define _XXX_LLD_H_
+#if CH_HAL_USE_XXX || defined(__DOXYGEN__)
+
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@@ -76,6 +78,8 @@ extern "C" {
}
#endif
+#endif /* CH_HAL_USE_XXX */
+
#endif /* _XXX_LLD_H_ */
/** @} */