aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-08 15:33:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-08 15:33:39 +0000
commit03ee1dcc181977a44af9a43906fb1d41055ab713 (patch)
tree7fff35cf0c7e866dadf740e466345cf7410e8187
parentcbbacdb239211fc33b0423b1213d2e58ac1692da (diff)
downloadChibiOS-03ee1dcc181977a44af9a43906fb1d41055ab713.tar.gz
ChibiOS-03ee1dcc181977a44af9a43906fb1d41055ab713.tar.bz2
ChibiOS-03ee1dcc181977a44af9a43906fb1d41055ab713.zip
Updated reports.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1395 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/ARMCM3-STM32F103-GCC/halconf.h17
-rw-r--r--docs/reports/AT91SAM7X-48-ARM.txt6
-rw-r--r--docs/reports/AT91SAM7X-48-THUMB.txt4
-rw-r--r--docs/reports/ATmega128-16.txt193
-rw-r--r--docs/reports/LPC2148-48-ARM.txt16
-rw-r--r--docs/reports/LPC2148-48-THUMB.txt18
-rw-r--r--docs/reports/STM32F103-48.txt8
-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
13 files changed, 188 insertions, 98 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/halconf.h b/demos/ARMCM3-STM32F103-GCC/halconf.h
index 2faba92d8..4e2e694c4 100644
--- a/demos/ARMCM3-STM32F103-GCC/halconf.h
+++ b/demos/ARMCM3-STM32F103-GCC/halconf.h
@@ -20,10 +20,18 @@
/**
* @file templates/halconf.h
* @brief HAL configuration header.
- * @addtogroup HAL
+ * @addtogroup HAL_CONF
* @{
*/
+/*
+ * HAL configuration file, this file allows to enable or disable the various
+ * device drivers from your application. You may also use this file in order
+ * to change the device drivers settings found in the low level drivers
+ * headers, just define here the new settings and those will override the
+ * defaults defined in the LLD headers.
+ */
+
#ifndef _HALCONF_H_
#define _HALCONF_H_
@@ -56,6 +64,13 @@
#endif
/**
+ * @brief Enables the PWM subsystem.
+ */
+#if !defined(CH_HAL_USE_PWM) || defined(__DOXYGEN__)
+#define CH_HAL_USE_PWM FALSE
+#endif
+
+/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(CH_HAL_USE_SERIAL) || defined(__DOXYGEN__)
diff --git a/docs/reports/AT91SAM7X-48-ARM.txt b/docs/reports/AT91SAM7X-48-ARM.txt
index 477e05a4b..ad122d674 100644
--- a/docs/reports/AT91SAM7X-48-ARM.txt
+++ b/docs/reports/AT91SAM7X-48-ARM.txt
@@ -5,9 +5,9 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
*** ChibiOS/RT test suite
***
-*** Kernel: 1.3.3unstable
+*** Kernel: 1.3.5unstable
*** Architecture: ARM7TDMI
-*** GCC Version: 4.4.1
+*** GCC Version: 4.4.2
----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
@@ -117,7 +117,7 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
---- Score : 258040 reschedulations/S, 258040 ctxswc/S
+--- Score : 258028 reschedulations/S, 258028 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
diff --git a/docs/reports/AT91SAM7X-48-THUMB.txt b/docs/reports/AT91SAM7X-48-THUMB.txt
index dcc5aaf91..5dc43e3e9 100644
--- a/docs/reports/AT91SAM7X-48-THUMB.txt
+++ b/docs/reports/AT91SAM7X-48-THUMB.txt
@@ -5,9 +5,9 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
*** ChibiOS/RT test suite
***
-*** Kernel: 1.3.3unstable
+*** Kernel: 1.3.5unstable
*** Architecture: ARM7TDMI
-*** GCC Version: 4.4.1
+*** GCC Version: 4.4.2
----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
diff --git a/docs/reports/ATmega128-16.txt b/docs/reports/ATmega128-16.txt
index 6166b23b3..ff5a4a97d 100644
--- a/docs/reports/ATmega128-16.txt
+++ b/docs/reports/ATmega128-16.txt
@@ -1,102 +1,153 @@
***************************************************************************
-Kernel: ChibiOS/RT 1.2.0 stable
-Compiler: GCC 4.3.0 (WinAVR 10.06.2008)
Options: -O2
Settings: F_CPU=16000000
***************************************************************************
----------------------------------------------------------------------------
---- Test Case 1.1 (Ready List, priority enqueuing test #1)
+*** ChibiOS/RT test suite
+***
+*** Kernel: 1.3.5unstable
+*** Architecture: AVR
+*** GCC Version: 4.3.0
+
+----------------------------------------------------------------------------
+--- Test Case 1.1 (Threads, enqueuing test #1)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 1.2 (Ready List, priority enqueuing test #2)
+----------------------------------------------------------------------------
+--- Test Case 1.2 (Threads, enqueuing test #2)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 2.1 (Semaphores, enqueuing test)
+----------------------------------------------------------------------------
+--- Test Case 1.3 (Threads, priority change)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 2.2 (Semaphores, timeout test)
+----------------------------------------------------------------------------
+--- Test Case 1.4 (Threads, delays)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 3.1 (Mutexes, priority enqueuing test)
+----------------------------------------------------------------------------
+--- Test Case 2.1 (Semaphores, enqueuing)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 3.2 (Mutexes, priority inheritance, simple case)
---- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 3.3 (Mutexes, priority inheritance, complex case)
+----------------------------------------------------------------------------
+--- Test Case 2.2 (Semaphores, timeout)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 3.4 (CondVar, signal test)
+----------------------------------------------------------------------------
+--- Test Case 2.3 (Semaphores, atomic signal-wait)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 3.5 (CondVar, broadcast test)
---- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 3.6 (CondVar, inheritance boost test)
---- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 4.1 (Messages, dispatch test)
+----------------------------------------------------------------------------
+--- Test Case 3.1 (Mutexes, priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 5.1 (Mailboxes, queuing and timeouts)
+----------------------------------------------------------------------------
+--- Test Case 3.2 (Mutexes, priority inheritance, simple case)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 6.1 (Events, wait and broadcast)
+----------------------------------------------------------------------------
+--- Test Case 3.3 (Mutexes, priority inheritance, complex case)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 7.1 (Heap, allocation and fragmentation test)
---- Size : 508 bytes, not fragmented
+----------------------------------------------------------------------------
+--- Test Case 3.4 (Mutexes, priority return)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 8.1 (Memory Pools, allocation and enqueuing test)
+----------------------------------------------------------------------------
+--- Test Case 3.5 (Mutexes, status)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 9.1 (Dynamic APIs, threads creation from heap)
+----------------------------------------------------------------------------
+--- Test Case 3.6 (CondVar, signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 9.2 (Dynamic APIs, threads creation from memory pool)
+----------------------------------------------------------------------------
+--- Test Case 3.7 (CondVar, broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.1 (Benchmark, context switch #1, optimal)
---- Score : 30833 msgs/S, 61666 ctxswc/S
+----------------------------------------------------------------------------
+--- Test Case 3.8 (CondVar, boost test)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.2 (Benchmark, context switch #2, empty ready list)
---- Score : 24601 msgs/S, 49202 ctxswc/S
+----------------------------------------------------------------------------
+--- Test Case 4.1 (Messages, loop)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.3 (Benchmark, context switch #3, 4 threads in ready list)
---- Score : 24601 msgs/S, 49202 ctxswc/S
+----------------------------------------------------------------------------
+--- Test Case 5.1 (Mailboxes, queuing and timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.4 (Benchmark, threads creation/termination, worst case)
---- Score : 20979 threads/S
+----------------------------------------------------------------------------
+--- Test Case 6.1 (Events, registration and dispatch)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.5 (Benchmark, threads creation/termination, optimal)
---- Score : 26947 threads/S
+----------------------------------------------------------------------------
+--- Test Case 6.2 (Events, wait and broadcast)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.6 (Benchmark, mass reschedulation, 5 threads)
---- Score : 7793 reschedulations/S, 46758 ctxswc/S
+----------------------------------------------------------------------------
+--- Test Case 6.3 (Events, timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.7 (Benchmark, I/O Queues throughput)
---- Score : 84048 bytes/S
+----------------------------------------------------------------------------
+--- Test Case 7.1 (Heap, allocation and fragmentation test)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.8 (Benchmark, virtual timers set/reset)
---- Score : 81556 timers/S
+----------------------------------------------------------------------------
+--- Test Case 8.1 (Memory Pools, queue/dequeue)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.9 (Benchmark, semaphores wait/signal)
---- Score : 224416 wait+signal/S
+----------------------------------------------------------------------------
+--- Test Case 9.1 (Dynamic APIs, threads creation from heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
---- Test Case 10.10 (Benchmark, mutexes lock/unlock)
---- Score : 119412 lock+unlock/S
+----------------------------------------------------------------------------
+--- Test Case 9.2 (Dynamic APIs, threads creation from memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
+----------------------------------------------------------------------------
+--- Test Case 10.1 (Queues, input queues)
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 10.2 (Queues, output queues)
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.1 (Benchmark, messages #1)
+--- Score : 30808 msgs/S, 61616 ctxswc/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.2 (Benchmark, messages #2)
+--- Score : 24579 msgs/S, 49158 ctxswc/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.3 (Benchmark, messages #3)
+--- Score : 24579 msgs/S, 49158 ctxswc/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.4 (Benchmark, context switch)
+--- Score : 88608 ctxswc/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.5 (Benchmark, threads, full cycle)
+--- Score : 20741 threads/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.6 (Benchmark, threads, create only)
+--- Score : 26561 threads/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads)
+--- Score : 7786 reschedulations/S, 46716 ctxswc/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.8 (Benchmark, round robin context switching)
+--- Score : 67756 reschedulations/S, 67756 ctxswc/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.9 (Benchmark, I/O Queues throughput)
+--- Score : 82224 bytes/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.10 (Benchmark, virtual timers set/reset)
+--- Score : 81482 timers/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.11 (Benchmark, semaphores wait/signal)
+--- Score : 224224 wait+signal/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
+--- Score : 119304 lock+unlock/S
+--- Result: SUCCESS
+----------------------------------------------------------------------------
+--- Test Case 11.13 (Benchmark, RAM footprint)
+--- System: 220 bytes
+--- Thread: 27 bytes
+--- Timer : 10 bytes
+--- Semaph: 5 bytes
+--- EventS: 2 bytes
+--- EventL: 5 bytes
+--- Mutex : 8 bytes
+--- CondV.: 4 bytes
+--- Queue : 15 bytes
+--- MailB.: 18 bytes
+--- Result: SUCCESS
+----------------------------------------------------------------------------
Final result: SUCCESS
diff --git a/docs/reports/LPC2148-48-ARM.txt b/docs/reports/LPC2148-48-ARM.txt
index fc5a2e21a..d7a98a68e 100644
--- a/docs/reports/LPC2148-48-ARM.txt
+++ b/docs/reports/LPC2148-48-ARM.txt
@@ -5,9 +5,9 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
*** ChibiOS/RT test suite
***
-*** Kernel: 1.3.3unstable
+*** Kernel: 1.3.5unstable
*** Architecture: ARM7TDMI
-*** GCC Version: 4.4.1
+*** GCC Version: 4.4.2
----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
@@ -89,7 +89,7 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
---- Score : 144428 msgs/S, 288856 ctxswc/S
+--- Score : 144427 msgs/S, 288854 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
@@ -105,11 +105,11 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
---- Score : 107672 threads/S
+--- Score : 107671 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
---- Score : 150332 threads/S
+--- Score : 150334 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads)
@@ -117,11 +117,11 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
---- Score : 340840 reschedulations/S, 340840 ctxswc/S
+--- Score : 340828 reschedulations/S, 340828 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
---- Score : 357096 bytes/S
+--- Score : 357104 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
@@ -133,7 +133,7 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
---- Score : 380192 lock+unlock/S
+--- Score : 380196 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint)
diff --git a/docs/reports/LPC2148-48-THUMB.txt b/docs/reports/LPC2148-48-THUMB.txt
index a61a299ca..436ae860b 100644
--- a/docs/reports/LPC2148-48-THUMB.txt
+++ b/docs/reports/LPC2148-48-THUMB.txt
@@ -5,9 +5,9 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
*** ChibiOS/RT test suite
***
-*** Kernel: 1.3.3unstable
+*** Kernel: 1.3.5unstable
*** Architecture: ARM7TDMI
-*** GCC Version: 4.4.1
+*** GCC Version: 4.4.2
----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
@@ -89,7 +89,7 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
---- Score : 104990 msgs/S, 209980 ctxswc/S
+--- Score : 104991 msgs/S, 209982 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
@@ -101,11 +101,11 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.4 (Benchmark, context switch)
---- Score : 410504 ctxswc/S
+--- Score : 410488 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
---- Score : 87174 threads/S
+--- Score : 87176 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
@@ -121,19 +121,19 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
---- Score : 265332 bytes/S
+--- Score : 265328 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
---- Score : 303350 timers/S
+--- Score : 303348 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
---- Score : 353240 wait+signal/S
+--- Score : 353248 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
---- Score : 249160 lock+unlock/S
+--- Score : 249168 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint)
diff --git a/docs/reports/STM32F103-48.txt b/docs/reports/STM32F103-48.txt
index bfab849f9..d57a1da73 100644
--- a/docs/reports/STM32F103-48.txt
+++ b/docs/reports/STM32F103-48.txt
@@ -5,9 +5,9 @@ Settings: SYSCLK=48, ACR=0x11 (1 wait state)
*** ChibiOS/RT test suite
***
-*** Kernel: 1.3.3unstable
+*** Kernel: 1.3.5unstable
*** Architecture: ARM Cortex-M3
-*** GCC Version: 4.4.1
+*** GCC Version: 4.4.2
----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
@@ -109,7 +109,7 @@ Settings: SYSCLK=48, ACR=0x11 (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
---- Score : 162821 threads/S
+--- Score : 162820 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads)
@@ -125,7 +125,7 @@ Settings: SYSCLK=48, ACR=0x11 (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
---- Score : 526066 timers/S
+--- Score : 526068 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
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_ */
/** @} */